summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-11-28 12:26:33 +0100
committerKai Koehne <kai.koehne@nokia.com>2011-11-28 14:05:07 +0100
commitc26418bb8d0889beb6d4ec36a40fbf0c7ca69c97 (patch)
tree7073f5954c09ec82522c917ce1e4f20ddf3258f5 /src/declarative
parentf48870f8efbcf7ca4e344e48e4f61334f35b9c6c (diff)
Declarative: Unify output of warning messages in debug server
Use the stream operator instead of toAscii().constData(), or qPrintable. Also use QString::fromLatin1() instead of QString::fromAscii(). Task-number: QTBUG-22860 Change-Id: Iabe37778f0fd50ca450f0504939441c633d6354e
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/debugger/qdeclarativedebugserver.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp
index 05f63c7ee8..6cb5b9f64d 100644
--- a/src/declarative/debugger/qdeclarativedebugserver.cpp
+++ b/src/declarative/debugger/qdeclarativedebugserver.cpp
@@ -179,11 +179,10 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
// format: qmljsdebugger=port:3768[,block] OR qmljsdebugger=ost[,block]
if (!appD->qmljsDebugArgumentsString().isEmpty()) {
if (!QDeclarativeEnginePrivate::qml_debugging_enabled) {
- const QString message =
- QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
- "Debugging has not been enabled.").arg(
+ qWarning() << QString::fromLatin1(
+ "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
+ "Debugging has not been enabled.").arg(
appD->qmljsDebugArgumentsString());
- qWarning("%s", qPrintable(message));
return 0;
}
@@ -211,21 +210,25 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
connection->setServer(server);
connection->setPort(port, block);
} else {
- qWarning() << QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
- "Remote debugger plugin has not been found.").arg(appD->qmljsDebugArgumentsString());
+ qWarning() << QString::fromLatin1(
+ "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
+ "Remote debugger plugin has not been found.").arg(
+ appD->qmljsDebugArgumentsString());
}
} else {
- qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
- "Format is -qmljsdebugger=port:<port>[,block]").arg(
- appD->qmljsDebugArgumentsString()).toAscii().constData());
+ qWarning() << QString::fromLatin1(
+ "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
+ "Format is -qmljsdebugger=port:<port>[,block]").arg(
+ appD->qmljsDebugArgumentsString());
}
}
#else
if (!appD->qmljsDebugArgumentsString().isEmpty()) {
- qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
- "QtDeclarative is not configured for debugging.").arg(
- appD->qmljsDebugArgumentsString()).toAscii().constData());
+ qWarning() << QString::fromLatin1(
+ "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
+ "QtDeclarative is not configured for debugging.").arg(
+ appD->qmljsDebugArgumentsString());
}
#endif
}