From: Ulf Hermann Date: Wed, 15 Jul 2015 12:08:48 +0000 (+0200) Subject: Remove QQmlDebugServer::advertisePlugins() X-Git-Tag: v5.5.90+alpha1~115 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99141dd5fc4847d7cf38847065c617361329a3d2;p=platform%2Fupstream%2Fqtdeclarative.git 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 --- diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp index da2eac7..0d6c1f9 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 pluginVersions; - const QList 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, QList() << 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; }