aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp b/share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp
index a685b9fd40..9269f7a9e3 100644
--- a/share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp
+++ b/share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp
@@ -102,17 +102,13 @@ static QByteArray makePlatformSafeKey(const QString &key)
{
if (key.isEmpty())
return QByteArray();
-#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
QByteArray data(QCryptographicHash::hash(key.toLatin1(), QCryptographicHash::Sha1).toBase64());
- QString ambiguousChars(QStringLiteral("[=~<>|?*!@#$%^&:,; \\\\]"));
+ QString notBase64UrlChars(QStringLiteral("[=+/]"));
QByteArray normalizedData;
- normalizedData = QString(data).replace(QRegExp(ambiguousChars), QStringLiteral("_")).toLatin1();
+ normalizedData = QString(data).replace(QRegExp(notBase64UrlChars), QStringLiteral("_")).toLatin1();
return normalizedData;
-#else
- return QCryptographicHash::hash(key.toLatin1(), QCryptographicHash::Sha1).toBase64(QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals);
-#endif
}