diff options
author | kh1 <karsten.heimrich@digia.com> | 2012-11-08 16:49:59 +0100 |
---|---|---|
committer | Niels Weber <niels.weber@digia.com> | 2013-01-11 13:39:09 +0100 |
commit | ecb9a04b912bc0f02485d97578718f730a227fbf (patch) | |
tree | f8de8ea1739dff9706432ee8d77acf44860c8c59 /src/sdk/installerbasecommons.cpp | |
parent | fbb5912de2151187c4277bdc88dff07b5d4a13ea (diff) |
Add some more ambiguous chars and option to allow space.
Task-number: QTIFW-148
Task-number: QTIFW-161
Task-number: QTIFW-199
(cherry picked from commit 274c93b4a05967563f0b201ff0b6faf9b6292701)
Conflicts:
doc/installerfw.qdoc
src/libs/installer/constants.h
Change-Id: I65f9d0ae07fdd929a8c2fd71a94a441fe404b457
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/sdk/installerbasecommons.cpp')
-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 a6298c836..0c5932554 100644 --- a/src/sdk/installerbasecommons.cpp +++ b/src/sdk/installerbasecommons.cpp @@ -357,14 +357,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(); |