forked from qt-creator/qt-creator
Utils: Fix PathChooser validation
Change-Id: I5b0ad8a1011f51c5db732fe454c409812b406c17 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -613,8 +613,8 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
|
|||||||
*errorMessage = Tr::tr("The path \"%1\" is not a directory.").arg(filePath.toUserOutput());
|
*errorMessage = Tr::tr("The path \"%1\" is not a directory.").arg(filePath.toUserOutput());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (HostOsInfo::isWindowsHost() && !filePath.startsWithDriveLetter()
|
if (filePath.osType() == OsTypeWindows && !filePath.startsWithDriveLetter()
|
||||||
&& !filePath.startsWith("\\\\") && !filePath.startsWith("//")) {
|
&& !filePath.startsWith("\\\\") && !filePath.startsWith("//")) {
|
||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = Tr::tr("Invalid path \"%1\".").arg(filePath.toUserOutput());
|
*errorMessage = Tr::tr("Invalid path \"%1\".").arg(filePath.toUserOutput());
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user