From 61a84be66786cec3cc2fbf30c29b778bf39adba3 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 19 Sep 2011 13:20:41 +0200 Subject: [PATCH] Debugger: Fix compilation warnings Change-Id: I57d2360566eb35c90db82075851f153727712980 Reviewed-on: http://codereview.qt-project.org/5137 Reviewed-by: Qt Sanity Bot Reviewed-by: Aurindam Jana --- .../debugger/qdeclarativedebugserver.cpp | 29 +++++++++++--------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 8bda006..883e1a8 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -177,11 +177,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( - appD->qmljsDebugArgumentsString()); - qWarning("%s", qPrintable(message)); + qWarning() << QString::fromLatin1( + "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Debugging has not been enabled.").arg( + appD->qmljsDebugArgumentsString()); return 0; } @@ -208,21 +207,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:[,block]").arg( - appD->qmljsDebugArgumentsString()).toAscii().constData()); + qWarning() << QString::fromLatin1( + "QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Format is -qmljsdebugger=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 } -- 1.7.2.5