diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-06 06:52:51 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-06 06:52:51 (GMT) |
commit | 3a632cb5f1c1da5c2e72ce167e35a42778867829 (patch) | |
tree | 76540ae0ef94b3069afb2f043bd0d26d0b26cc5b /src/corelib/plugin | |
parent | ab9c4f04fe86cbeed28800cbe0473738d9959871 (diff) | |
parent | cb85dd1db4e42b35fd3727874d718389238b801f (diff) | |
download | Qt-3a632cb5f1c1da5c2e72ce167e35a42778867829.zip Qt-3a632cb5f1c1da5c2e72ce167e35a42778867829.tar.gz Qt-3a632cb5f1c1da5c2e72ce167e35a42778867829.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r-- | src/corelib/plugin/qlibrary.cpp | 14 | ||||
-rw-r--r-- | src/corelib/plugin/qplugin.h | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index a2c575a..0f99948 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -620,6 +620,20 @@ bool QLibraryPrivate::isPlugin(QSettings *settings) QByteArray key; bool success = false; +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) + if (fileName.endsWith(QLatin1String(".debug"))) { + // refuse to load a file that ends in .debug + // these are the debug symbols from the libraries + // the problem is that they are valid shared library files + // and dlopen is known to crash while opening them + + // pretend we didn't see the file + errorString = QLibrary::tr("The shared library was not found."); + pluginState = IsNotAPlugin; + return false; + } +#endif + QFileInfo fileinfo(fileName); #ifndef QT_NO_DATESTRING diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h index b798437..7f541f1 100644 --- a/src/corelib/plugin/qplugin.h +++ b/src/corelib/plugin/qplugin.h @@ -110,7 +110,7 @@ void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunctio # define QPLUGIN_DEBUG_STR "true" # endif # define Q_PLUGIN_VERIFICATION_DATA \ - static const char *qt_plugin_verification_data = \ + static const char qt_plugin_verification_data[] = \ "pattern=""QT_PLUGIN_VERIFICATION_DATA""\n" \ "version="QT_VERSION_STR"\n" \ "debug="QPLUGIN_DEBUG_STR"\n" \ |