aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-08-29 20:38:10 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-08-31 09:33:15 +0000
commite01c3b2298d3dbb9adbdc3e4f3d51c53afe39ce1 (patch)
tree03e58b69650879fa4c5b645211f7d818b778bd87 /src
parentffb67c07ebd98effe891153bf410734ead3a6274 (diff)
Improve Xcode auto-detection
This allows to set meaningful names for Xcodes with '.' in it's name, e.g. for Xcode-1.2.3.app Qbs will create xcode-1_2_3 profile. Change-Id: I9ca30eefd28454c4f8e4629c297618e0d550225e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/app/qbs-setup-toolchains/xcodeprobe.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/app/qbs-setup-toolchains/xcodeprobe.cpp b/src/app/qbs-setup-toolchains/xcodeprobe.cpp
index 6c3d8a1b3..6f740a93a 100644
--- a/src/app/qbs-setup-toolchains/xcodeprobe.cpp
+++ b/src/app/qbs-setup-toolchains/xcodeprobe.cpp
@@ -63,7 +63,7 @@ using Internal::Tr;
static const QString defaultDeveloperPath =
QStringLiteral("/Applications/Xcode.app/Contents/Developer");
static const std::regex defaultDeveloperPathRegex(
- "^/Applications/Xcode([a-zA-Z0-9 _-]+)\\.app/Contents/Developer$");
+ "^/Applications/Xcode([a-zA-Z0-9 ._-]+)\\.app/Contents/Developer$");
static QString targetOS(const QString &applePlatformName)
{
@@ -218,8 +218,9 @@ void XcodeProbe::detectAll()
const auto devPath = developerPath.toStdString();
std::smatch match;
if (std::regex_match(devPath, match, defaultDeveloperPathRegex))
- profileName += QString::fromStdString(match[1]).toLower().replace(QLatin1Char(' '),
- QLatin1Char('-'));
+ profileName += QString::fromStdString(match[1]).toLower().
+ replace(QLatin1Char(' '), QLatin1Char('-')).
+ replace(QLatin1Char('.'), QLatin1Char('_'));
else
profileName += QString::number(i++);
}