Debugger: Fix compilation warnings
authorKai Koehne <kai.koehne@nokia.com>
Mon, 19 Sep 2011 11:20:41 +0000 (13:20 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 19 Sep 2011 15:02:18 +0000 (17:02 +0200)
Change-Id: I57d2360566eb35c90db82075851f153727712980
Reviewed-on: http://codereview.qt-project.org/5137
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>

src/declarative/debugger/qdeclarativedebugserver.cpp

index 8bda006..883e1a8 100644 (file)
@@ -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:<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
     }