forked from qt-creator/qt-creator
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 <tim.jenssen@qt.io>
This commit is contained in:
@@ -542,7 +542,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
|
||||
}
|
||||
if (!fi.isFile()) {
|
||||
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;
|
||||
}
|
||||
break;
|
||||
@@ -554,7 +554,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
|
||||
}
|
||||
if (fi.exists() && fi.isDir()) {
|
||||
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;
|
||||
}
|
||||
break;
|
||||
@@ -566,7 +566,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
|
||||
}
|
||||
if (!fi.isFile() || !fi.isExecutable()) {
|
||||
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;
|
||||
}
|
||||
break;
|
||||
@@ -590,7 +590,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
|
||||
}
|
||||
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("Full path: <b>%1</b>").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("Full path: \"%1\"").arg(QDir::toNativeSeparators(expandedPath));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user