diff options
author | Arvid Ephraim Picciani <arvid.picciani@nokia.com> | 2010-09-06 12:18:32 (GMT) |
---|---|---|
committer | Arvid Ephraim Picciani <arvid.picciani@nokia.com> | 2010-09-06 13:44:18 (GMT) |
commit | f2b9a249664349dcf7bda907707023fa5b9a29ba (patch) | |
tree | fb1c233a17be614389ce3f66571c3b14b3275c18 /src | |
parent | 3676380190908d79fe547cf2a5efc3efdba25af8 (diff) | |
download | Qt-f2b9a249664349dcf7bda907707023fa5b9a29ba.zip Qt-f2b9a249664349dcf7bda907707023fa5b9a29ba.tar.gz Qt-f2b9a249664349dcf7bda907707023fa5b9a29ba.tar.bz2 |
Enable QLibrary debugging via QT_DEBUG_PLUGINS
Reviewed-by: janarve
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/plugin/qlibrary.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 8f82cc4..239509e 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -64,8 +64,6 @@ QT_BEGIN_NAMESPACE -//#define QT_DEBUG_COMPONENT - #ifdef QT_NO_DEBUG # define QLIBRARY_AS_DEBUG false #else @@ -385,8 +383,12 @@ static bool qt_unix_query(const QString &library, uint *version, bool *debug, QB } else { pos = qt_find_pattern(filedata, fdlen, pattern, plen); } - } else if (r != QElfParser::Ok) + } else if (r != QElfParser::Ok) { + if (lib && qt_debug_component()) { + qWarning(qPrintable(lib->errorString)); + } return false; + } #else pos = qt_find_pattern(filedata, fdlen, pattern, plen); #endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) @@ -1275,15 +1277,11 @@ QLibrary::LoadHints QLibrary::loadHints() const /* Internal, for debugging */ bool qt_debug_component() { -#if defined(QT_DEBUG_COMPONENT) - return true; //compatibility? -#else static int debug_env = -1; if (debug_env == -1) debug_env = QT_PREPEND_NAMESPACE(qgetenv)("QT_DEBUG_PLUGINS").toInt(); return debug_env != 0; -#endif } QT_END_NAMESPACE |