diff options
author | kh1 <karsten.heimrich@digia.com> | 2012-11-08 16:49:59 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2012-11-09 10:52:56 +0100 |
commit | 274c93b4a05967563f0b201ff0b6faf9b6292701 (patch) | |
tree | c03a696a5377326411f2369ec78a5f003c498b30 /src/sdk | |
parent | 4917152126998bcd448c3b001b962eb8f8bede62 (diff) |
Add some more ambiguous chars and option to allow space.
Task-number: QTIFW-148
Task-number: QTIFW-161
Change-Id: I20a0a1be872807305398d81b8672f3df77220212
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
Diffstat (limited to 'src/sdk')
-rw-r--r-- | src/sdk/installerbasecommons.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sdk/installerbasecommons.cpp b/src/sdk/installerbasecommons.cpp index 14c2c57ae..9e8b8ab12 100644 --- a/src/sdk/installerbasecommons.cpp +++ b/src/sdk/installerbasecommons.cpp @@ -372,14 +372,18 @@ QString TargetDirectoryPageImpl::targetDirWarning() const } QString dir = targetDir(); + QString ambiguousChars = QLatin1String("[<>|?*!@#$%^&:,; ]"); + if (packageManagerCore()->settings().allowSpaceInPath()) + ambiguousChars.remove(QLatin1Char(' ')); + #ifdef Q_OS_WIN // remove e.g. "c:" dir = dir.mid(2); #endif // check if there are not allowed characters in the target path - if (dir.contains(QRegExp(QLatin1String("[!@#$%^&*: ,;]")))) { - return TargetDirectoryPageImpl::tr("The installation path must not contain !@#$%^&*:,; or spaces, " - "please specify a valid folder."); + if (dir.contains(QRegExp(ambiguousChars))) { + return TargetDirectoryPageImpl::tr("The installation path must not contain %1, " + "please specify a valid folder.").arg(ambiguousChars); } return QString(); |