diff options
author | Christian Stenger <christian.stenger@qt.io> | 2022-05-24 07:49:54 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2022-05-24 07:46:07 +0000 |
commit | 37445824e36746d6b2522e4860ccf4fc3c8ca87f (patch) | |
tree | c3a446f69d4f65fbd74802d303e669c04aed8325 /share | |
parent | f09d4538e73dfd86e748d62fe8dba56c5a716cc7 (diff) |
QmlDesigner: Fix puppet build for Qt5
Amends f09d4538e73dfd8.
Change-Id: Ibff8b834e65fd18f6345431c8729b7592eab0c5c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/commands/requestmodelnodepreviewimagecommand.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/commands/requestmodelnodepreviewimagecommand.h b/share/qtcreator/qml/qmlpuppet/commands/requestmodelnodepreviewimagecommand.h index 773656048cd..9979bccd783 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/requestmodelnodepreviewimagecommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/requestmodelnodepreviewimagecommand.h @@ -64,9 +64,15 @@ inline bool operator==(const RequestModelNodePreviewImageCommand &first, && first.renderItemId() == second.renderItemId(); } -inline size_t qHash(const RequestModelNodePreviewImageCommand &key, size_t seed) +inline size_t qHash(const RequestModelNodePreviewImageCommand &key, size_t seed = 0) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + return ::qHash(key.instanceId(), seed) + ^ ::qHash(std::make_pair(key.size().width(), key.size().height()), seed) + ^ ::qHash(key.componentPath(), seed) ^ ::qHash(key.renderItemId(), seed); +#else return qHashMulti(seed, key.instanceId(), key.size(), key.componentPath(), key.renderItemId()); +#endif } QDataStream &operator<<(QDataStream &out, const RequestModelNodePreviewImageCommand &command); |