summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-04 08:33:52 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-04 09:02:17 (GMT)
commit4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1 (patch)
treeb34985c5716d98f01b9f36fd4a98f2ac9710099f /src/corelib/plugin
parenta0df97c03f26a38af17a42fb44ad6910536c8857 (diff)
parent2076f150995e541308b1d8da936b3e12ab68b886 (diff)
downloadQt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.zip
Qt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.tar.gz
Qt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.tar.bz2
Merge commit 'qt/master-stable'
Conflicts: config.tests/unix/openssl/openssl.pri demos/embedded/embedded.pro examples/itemviews/chart/chart.pro examples/network/network.pro examples/painting/painterpaths/painterpaths.pro examples/threads/mandelbrot/mandelbrot.pro qmake/project.cpp src/3rdparty/libtiff/libtiff/tif_config.h src/corelib/arch/arch.pri src/corelib/global/qglobal.cpp src/corelib/kernel/kernel.pri src/corelib/kernel/qcore_unix_p.h src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/corelib/tools/qsharedpointer_impl.h src/corelib/tools/tools.pri src/gui/kernel/qaction.h src/gui/kernel/qapplication.cpp src/gui/painting/qregion.h src/gui/widgets/qlineedit.cpp src/gui/widgets/qlineedit_p.h src/network/socket/qnativesocketengine_unix.cpp tests/auto/qdir/tst_qdir.cpp tests/auto/qdiriterator/tst_qdiriterator.cpp tests/auto/qhttp/qhttp.pro tests/auto/qline/qline.pro tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qresourceengine/qresourceengine.pro tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qstring/qstring.pro tests/auto/qtcpsocket/qtcpsocket.pro tests/auto/qtcpsocket/tst_qtcpsocket.cpp
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qlibrary.cpp5
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp22
2 files changed, 19 insertions, 8 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 772655e..265a5a2 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -694,12 +694,15 @@ bool QLibraryPrivate::isPlugin(QSettings *settings)
#endif
}
+ // Qt 4.5 compatibility: stl doesn't affect binary compatibility
+ key.replace(" no-stl", "");
+
+#ifndef QT_NO_SETTINGS
QStringList queried;
queried << QString::number(qt_version,16)
<< QString::number((int)debug)
<< QLatin1String(key)
<< lastModified;
-#ifndef QT_NO_SETTINGS
settings->setValue(regkey, queried);
#endif
}
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index bdf6b78..462cfbf 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_HPUX_LD)
+#if !defined(QT_HPUX_LD) && !defined(Q_OS_VXWORKS)
QT_BEGIN_INCLUDE_NAMESPACE
#include <dlfcn.h>
QT_END_INCLUDE_NAMESPACE
@@ -66,7 +66,9 @@ QT_END_INCLUDE_NAMESPACE
static QString qdlerror()
{
-#if !defined(QT_HPUX_LD)
+#if defined(Q_OS_VXWORKS)
+ const char *err = "VxWorks does not support dynamic libraries.";
+#elif !defined(QT_HPUX_LD)
const char *err = dlerror();
#else
const char *err = strerror(errno);
@@ -76,6 +78,8 @@ static QString qdlerror()
bool QLibraryPrivate::load_sys()
{
+ QString attempt;
+#if !defined(Q_OS_VXWORKS)
QFileInfo fi(fileName);
#if defined(Q_OS_SYMBIAN)
@@ -179,7 +183,6 @@ bool QLibraryPrivate::load_sys()
}
#endif
#endif // QT_HPUX_LD
- QString attempt;
bool retry = true;
for(int prefix = 0; retry && !pHnd && prefix < prefixes.size(); prefix++) {
for(int suffix = 0; retry && !pHnd && suffix < suffixes.size(); suffix++) {
@@ -227,7 +230,8 @@ bool QLibraryPrivate::load_sys()
attempt = str;
}
}
-# endif
+#endif
+#endif // Q_OS_VXWORKS
if (!pHnd) {
errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName).arg(qdlerror());
}
@@ -240,14 +244,16 @@ bool QLibraryPrivate::load_sys()
bool QLibraryPrivate::unload_sys()
{
-#if defined(QT_HPUX_LD)
+#if !defined(Q_OS_VXWORKS)
+# if defined(QT_HPUX_LD)
if (shl_unload((shl_t)pHnd)) {
-#else
+# else
if (dlclose(pHnd)) {
-#endif
+# endif
errorString = QLibrary::tr("Cannot unload library %1: %2").arg(fileName).arg(qdlerror());
return false;
}
+#endif
errorString.clear();
return true;
}
@@ -272,6 +278,8 @@ void* QLibraryPrivate::resolve_sys(const char* symbol)
void* address = 0;
if (shl_findsym((shl_t*)&pHnd, symbol, TYPE_UNDEFINED, &address) < 0)
address = 0;
+#elif defined(Q_OS_VXWORKS)
+ void *address = 0;
#else
void* address = dlsym(pHnd, symbol);
#endif