From 186f82a730a2bdc46d0845ae3f4a845c391b7082 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Fri, 1 Aug 2014 11:13:13 +0200 Subject: QmlDesigner: SharedMemory key needs to be the same with all Qts Change-Id: I7b514e3d21f0874fec35331e7fd73c209e9b30d7 Reviewed-by: Christian Stenger --- share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp | 8 ++------ 1 file 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 } -- cgit v1.2.3