diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-15 14:08:48 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-31 06:44:06 +0000 |
commit | 99141dd5fc4847d7cf38847065c617361329a3d2 (patch) | |
tree | 14a1129ca3d914daac3c1df2916134ac1e846204 /src/qml/debugger | |
parent | dd36087c82e3ff94df8958fbd0fac444e10432a9 (diff) |
Remove QQmlDebugServer::advertisePlugins()
As all services have to register before the server starts and cannot
unregister until after the thread is stopped, we don't need any
additional service advertisement anymore.
Change-Id: I20977560b4f7a3acb08a6cc703916bebf61d0220
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/debugger')
-rw-r--r-- | src/qml/debugger/qqmldebugserver.cpp | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp index da2eac79ed..0d6c1f91d9 100644 --- a/src/qml/debugger/qqmldebugserver.cpp +++ b/src/qml/debugger/qqmldebugserver.cpp @@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE client plugin advertisement 1. Client sends "QDeclarativeDebugServer" 1 pluginNames - server plugin advertisement + server plugin advertisement (not implemented: all services are required to register before open()) 1. Server sends "QDeclarativeDebugClient" 1 pluginNames pluginVersions plugin communication: @@ -139,7 +139,6 @@ private: bool init(const QString &pluginName, bool block); - void advertisePlugins(); void cleanup(); QQmlDebugServerConnection *loadConnectionPlugin(const QString &pluginName); @@ -242,31 +241,6 @@ struct ConnectToLocalAction { } }; -void QQmlDebugServerImpl::advertisePlugins() -{ - if (!m_gotHello) - return; - - QByteArray message; - { - QQmlDebugStream out(&message, QIODevice::WriteOnly); - QStringList pluginNames; - QList<float> pluginVersions; - const QList<QQmlDebugService *> debugServices = m_plugins.values(); - const int count = debugServices.count(); - pluginNames.reserve(count); - pluginVersions.reserve(count); - foreach (QQmlDebugService *service, debugServices) { - pluginNames << service->name(); - pluginVersions << service->version(); - } - out << QString(QStringLiteral("QDeclarativeDebugClient")) << 1 << pluginNames << pluginVersions; - } - - QMetaObject::invokeMethod(this, "sendMessages", Qt::QueuedConnection, - Q_ARG(QList<QByteArray>, QList<QByteArray>() << message)); -} - void QQmlDebugServerImpl::cleanup() { { @@ -746,7 +720,6 @@ bool QQmlDebugServerImpl::addService(QQmlDebugService *service) if (!service || m_plugins.contains(service->name())) return false; m_plugins.insert(service->name(), service); - advertisePlugins(); QQmlDebugService::State newState = QQmlDebugService::Unavailable; if (m_clientPlugins.contains(service->name())) newState = QQmlDebugService::Enabled; @@ -771,8 +744,6 @@ bool QQmlDebugServerImpl::removeService(QQmlDebugService *service) return false; m_plugins.remove(service->name()); - advertisePlugins(); - return true; } |