aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/shared.h')
-rw-r--r--tests/auto/shared.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/auto/shared.h b/tests/auto/shared.h
index ea45f727e..67ea19128 100644
--- a/tests/auto/shared.h
+++ b/tests/auto/shared.h
@@ -64,14 +64,7 @@ inline QString relativeProductBuildDir(const QString &productName,
const QString &profileName = QString())
{
const QString fullName = uniqueProductName(productName, profileName);
- QString dirName = fullName;
- for (int i = 0; i < dirName.count(); ++i) {
- QCharRef c = dirName[i];
- const bool okChar = (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z')
- || (c >= 'a' && c <= 'z') || c == '_' || c == '.';
- if (!okChar)
- c = QChar::fromLatin1('_');
- }
+ QString dirName = qbs::Internal::HostOsInfo::rfc1034Identifier(fullName);
const QByteArray hash = QCryptographicHash::hash(fullName.toUtf8(), QCryptographicHash::Sha1);
dirName.append('.').append(hash.toHex().left(8));
return relativeBuildDir() + '/' + dirName;