aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-09-17 09:54:58 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-09-17 11:23:00 +0200
commitf1d37d999bf4088b430c7a42c78ddb5ec827a916 (patch)
treeaa2ad84719211f09cb8266bfa6fcb0a92416d805 /src/quick/scenegraph
parent8ca9191580e218e5359c6703a42ae9595e4aca1f (diff)
Match new qHash() signature
As documented in Qt 6 porting guide, qHash() should now also accept a size_t as seed in addition to returning it. Change-Id: I2b3ea26f631203468c071fa6ff65f95d82566132 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h4
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture_p.h2
-rw-r--r--src/quick/scenegraph/qsgrhishadereffectnode.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 51b9df0f45..8091ccad5d 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -3904,7 +3904,7 @@ bool operator!=(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW
return !(a == b);
}
-size_t qHash(const GraphicsState &s, uint seed) Q_DECL_NOTHROW
+size_t qHash(const GraphicsState &s, size_t seed) Q_DECL_NOTHROW
{
// do not bother with all fields
return seed
@@ -3932,7 +3932,7 @@ bool operator!=(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKe
return !(a == b);
}
-size_t qHash(const GraphicsPipelineStateKey &k, uint seed) Q_DECL_NOTHROW
+size_t qHash(const GraphicsPipelineStateKey &k, size_t seed) Q_DECL_NOTHROW
{
// no srb and rp included due to their special comparison semantics and lack of hash keys
return qHash(k.state, seed) + qHash(k.sms->programRhi.program, seed);
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
index 54652df923..4a46246ecd 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
@@ -644,7 +644,7 @@ struct GraphicsState
bool operator==(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW;
bool operator!=(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW;
-size_t qHash(const GraphicsState &s, uint seed = 0) Q_DECL_NOTHROW;
+size_t qHash(const GraphicsState &s, size_t seed = 0) Q_DECL_NOTHROW;
struct ShaderManagerShader;
@@ -658,7 +658,7 @@ struct GraphicsPipelineStateKey
bool operator==(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) Q_DECL_NOTHROW;
bool operator!=(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) Q_DECL_NOTHROW;
-size_t qHash(const GraphicsPipelineStateKey &k, uint seed = 0) Q_DECL_NOTHROW;
+size_t qHash(const GraphicsPipelineStateKey &k, size_t seed = 0) Q_DECL_NOTHROW;
struct ShaderManagerShader
{
diff --git a/src/quick/scenegraph/coreapi/qsgtexture.cpp b/src/quick/scenegraph/coreapi/qsgtexture.cpp
index 66ba477990..0f75e7e04b 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture.cpp
+++ b/src/quick/scenegraph/coreapi/qsgtexture.cpp
@@ -84,7 +84,7 @@ bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b)
return !(a == b);
}
-size_t qHash(const QSGSamplerDescription &s, uint seed) Q_DECL_NOTHROW
+size_t qHash(const QSGSamplerDescription &s, size_t seed) Q_DECL_NOTHROW
{
const int f = s.filtering;
const int m = s.mipmapFiltering;
diff --git a/src/quick/scenegraph/coreapi/qsgtexture_p.h b/src/quick/scenegraph/coreapi/qsgtexture_p.h
index 594cd223f7..05e008978a 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture_p.h
+++ b/src/quick/scenegraph/coreapi/qsgtexture_p.h
@@ -72,7 +72,7 @@ Q_DECLARE_TYPEINFO(QSGSamplerDescription, Q_MOVABLE_TYPE);
bool operator==(const QSGSamplerDescription &a, const QSGSamplerDescription &b) Q_DECL_NOTHROW;
bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b) Q_DECL_NOTHROW;
-size_t qHash(const QSGSamplerDescription &s, uint seed = 0) Q_DECL_NOTHROW;
+size_t qHash(const QSGSamplerDescription &s, size_t seed = 0) Q_DECL_NOTHROW;
#if QT_CONFIG(opengl)
class Q_QUICK_PRIVATE_EXPORT QSGTexturePlatformOpenGL : public QPlatformInterface::QSGOpenGLTexture
diff --git a/src/quick/scenegraph/qsgrhishadereffectnode.cpp b/src/quick/scenegraph/qsgrhishadereffectnode.cpp
index 5c756721f0..57d12a8cf3 100644
--- a/src/quick/scenegraph/qsgrhishadereffectnode.cpp
+++ b/src/quick/scenegraph/qsgrhishadereffectnode.cpp
@@ -188,7 +188,7 @@ struct QSGRhiShaderMaterialTypeCache
QHash<Key, QSGMaterialType *> m_types;
};
-size_t qHash(const QSGRhiShaderMaterialTypeCache::Key &key, uint seed = 0)
+size_t qHash(const QSGRhiShaderMaterialTypeCache::Key &key, size_t seed = 0)
{
size_t hash = seed;
for (int i = 0; i < 2; ++i)