summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-01 15:19:01 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-01 16:56:55 +0000
commit2360e764664722dcc868e7a32b451cbf51aa45d5 (patch)
tree7855035eeab3fa588989055a5fe4e0ecec838b78
parent6213acf9ef440b0adf749c08ead6d55b2ae20abf (diff)
winrtrunner: Use noquote() for all messages with file names.v5.6.0-alpha1
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>
-rw-r--r--src/winrtrunner/appxengine.cpp14
-rw-r--r--src/winrtrunner/appxlocalengine.cpp9
-rw-r--r--src/winrtrunner/runner.cpp7
3 files changed, 18 insertions, 12 deletions
diff --git a/src/winrtrunner/appxengine.cpp b/src/winrtrunner/appxengine.cpp
index 258510314..b2c3d071d 100644
--- a/src/winrtrunner/appxengine.cpp
+++ b/src/winrtrunner/appxengine.cpp
@@ -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;
diff --git a/src/winrtrunner/appxlocalengine.cpp b/src/winrtrunner/appxlocalengine.cpp
index 62f93bd35..f16fbff10 100644
--- a/src/winrtrunner/appxlocalengine.cpp
+++ b/src/winrtrunner/appxlocalengine.cpp
@@ -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;
}
diff --git a/src/winrtrunner/runner.cpp b/src/winrtrunner/runner.cpp
index 0ee519fd3..761f834d5 100644
--- a/src/winrtrunner/runner.cpp
+++ b/src/winrtrunner/runner.cpp
@@ -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;
}