Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Debugger: Print informational messages via qDebug
This allows users to use QT_FATAL_WARNINGS.

Change-Id: I114825764c841030418c956d23575159157dfd69
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
  • Loading branch information
Kai Koehne authored and Qt by Nokia committed Mar 14, 2012
1 parent d6c666f commit e1d688a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp
Expand Up @@ -132,7 +132,7 @@ void QmlOstPlugin::setPort(int port, bool block)
}
d->protocol = new QPacketProtocol(d->ost, this);
QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead()));
qWarning("QML Debugger: Waiting for connection via OST."); // This message is part of the signalling - do not change the format!
qDebug("QML Debugger: Waiting for connection via OST."); // This message is part of the signalling - do not change the format!
}

void QmlOstPlugin::readyRead()
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
Expand Up @@ -147,7 +147,7 @@ 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("QML Debugger: Waiting for connection on port %d...", d->port);
qDebug("QML Debugger: Waiting for connection on port %d...", d->port);
else
qWarning("QML Debugger: Unable to listen to port %d.", d->port);
}
Expand Down
2 changes: 1 addition & 1 deletion src/qml/debugger/qqmldebugserver.cpp
Expand Up @@ -389,7 +389,7 @@ void QQmlDebugServer::receiveMessage(const QByteArray &message)
iter.value()->stateChanged(newState);
}

qWarning("QML Debugger: Connection established.");
qDebug("QML Debugger: Connection established.");
d->messageArrivedCondition.wakeAll();

} else if (op == 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/qml/qqmlengine.cpp
Expand Up @@ -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.");
qDebug("QML debugging is enabled. Only use this in a safe environment.");
}
QQmlEnginePrivate::qml_debugging_enabled = true;
#endif
Expand Down
Expand Up @@ -72,15 +72,15 @@ private slots:
void tst_QQmlDebugClient::initTestCase()
{
const QString waitingMsg = QString("QML Debugger: Waiting for connection on port %1...").arg(PORT);
QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData());
QTest::ignoreMessage(QtDebugMsg, waitingMsg.toAscii().constData());
new QQmlEngine(this);

m_conn = new QQmlDebugConnection(this);

QQmlDebugTestClient client("tst_QQmlDebugClient::handshake()", m_conn);
QQmlDebugTestService service("tst_QQmlDebugClient::handshake()");

QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established.");
QTest::ignoreMessage(QtDebugMsg, "QML Debugger: Connection established.");
for (int i = 0; i < 50; ++i) {
// try for 5 seconds ...
m_conn->connectToHost("127.0.0.1", PORT);
Expand Down Expand Up @@ -172,7 +172,7 @@ void tst_QQmlDebugClient::sequentialConnect()
QTest::qWait(100);

connection2.connectToHost("127.0.0.1", PORT);
QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established.");
QTest::ignoreMessage(QtDebugMsg, "QML Debugger: Connection established.");
QVERIFY(connection2.waitForConnected());
QVERIFY(connection2.isConnected());
QTRY_VERIFY(client2.state() == QQmlDebugClient::Enabled);
Expand Down
Expand Up @@ -77,13 +77,13 @@ private slots:
void tst_QQmlDebugService::initTestCase()
{
const QString waitingMsg = QString("QML Debugger: Waiting for connection on port %1...").arg(PORT);
QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData());
QTest::ignoreMessage(QtDebugMsg, waitingMsg.toAscii().constData());
new QQmlEngine(this);

m_conn = new QQmlDebugConnection(this);


QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established.");
QTest::ignoreMessage(QtDebugMsg, "QML Debugger: Connection established.");
for (int i = 0; i < 50; ++i) {
// try for 5 seconds ...
m_conn->connectToHost("127.0.0.1", PORT);
Expand Down
Expand Up @@ -301,7 +301,7 @@ void tst_QQmlEngineDebugService::initTestCase()
qRegisterMetaType<QQmlDebugWatch::State>();
qmlRegisterType<NonScriptProperty>("Test", 1, 0, "NonScriptPropertyElement");

QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Waiting for connection on port 3768...");
QTest::ignoreMessage(QtDebugMsg, "QML Debugger: Waiting for connection on port 3768...");
m_engine = new QQmlEngine(this);

QList<QByteArray> qml;
Expand Down Expand Up @@ -386,7 +386,7 @@ void tst_QQmlEngineDebugService::initTestCase()
m_conn = new QQmlDebugConnection(this);
m_conn->connectToHost("127.0.0.1", 3768);

QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established.");
QTest::ignoreMessage(QtDebugMsg, "QML Debugger: Connection established.");
bool ok = m_conn->waitForConnected();
QVERIFY(ok);
QTRY_VERIFY(QQmlDebugService::hasDebuggingClient());
Expand Down

0 comments on commit e1d688a

Please sign in to comment.