diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-08 10:54:50 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-09 09:58:25 +0000 |
commit | 525165a38302cf43a908a93f57a3a88cd6abc0e0 (patch) | |
tree | ac7de05bb77d0ad4f25c6c4149850ab825e360ab /tests/auto/shared.h | |
parent | dd4f79167e15c563c521663a05143c18063d22f2 (diff) | |
download | qbs-525165a38302cf43a908a93f57a3a88cd6abc0e0.tar.gz |
Remove the profile name from the unique product name
If the product is multiplexed by profile, its name is already uniquified
by the multiplex id. If the product is not multiplexed, we don't need to
make the name unique.
This removes references to the top-level profile name from the build
directory structure, which can be helpful when rebuilding with a
different profile name, but the same effective properties. Also, it
shortens the paths of generated artifacts in the common case.
Change-Id: I1586049b9650542732a64be4b7d5f2db4428d87e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/shared.h')
-rw-r--r-- | tests/auto/shared.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/auto/shared.h b/tests/auto/shared.h index 98e84e8c1..9c9c10df0 100644 --- a/tests/auto/shared.h +++ b/tests/auto/shared.h @@ -81,19 +81,16 @@ inline QString prefixedIfNonEmpty(const T &prefix, const QString &str) return prefix + str; } -inline QString uniqueProductName(const QString &productName, const QString &_profileName, +inline QString uniqueProductName(const QString &productName, const QString &multiplexConfigurationId) { - const QString p = _profileName.isEmpty() ? profileName() : _profileName; - return productName + '.' + p + prefixedIfNonEmpty(QLatin1Char('.'), multiplexConfigurationId); + return productName + prefixedIfNonEmpty(QLatin1Char('.'), multiplexConfigurationId); } inline QString relativeProductBuildDir(const QString &productName, - const QString &productProfileName = QString(), const QString &multiplexConfigurationId = QString()) { - const QString fullName = uniqueProductName(productName, productProfileName, - multiplexConfigurationId); + const QString fullName = uniqueProductName(productName, multiplexConfigurationId); QString dirName = qbs::Internal::HostOsInfo::rfc1034Identifier(fullName); const QByteArray hash = QCryptographicHash::hash(fullName.toUtf8(), QCryptographicHash::Sha1); dirName.append('.').append(hash.toHex().left(8)); |