aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-04-06 12:17:46 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-06-22 08:17:18 +0000
commit92b15c882d651ab5d9bfa84d712c5f520a00b19d (patch)
treebe464f88ca264c826f20177449dd2787bfae499c
parent3442f6c7679ecd30f035ca0708a2b47091ea47f4 (diff)
QQmlDebugConnector: Don't complain about new pluginKey if it's unchanged
We cannot set the plugin key to a new value if we've already instantiated the plugin. Setting the same value again, is a noop, though. Change-Id: Ib2d2cb3dc20d8d3d7f1673957970f5235e3aeccc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/debugger/qqmldebugconnector.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp2
4 files changed, 1 insertions, 7 deletions
diff --git a/src/qml/debugger/qqmldebugconnector.cpp b/src/qml/debugger/qqmldebugconnector.cpp
index d9f51ce09f..0ef40d6911 100644
--- a/src/qml/debugger/qqmldebugconnector.cpp
+++ b/src/qml/debugger/qqmldebugconnector.cpp
@@ -82,7 +82,7 @@ Q_GLOBAL_STATIC(QQmlDebugConnectorParams, qmlDebugConnectorParams)
void QQmlDebugConnector::setPluginKey(const QString &key)
{
QQmlDebugConnectorParams *params = qmlDebugConnectorParams();
- if (params) {
+ if (params && params->pluginKey != key) {
if (params->instance)
qWarning() << "QML debugger: Cannot set plugin key after loading the plugin.";
else
diff --git a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp
index 452520cf11..ffdbf72ded 100644
--- a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp
+++ b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp
@@ -66,8 +66,6 @@ void tst_QQmlDebugClient::initTestCase()
QQmlDebugConnector::setPluginKey(QLatin1String("QQmlDebugServer"));
QQmlDebugConnector::setServices(QStringList()
<< QStringLiteral("tst_QQmlDebugClient::handshake()"));
- QTest::ignoreMessage(QtWarningMsg,
- "QML debugger: Cannot set plugin key after loading the plugin.");
m_service = new QQmlDebugTestService("tst_QQmlDebugClient::handshake()");
diff --git a/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp b/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp
index 5b3c0c5240..4e47c92c2a 100644
--- a/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp
+++ b/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp
@@ -65,8 +65,6 @@ void tst_QQmlDebugLocal::initTestCase()
{
fileName = QString::fromLatin1("tst_QQmlDebugLocal%1").arg(std::time(nullptr));
QQmlDebugConnector::setPluginKey("QQmlDebugServer");
- QTest::ignoreMessage(QtWarningMsg,
- "QML debugger: Cannot set plugin key after loading the plugin.");
m_service = new QQmlDebugTestService("tst_QQmlDebugLocal::handshake()");
const QString waitingMsg = QString("QML Debugger: Connecting to socket %1...").arg(fileName);
diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
index 1daf6b581e..3557940386 100644
--- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
+++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
@@ -75,8 +75,6 @@ void tst_QQmlDebugService::initTestCase()
QQmlDebugConnector::setPluginKey(QLatin1String("QQmlDebugServer"));
QQmlDebugConnector::setServices(QStringList()
<< QStringLiteral("tst_QQmlDebugService"));
- QTest::ignoreMessage(QtWarningMsg,
- "QML debugger: Cannot set plugin key after loading the plugin.");
m_service = new QQmlDebugTestService("tst_QQmlDebugService", 2);
foreach (const QString &service, QQmlDebuggingEnabler::debuggerServices())