From e3b40fa6873d01f04519f4897f3c3f3ba6cc9f3c Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 7 Oct 2016 16:15:02 +0200 Subject: [PATCH] PathChooser: Consistently put "" around file names This makes it a bit simpler to spot leading and trailing whitespaces. Maybe that could help with problems like QTCREATORBUG-16805, but even if not it makes our strings more consistent. Change-Id: I65c486721967d9d3e17020641a1144d593f9bde1 Reviewed-by: Tim Jenssen --- src/libs/utils/pathchooser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index 0e1d838e3c4..bc20f85efc8 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -542,7 +542,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const } if (!fi.isFile()) { if (errorMessage) - *errorMessage = tr("The path %1 is not a file.").arg(QDir::toNativeSeparators(expandedPath)); + *errorMessage = tr("The path \"%1\" is not a file.").arg(QDir::toNativeSeparators(expandedPath)); return false; } break; @@ -554,7 +554,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const } if (fi.exists() && fi.isDir()) { if (errorMessage) - *errorMessage = tr("The path %1 is not a file.").arg(QDir::toNativeSeparators(fi.absolutePath())); + *errorMessage = tr("The path \"%1\" is not a file.").arg(QDir::toNativeSeparators(fi.absolutePath())); return false; } break; @@ -566,7 +566,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const } if (!fi.isFile() || !fi.isExecutable()) { if (errorMessage) - *errorMessage = tr("The path %1 is not an executable file.").arg(QDir::toNativeSeparators(expandedPath)); + *errorMessage = tr("The path \"%1\" is not an executable file.").arg(QDir::toNativeSeparators(expandedPath)); return false; } break; @@ -590,7 +590,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const } if (errorMessage) - *errorMessage = tr("Full path: %1").arg(QDir::toNativeSeparators(expandedPath)); + *errorMessage = tr("Full path: \"%1\"").arg(QDir::toNativeSeparators(expandedPath)); return true; }