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>
This commit is contained in:
parent
3442f6c767
commit
92b15c882d
|
@ -82,7 +82,7 @@ Q_GLOBAL_STATIC(QQmlDebugConnectorParams, qmlDebugConnectorParams)
|
||||||
void QQmlDebugConnector::setPluginKey(const QString &key)
|
void QQmlDebugConnector::setPluginKey(const QString &key)
|
||||||
{
|
{
|
||||||
QQmlDebugConnectorParams *params = qmlDebugConnectorParams();
|
QQmlDebugConnectorParams *params = qmlDebugConnectorParams();
|
||||||
if (params) {
|
if (params && params->pluginKey != key) {
|
||||||
if (params->instance)
|
if (params->instance)
|
||||||
qWarning() << "QML debugger: Cannot set plugin key after loading the plugin.";
|
qWarning() << "QML debugger: Cannot set plugin key after loading the plugin.";
|
||||||
else
|
else
|
||||||
|
|
|
@ -66,8 +66,6 @@ void tst_QQmlDebugClient::initTestCase()
|
||||||
QQmlDebugConnector::setPluginKey(QLatin1String("QQmlDebugServer"));
|
QQmlDebugConnector::setPluginKey(QLatin1String("QQmlDebugServer"));
|
||||||
QQmlDebugConnector::setServices(QStringList()
|
QQmlDebugConnector::setServices(QStringList()
|
||||||
<< QStringLiteral("tst_QQmlDebugClient::handshake()"));
|
<< QStringLiteral("tst_QQmlDebugClient::handshake()"));
|
||||||
QTest::ignoreMessage(QtWarningMsg,
|
|
||||||
"QML debugger: Cannot set plugin key after loading the plugin.");
|
|
||||||
|
|
||||||
m_service = new QQmlDebugTestService("tst_QQmlDebugClient::handshake()");
|
m_service = new QQmlDebugTestService("tst_QQmlDebugClient::handshake()");
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,6 @@ void tst_QQmlDebugLocal::initTestCase()
|
||||||
{
|
{
|
||||||
fileName = QString::fromLatin1("tst_QQmlDebugLocal%1").arg(std::time(nullptr));
|
fileName = QString::fromLatin1("tst_QQmlDebugLocal%1").arg(std::time(nullptr));
|
||||||
QQmlDebugConnector::setPluginKey("QQmlDebugServer");
|
QQmlDebugConnector::setPluginKey("QQmlDebugServer");
|
||||||
QTest::ignoreMessage(QtWarningMsg,
|
|
||||||
"QML debugger: Cannot set plugin key after loading the plugin.");
|
|
||||||
m_service = new QQmlDebugTestService("tst_QQmlDebugLocal::handshake()");
|
m_service = new QQmlDebugTestService("tst_QQmlDebugLocal::handshake()");
|
||||||
|
|
||||||
const QString waitingMsg = QString("QML Debugger: Connecting to socket %1...").arg(fileName);
|
const QString waitingMsg = QString("QML Debugger: Connecting to socket %1...").arg(fileName);
|
||||||
|
|
|
@ -75,8 +75,6 @@ void tst_QQmlDebugService::initTestCase()
|
||||||
QQmlDebugConnector::setPluginKey(QLatin1String("QQmlDebugServer"));
|
QQmlDebugConnector::setPluginKey(QLatin1String("QQmlDebugServer"));
|
||||||
QQmlDebugConnector::setServices(QStringList()
|
QQmlDebugConnector::setServices(QStringList()
|
||||||
<< QStringLiteral("tst_QQmlDebugService"));
|
<< QStringLiteral("tst_QQmlDebugService"));
|
||||||
QTest::ignoreMessage(QtWarningMsg,
|
|
||||||
"QML debugger: Cannot set plugin key after loading the plugin.");
|
|
||||||
m_service = new QQmlDebugTestService("tst_QQmlDebugService", 2);
|
m_service = new QQmlDebugTestService("tst_QQmlDebugService", 2);
|
||||||
|
|
||||||
foreach (const QString &service, QQmlDebuggingEnabler::debuggerServices())
|
foreach (const QString &service, QQmlDebuggingEnabler::debuggerServices())
|
||||||
|
|
Loading…
Reference in New Issue