diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-11 18:01:13 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-11 18:10:41 +0100 |
commit | f4d8cafc1b034f544ca84b849c23ab99bc1600e7 (patch) | |
tree | f1150b5aeaec4753f2ddfcd17643666b3a82dd9d /src/widgets/styles/qstylehelper.cpp | |
parent | e5b422382a512a8267a0eb24e6543a8cf84478d9 (diff) | |
parent | b03133231b99922a72831c4ec23faf55516ef404 (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
src/3rdparty/harfbuzz-ng/src/hb-private.hh
src/sql/doc/snippets/code/doc_src_sql-driver.cpp
src/sql/doc/src/sql-driver.qdoc
Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
Diffstat (limited to 'src/widgets/styles/qstylehelper.cpp')
-rw-r--r-- | src/widgets/styles/qstylehelper.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp index 4f498efac0..373699a7aa 100644 --- a/src/widgets/styles/qstylehelper.cpp +++ b/src/widgets/styles/qstylehelper.cpp @@ -51,8 +51,6 @@ #include "qstylehelper_p.h" #include <qstringbuilder.h> -#include <qdatastream.h> -#include <qcryptographichash.h> QT_BEGIN_NAMESPACE @@ -66,6 +64,7 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize & QString tmp = key % HexString<uint>(option->state) % HexString<uint>(option->direction) % HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u) + % HexString<quint64>(option->palette.cacheKey()) % HexString<uint>(size.width()) % HexString<uint>(size.height()); @@ -77,24 +76,6 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize & } #endif // QT_CONFIG(spinbox) - // QTBUG-56743, try to create a palette cache key reflecting the value, - // as leaks may occur in conjunction with QStyleSheetStyle/QRenderRule modifying - // palettes when using QPalette::cacheKey() - if (option->palette != QGuiApplication::palette()) { - tmp.append(QLatin1Char('P')); -#ifndef QT_NO_DATASTREAM - QByteArray key; - key.reserve(5120); // Observed 5040B for a serialized palette on 64bit - { - QDataStream str(&key, QIODevice::WriteOnly); - str << option->palette; - } - const QByteArray sha1 = QCryptographicHash::hash(key, QCryptographicHash::Sha1).toHex(); - tmp.append(QString::fromLatin1(sha1)); -#else // QT_NO_DATASTREAM - tmp.append(QString::number(option->palette.cacheKey(), 16)); -#endif // !QT_NO_DATASTREAM - } return tmp; } |