diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-11-22 09:28:25 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-11-22 09:28:25 (GMT) |
commit | 787a9ce07accfcaddada8235ae204a5aa2025309 (patch) | |
tree | 7ff5a95274e0f75deb5b1750efd1ad4823462461 /src | |
parent | c0f782bc6c7eeebc5f6119c70248ac4be55dcc74 (diff) | |
parent | 6d221f4bd6a775a4af29997da3c1af23860b9643 (diff) | |
download | Qt-787a9ce07accfcaddada8235ae204a5aa2025309.zip Qt-787a9ce07accfcaddada8235ae204a5aa2025309.tar.gz Qt-787a9ce07accfcaddada8235ae204a5aa2025309.tar.bz2 |
Merge remote-tracking branch 'qt-qml-review/master' into master-qml-staging
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/debugger/qdeclarativedebugserver.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 3e0c326..05f63c7 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -96,7 +96,7 @@ public: private: // private slot void _q_deliverMessage(const QString &serviceName, const QByteArray &message); - static QDeclarativeDebugServerConnection *loadConnectionPlugin(const QString &pluginName); + static QDeclarativeDebugServerConnection *loadConnectionPlugin(QPluginLoader *loader, const QString &pluginName); }; QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : @@ -120,7 +120,7 @@ void QDeclarativeDebugServerPrivate::advertisePlugins() } QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin( - const QString &pluginName) + QPluginLoader *loader, const QString &pluginName) { #ifndef QT_NO_LIBRARY QStringList pluginCandidates; @@ -137,17 +137,17 @@ QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectio } foreach (const QString &pluginPath, pluginCandidates) { - QPluginLoader loader(pluginPath); - if (!loader.load()) { + loader->setFileName(pluginPath); + if (!loader->load()) { continue; } QDeclarativeDebugServerConnection *connection = 0; - if (QObject *instance = loader.instance()) + if (QObject *instance = loader->instance()) connection = qobject_cast<QDeclarativeDebugServerConnection*>(instance); if (connection) return connection; - loader.unload(); + loader->unload(); } #endif return 0; @@ -202,8 +202,9 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() if (ok) { server = new QDeclarativeDebugServer(); + QPluginLoader *loader = new QPluginLoader(server); QDeclarativeDebugServerConnection *connection - = QDeclarativeDebugServerPrivate::loadConnectionPlugin(pluginName); + = QDeclarativeDebugServerPrivate::loadConnectionPlugin(loader, pluginName); if (connection) { server->d_func()->connection = connection; |