Commit e3b40fa6 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

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's avatarTim Jenssen <tim.jenssen@qt.io>
parent 966623d6
...@@ -542,7 +542,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const ...@@ -542,7 +542,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
} }
if (!fi.isFile()) { if (!fi.isFile()) {
if (errorMessage) if (errorMessage)
*errorMessage = tr("The path <b>%1</b> is not a file.").arg(QDir::toNativeSeparators(expandedPath)); *errorMessage = tr("The path \"%1\" is not a file.").arg(QDir::toNativeSeparators(expandedPath));
return false; return false;
} }
break; break;
...@@ -554,7 +554,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const ...@@ -554,7 +554,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
} }
if (fi.exists() && fi.isDir()) { if (fi.exists() && fi.isDir()) {
if (errorMessage) if (errorMessage)
*errorMessage = tr("The path <b>%1</b> 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; return false;
} }
break; break;
...@@ -566,7 +566,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const ...@@ -566,7 +566,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
} }
if (!fi.isFile() || !fi.isExecutable()) { if (!fi.isFile() || !fi.isExecutable()) {
if (errorMessage) if (errorMessage)
*errorMessage = tr("The path <b>%1</b> 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; return false;
} }
break; break;
...@@ -590,7 +590,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const ...@@ -590,7 +590,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
} }
if (errorMessage) if (errorMessage)
*errorMessage = tr("Full path: <b>%1</b>").arg(QDir::toNativeSeparators(expandedPath)); *errorMessage = tr("Full path: \"%1\"").arg(QDir::toNativeSeparators(expandedPath));
return true; return true;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment