diff options
author | Tim Jenssen <[email protected]> | 2014-08-01 11:13:13 +0200 |
---|---|---|
committer | Christian Stenger <[email protected]> | 2014-08-01 11:17:30 +0200 |
commit | 186f82a730a2bdc46d0845ae3f4a845c391b7082 (patch) | |
tree | 285ba397e1baa9bef78b030b0b5652fa4b6abe09 | |
parent | 2bfd14dbf855f1f585a6a1c2b90c87cd076261d0 (diff) |
QmlDesigner: SharedMemory key needs to be the same with all Qtsv3.2.0-rc1
Change-Id: I7b514e3d21f0874fec35331e7fd73c209e9b30d7
Reviewed-by: Christian Stenger <[email protected]>
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/container/sharedmemory_unix.cpp | 8 |
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 a685b9fd407..9269f7a9e37 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 } |