diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-11-28 11:26:33 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-11-28 13:05:07 (GMT) |
commit | c26418bb8d0889beb6d4ec36a40fbf0c7ca69c97 (patch) | |
tree | 7073f5954c09ec82522c917ce1e4f20ddf3258f5 /src/declarative | |
parent | f48870f8efbcf7ca4e344e48e4f61334f35b9c6c (diff) | |
download | Qt-c26418bb8d0889beb6d4ec36a40fbf0c7ca69c97.zip Qt-c26418bb8d0889beb6d4ec36a40fbf0c7ca69c97.tar.gz Qt-c26418bb8d0889beb6d4ec36a40fbf0c7ca69c97.tar.bz2 |
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.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 05f63c7..6cb5b9f 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 } |