diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-04-16 12:54:59 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-04-16 14:47:55 +0200 |
commit | c3fcbe73189b26e49ad8fa824b2b8e6b7db0a8f4 (patch) | |
tree | b603742c87fcb512c13a5eb2a02a3ff59c34d543 /src/qml/qml | |
parent | 3768ec496cb8be1b8bedafd08c19732a405dfeea (diff) |
Change qHash return value to size_t
Else on Windows there's a warning:
conversion from 'size_t' to 'uint', possible loss of data
Change-Id: Ifed4899409a13fed31c206ae1e0f195280ee2925
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/ftw/qhashedstring_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlmetatypedata_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlprivate.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlproperty.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmltype_p.h | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h index a2e10ff143..08f019b4bd 100644 --- a/src/qml/qml/ftw/qhashedstring_p.h +++ b/src/qml/qml/ftw/qhashedstring_p.h @@ -172,12 +172,12 @@ private: mutable quint32 m_hash = 0; }; -inline uint qHash(const QHashedString &string) +inline size_t qHash(const QHashedString &string) { return uint(string.hash()); } -inline uint qHash(const QHashedStringRef &string) +inline size_t qHash(const QHashedStringRef &string) { return uint(string.hash()); } diff --git a/src/qml/qml/qqmlmetatypedata_p.h b/src/qml/qml/qqmlmetatypedata_p.h index 322ead084a..727e57a6de 100644 --- a/src/qml/qml/qqmlmetatypedata_p.h +++ b/src/qml/qml/qqmlmetatypedata_p.h @@ -136,7 +136,7 @@ private: QStringList *m_typeRegistrationFailures = nullptr; }; -inline uint qHash(const QQmlMetaTypeData::VersionedUri &v) +inline size_t qHash(const QQmlMetaTypeData::VersionedUri &v) { return v.uri.hash() ^ qHash(v.majorVersion); } diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h index 259deb5f32..78d6d05291 100644 --- a/src/qml/qml/qqmlprivate.h +++ b/src/qml/qml/qqmlprivate.h @@ -92,7 +92,7 @@ typedef void (*IRLoaderFunction)(Document *, const QQmlPrivate::CachedQmlUnit *) using QQmlAttachedPropertiesFunc = QQmlPrivate::QQmlAttachedPropertiesFunc<QObject>; -inline uint qHash(QQmlAttachedPropertiesFunc func, uint seed = 0) +inline size_t qHash(QQmlAttachedPropertiesFunc func, uint seed = 0) { return qHash(quintptr(func), seed); } diff --git a/src/qml/qml/qqmlproperty.h b/src/qml/qml/qqmlproperty.h index 34eab8208c..2fd14719c6 100644 --- a/src/qml/qml/qqmlproperty.h +++ b/src/qml/qml/qqmlproperty.h @@ -127,7 +127,7 @@ private: }; typedef QList<QQmlProperty> QQmlProperties; -inline uint qHash (const QQmlProperty &key) +inline size_t qHash (const QQmlProperty &key) { return qHash(key.object()) + qHash(key.name()); } diff --git a/src/qml/qml/qqmltype_p.h b/src/qml/qml/qqmltype_p.h index 7f224b3f60..eb3a773181 100644 --- a/src/qml/qml/qqmltype_p.h +++ b/src/qml/qml/qqmltype_p.h @@ -199,11 +199,11 @@ public: private: friend class QQmlTypePrivate; - friend uint qHash(const QQmlType &t, uint seed); + friend size_t qHash(const QQmlType &t, uint seed); QQmlRefPointer<const QQmlTypePrivate> d; }; -inline uint qHash(const QQmlType &t, uint seed = 0) +inline size_t qHash(const QQmlType &t, uint seed = 0) { return qHash(reinterpret_cast<quintptr>(t.d.data()), seed); } |