diff --git a/src/widgets/kernel/qsizepolicy.cpp b/src/widgets/kernel/qsizepolicy.cpp index c354d14f5e1..fe34ef5982b 100644 --- a/src/widgets/kernel/qsizepolicy.cpp +++ b/src/widgets/kernel/qsizepolicy.cpp @@ -317,9 +317,8 @@ void QSizePolicy::setControlType(ControlType type) noexcept */ /*! - \fn size_t qHash(QSizePolicy key, size_t seed = 0) + \fn size_t QSizePolicy::qHash(QSizePolicy key, size_t seed = 0) \since 5.6 - \relates QSizePolicy Returns the hash value for \a key, using \a seed to seed the calculation. diff --git a/src/widgets/kernel/qsizepolicy.h b/src/widgets/kernel/qsizepolicy.h index 5e948175f31..53c7afc9069 100644 --- a/src/widgets/kernel/qsizepolicy.h +++ b/src/widgets/kernel/qsizepolicy.h @@ -43,14 +43,13 @@ #include #include #include +#include QT_BEGIN_NAMESPACE class QVariant; class QSizePolicy; -Q_DECL_CONST_FUNCTION inline size_t qHash(QSizePolicy key, size_t seed = 0) noexcept; - class Q_WIDGETS_EXPORT QSizePolicy { Q_GADGET @@ -122,7 +121,7 @@ public: constexpr bool operator==(const QSizePolicy& s) const noexcept { return data == s.data; } constexpr bool operator!=(const QSizePolicy& s) const noexcept { return data != s.data; } - friend Q_DECL_CONST_FUNCTION size_t qHash(QSizePolicy key, size_t seed) noexcept { return qHash(key.data, seed); } + friend Q_DECL_CONST_FUNCTION size_t qHash(QSizePolicy key, size_t seed = 0) noexcept { return qHash(key.data, seed); } operator QVariant() const;