From 3f9b58c0890a4263730e2c06b46e7a69d4bfb62d Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 7 Mar 2012 14:53:24 +0100 Subject: [PATCH] QML Debugger: Change prefix of warnings Since we've been changing from QtDeclarativeDebugServer to QQmlDebugServer anyway, we might as well change it to the more readable "QML Debugger:" prefix. Change-Id: I852577233d7cdb1f57adc43ec1b85a14d212574d Reviewed-by: Aurindam Jana --- src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp | 4 ++-- .../qmltooling/qmldbg_tcp/qtcpserverconnection.cpp | 8 +++---- src/qml/debugger/qqmldebugserver.cpp | 28 +++++++++++----------- src/qml/qml/qqmlengine.cpp | 2 +- .../qqmldebugclient/tst_qqmldebugclient.cpp | 8 +++---- .../qqmldebugservice/tst_qqmldebugservice.cpp | 4 ++-- .../qqmlenginedebug/tst_qqmlenginedebug.cpp | 4 ++-- tests/auto/qml/debugger/shared/debugutil.cpp | 6 ++--- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp index 9bd68e7..fb18231 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp @@ -127,12 +127,12 @@ void QmlOstPlugin::setPort(int port, bool block) if (!ok) { if (d->ost->errorString().length()) qDebug("Error from QOstDevice: %s", qPrintable(d->ost->errorString())); - qWarning("QQmlDebugServer: Unable to listen on OST"); // This message is part of the signalling - do not change the format! + qWarning("QML Debugger: Unable to listen to OST."); // This message is part of the signalling - do not change the format! return; } d->protocol = new QPacketProtocol(d->ost, this); QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); - qWarning("QQmlDebugServer: Waiting for connection via OST"); // This message is part of the signalling - do not change the format! + qWarning("QML Debugger: Waiting for connection via OST."); // This message is part of the signalling - do not change the format! } void QmlOstPlugin::readyRead() diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp index 1c5ec37..2b12f29 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp @@ -147,9 +147,9 @@ void QTcpServerConnection::listen() d->tcpServer = new QTcpServer(this); QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QQmlDebugServer: Waiting for connection on port %d...", d->port); + qWarning("QML Debugger: Waiting for connection on port %d...", d->port); else - qWarning("QQmlDebugServer: Unable to listen on port %d", d->port); + qWarning("QML Debugger: Unable to listen to port %d.", d->port); } @@ -170,7 +170,7 @@ void QTcpServerConnection::newConnection() Q_D(QTcpServerConnection); if (d->socket && d->socket->peerPort()) { - qWarning("QQmlDebugServer: Another client is already connected"); + qWarning("QML Debugger: Another client is already connected."); QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); delete faultyConnection; return; @@ -190,7 +190,7 @@ void QTcpServerConnection::newConnection() void QTcpServerConnection::invalidPacket() { - qWarning("QQmlDebugServer: Received a corrupted packet! Giving up ..."); + qWarning("QML Debugger: Received a corrupted packet! Giving up ..."); } QT_END_NAMESPACE diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp index f27123a..e70632d 100644 --- a/src/qml/debugger/qqmldebugserver.cpp +++ b/src/qml/debugger/qqmldebugserver.cpp @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE version: an int representing the highest protocol version the client knows pluginNames: plugins available on client side 2. Server sends - "QQmlDebugClient" 0 version pluginNames pluginVersions + "QDeclarativeDebugClient" 0 version pluginNames pluginVersions version: an int representing the highest protocol version the client & server know pluginNames: plugins available on server side. plugins both in the client and server message are enabled. client plugin advertisement @@ -72,7 +72,7 @@ QT_BEGIN_NAMESPACE "QDeclarativeDebugServer" 1 pluginNames server plugin advertisement 1. Server sends - "QQmlDebugClient" 1 pluginNames pluginVersions + "QDeclarativeDebugClient" 1 pluginNames pluginVersions plugin communication: Everything send with a header different to "QDeclarativeDebugServer" is sent to the appropriate plugin. */ @@ -180,12 +180,12 @@ QQmlDebugServerConnection *QQmlDebugServerPrivate::loadConnectionPlugin( foreach (const QString &pluginPath, pluginCandidates) { if (qmlDebugVerbose()) - qDebug() << "QQmlDebugServer: Trying to load plugin " << pluginPath << "..."; + qDebug() << "QML Debugger: Trying to load plugin " << pluginPath << "..."; loader.setFileName(pluginPath); if (!loader.load()) { if (qmlDebugVerbose()) - qDebug() << "QQmlDebugServer: Error while loading: " << loader.errorString(); + qDebug() << "QML Debugger: Error while loading: " << loader.errorString(); continue; } if (QObject *instance = loader.instance()) @@ -193,13 +193,13 @@ QQmlDebugServerConnection *QQmlDebugServerPrivate::loadConnectionPlugin( if (connection) { if (qmlDebugVerbose()) - qDebug() << "QQmlDebugServer: Plugin successfully loaded."; + qDebug() << "QML Debugger: Plugin successfully loaded."; return connection; } if (qmlDebugVerbose()) - qDebug() << "QQmlDebugServer: Plugin does not implement interface QQmlDebugServerConnection."; + qDebug() << "QML Debugger: Plugin does not implement interface QQmlDebugServerConnection."; loader.unload(); } @@ -217,7 +217,7 @@ void QQmlDebugServerThread::run() connection->setPort(m_port, m_block); } else { QCoreApplicationPrivate *appD = static_cast(QObjectPrivate::get(qApp)); - qWarning() << QString::fromAscii("QQmlDebugServer: Ignoring \"-qmljsdebugger=%1\". " + qWarning() << QString::fromAscii("QML Debugger: Ignoring \"-qmljsdebugger=%1\". " "Remote debugger plugin has not been found.").arg(appD->qmljsDebugArgumentsString()); } @@ -263,7 +263,7 @@ QQmlDebugServer *QQmlDebugServer::instance() if (!appD->qmljsDebugArgumentsString().isEmpty()) { if (!QQmlEnginePrivate::qml_debugging_enabled) { qWarning() << QString::fromLatin1( - "QQmlDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "QML Debugger: Ignoring \"-qmljsdebugger=%1\". " "Debugging has not been enabled.").arg( appD->qmljsDebugArgumentsString()); return 0; @@ -299,7 +299,7 @@ QQmlDebugServer *QQmlDebugServer::instance() } else { qWarning() << QString::fromLatin1( - "QQmlDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "QML Debugger: Ignoring \"-qmljsdebugger=%1\". " "Format is -qmljsdebugger=port:[,block]").arg( appD->qmljsDebugArgumentsString()); } @@ -307,7 +307,7 @@ QQmlDebugServer *QQmlDebugServer::instance() #else if (!appD->qmljsDebugArgumentsString().isEmpty()) { qWarning() << QString::fromLatin1( - "QQmlDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "QML Debugger: Ignoring \"-qmljsdebugger=%1\". " "QtQml is not configured for debugging.").arg( appD->qmljsDebugArgumentsString()); } @@ -389,7 +389,7 @@ void QQmlDebugServer::receiveMessage(const QByteArray &message) iter.value()->stateChanged(newState); } - qWarning("QQmlDebugServer: Connection established"); + qWarning("QML Debugger: Connection established."); d->messageArrivedCondition.wakeAll(); } else if (op == 1) { @@ -414,7 +414,7 @@ void QQmlDebugServer::receiveMessage(const QByteArray &message) } } else { - qWarning("QQmlDebugServer: Invalid control message %d", op); + qWarning("QML Debugger: Invalid control message %d.", op); d->connection->disconnect(); return; } @@ -427,7 +427,7 @@ void QQmlDebugServer::receiveMessage(const QByteArray &message) QReadLocker(&d->pluginsLock); QHash::Iterator iter = d->plugins.find(name); if (iter == d->plugins.end()) { - qWarning() << "QQmlDebugServer: Message received for missing plugin" << name; + qWarning() << "QML Debugger: Message received for missing plugin" << name << "."; } else { (*iter)->messageReceived(message); @@ -435,7 +435,7 @@ void QQmlDebugServer::receiveMessage(const QByteArray &message) d->messageArrivedCondition.wakeAll(); } } else { - qWarning("QQmlDebugServer: Invalid hello message"); + qWarning("QML Debugger: Invalid hello message."); } } diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index ee5a0c9..d745513 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1037,7 +1037,7 @@ QQmlDebuggingEnabler::QQmlDebuggingEnabler() { #ifndef QQML_NO_DEBUG_PROTOCOL if (!QQmlEnginePrivate::qml_debugging_enabled) { - qWarning("Qml debugging is enabled. Only use this in a safe environment!"); + qWarning("QML debugging is enabled. Only use this in a safe environment."); } QQmlEnginePrivate::qml_debugging_enabled = true; #endif diff --git a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp index 2891076..b18f30f 100644 --- a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp +++ b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp @@ -71,7 +71,7 @@ private slots: void tst_QQmlDebugClient::initTestCase() { - const QString waitingMsg = QString("QQmlDebugServer: Waiting for connection on port %1...").arg(PORT); + const QString waitingMsg = QString("QML Debugger: Waiting for connection on port %1...").arg(PORT); QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData()); new QQmlEngine(this); @@ -80,7 +80,7 @@ void tst_QQmlDebugClient::initTestCase() QQmlDebugTestClient client("tst_QQmlDebugClient::handshake()", m_conn); QQmlDebugTestService service("tst_QQmlDebugClient::handshake()"); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established."); for (int i = 0; i < 50; ++i) { // try for 5 seconds ... m_conn->connectToHost("127.0.0.1", PORT); @@ -150,7 +150,7 @@ void tst_QQmlDebugClient::parallelConnect() { QQmlDebugConnection connection2; - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Another client is already connected"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Another client is already connected."); // will connect & immediately disconnect connection2.connectToHost("127.0.0.1", PORT); QVERIFY(connection2.waitForConnected()); @@ -172,7 +172,7 @@ void tst_QQmlDebugClient::sequentialConnect() QTest::qWait(100); connection2.connectToHost("127.0.0.1", PORT); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established."); QVERIFY(connection2.waitForConnected()); QVERIFY(connection2.isConnected()); QTRY_VERIFY(client2.state() == QQmlDebugClient::Enabled); diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp index 5af38c2..3699530 100644 --- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp +++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp @@ -76,14 +76,14 @@ private slots: void tst_QQmlDebugService::initTestCase() { - const QString waitingMsg = QString("QQmlDebugServer: Waiting for connection on port %1...").arg(PORT); + const QString waitingMsg = QString("QML Debugger: Waiting for connection on port %1...").arg(PORT); QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData()); new QQmlEngine(this); m_conn = new QQmlDebugConnection(this); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established."); for (int i = 0; i < 50; ++i) { // try for 5 seconds ... m_conn->connectToHost("127.0.0.1", PORT); diff --git a/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp b/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp index 21ed2f4..df8109a 100644 --- a/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp @@ -301,7 +301,7 @@ void tst_QQmlEngineDebug::initTestCase() qRegisterMetaType(); qmlRegisterType("Test", 1, 0, "NonScriptPropertyElement"); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Waiting for connection on port 3768..."); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Waiting for connection on port 3768..."); m_engine = new QQmlEngine(this); QList qml; @@ -386,7 +386,7 @@ void tst_QQmlEngineDebug::initTestCase() m_conn = new QQmlDebugConnection(this); m_conn->connectToHost("127.0.0.1", 3768); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established."); bool ok = m_conn->waitForConnected(); QVERIFY(ok); QTRY_VERIFY(QQmlDebugService::hasDebuggingClient()); diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp index 8ed64d3..a3d3dce 100644 --- a/tests/auto/qml/debugger/shared/debugutil.cpp +++ b/tests/auto/qml/debugger/shared/debugutil.cpp @@ -173,15 +173,15 @@ void QQmlDebugProcess::processAppOutput() const QString line = m_outputBuffer.left(nlIndex); m_outputBuffer = m_outputBuffer.right(m_outputBuffer.size() - nlIndex - 1); - if (line.startsWith("Qml debugging is enabled")) // ignore + if (line.startsWith("QML debugging is enabled")) // ignore continue; - if (line.startsWith("QQmlDebugServer:")) { + if (line.startsWith("QML Debugger:")) { if (line.contains("Waiting for connection ")) { m_started = true; m_eventLoop.quit(); continue; } - if (line.contains("Connection established")) { + if (line.contains("Connection established.")) { continue; } } -- 2.7.4