winrtrunner: Use noquote() for all messages with file names. upstream v5.5.90+alpha1
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Tue, 1 Sep 2015 13:19:01 +0000 (15:19 +0200)
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Tue, 1 Sep 2015 16:56:55 +0000 (16:56 +0000)
The quote mode causes '\' to be output as '\\'. Turn it off,
add double quotes manually and use QDir::toNativeSeparators()
consistently.

Change-Id: I1738c64aca106d7e450ab8a5a40adc9a4595f062
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
src/winrtrunner/appxengine.cpp
src/winrtrunner/appxlocalengine.cpp
src/winrtrunner/runner.cpp

index 2585103..b2c3d07 100644 (file)
@@ -281,13 +281,14 @@ bool AppxEngine::installDependencies()
 
     const QString extensionSdkDir = extensionSdkPath();
     if (!QFile::exists(extensionSdkDir)) {
-        qCWarning(lcWinRtRunner).nospace()
-                << QString(QStringLiteral("The directory '%1' does not exist.")).arg(
+        qCWarning(lcWinRtRunner).nospace().noquote()
+                << QStringLiteral("The directory \"%1\" does not exist.").arg(
                        QDir::toNativeSeparators(extensionSdkDir));
         return false;
     }
-    qCDebug(lcWinRtRunner).nospace()
-        << "looking for dependency packages in " << extensionSdkDir;
+    qCDebug(lcWinRtRunner).nospace().noquote()
+        << "looking for dependency packages in \""
+        << QDir::toNativeSeparators(extensionSdkDir) << '"';
     QDirIterator dit(extensionSdkDir, QStringList() << QStringLiteral("*.appx"),
                      QDir::Files,
                      QDirIterator::Subdirectories);
@@ -328,8 +329,9 @@ bool AppxEngine::installDependencies()
         if (d->packageArchitecture != arch)
             continue;
 
-        qCDebug(lcWinRtRunner).nospace()
-            << "installing dependency " << name << " from " << dit.filePath();
+        qCDebug(lcWinRtRunner).nospace().noquote()
+            << "installing dependency \"" << name << "\" from \""
+            << QDir::toNativeSeparators(dit.filePath()) << '"';
         if (!installPackage(manifestReader.Get(), dit.filePath())) {
             qCWarning(lcWinRtRunner) << "Failed to install package:" << name;
             return false;
index 62f93bd..f16fbff 100644 (file)
@@ -350,7 +350,8 @@ AppxLocalEngine::~AppxLocalEngine()
 bool AppxLocalEngine::installPackage(IAppxManifestReader *reader, const QString &filePath)
 {
     Q_D(const AppxLocalEngine);
-    qCDebug(lcWinRtRunner) << __FUNCTION__ << filePath;
+    qCDebug(lcWinRtRunner).nospace().noquote()
+        << __FUNCTION__ << " \"" << QDir::toNativeSeparators(filePath) << '"';
 
     HRESULT hr;
     if (reader) {
@@ -594,8 +595,10 @@ bool AppxLocalEngine::sendFile(const QString &localFile, const QString &deviceFi
         QFile::remove(deviceFile);
 
     bool result = source.copy(deviceFile);
-    if (!result)
-        qCWarning(lcWinRtRunner) << "Unable to sendFile:" << source.errorString();
+    if (!result) {
+        qCWarning(lcWinRtRunner).nospace().noquote()
+            << "Unable to sendFile: " << source.errorString();
+    }
 
     return result;
 }
index 0ee519f..761f834 100644 (file)
@@ -263,9 +263,10 @@ bool Runner::collectTest()
 
     // Fetch test output
     if (!d->engine->receiveFile(d->deviceOutputFile, d->localOutputFile)) {
-        qCWarning(lcWinRtRunner).nospace()
-                << "Unable to copy test output file \"" << d->deviceOutputFile
-                << "\" to local file \"" << d->localOutputFile << "\".";
+        qCWarning(lcWinRtRunner).nospace().noquote()
+                << "Unable to copy test output file \""
+                << QDir::toNativeSeparators(d->deviceOutputFile)
+                << "\" to local file \"" << QDir::toNativeSeparators(d->localOutputFile) << "\".";
         return false;
     }