diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-08-19 11:57:32 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2022-08-26 14:15:24 +0200 |
commit | b057e32dc455d81f9378d6bd0c58888a7eddd155 (patch) | |
tree | 4593833c6d28a8bd9ea8c5eb834c25a707f06360 /tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp | |
parent | 804172f23c3c02f05410414eddfcac913b71b0a3 (diff) |
Port tests away from using q{Set}GlobalQHashSeed
These functions are marked as deprecated in future Qt releases.
Task-number: QTBUG-104858
Change-Id: I25d2932455d8c9e3e2d722b1c48fc2cfa2d1e679
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp index d060f50609..2d04579253 100644 --- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp +++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp @@ -53,7 +53,9 @@ private Q_SLOTS: void stdPair_string_pairIntInt() { stdPair_template(QString("Hello"), std::make_pair(42, -47)); } // QTBUG-92910 void stdPair_int_pairIntPairIntInt() { stdPair_template(1, std::make_pair(2, std::make_pair(3, 4))); } +#if QT_DEPRECATED_SINCE(6, 6) void setGlobalQHashSeed(); +#endif }; void tst_QHashFunctions::consistent() @@ -370,8 +372,10 @@ void tst_QHashFunctions::stdPair_template(const T1 &t1, const T2 &t2) QCOMPARE(qHash(vpair, seed), qHash(vpair, seed)); } +#if QT_DEPRECATED_SINCE(6, 6) void tst_QHashFunctions::setGlobalQHashSeed() { +QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED // Setter works as advertised qSetGlobalQHashSeed(0); QCOMPARE(qGlobalQHashSeed(), 0); @@ -384,7 +388,9 @@ void tst_QHashFunctions::setGlobalQHashSeed() // Reset works as advertised qSetGlobalQHashSeed(-1); QVERIFY(qGlobalQHashSeed() > 0); +QT_WARNING_POP } +#endif // QT_DEPRECATED_SINCE(6, 6) QTEST_APPLESS_MAIN(tst_QHashFunctions) #include "tst_qhashfunctions.moc" |