diff options
Diffstat (limited to 'tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp')
-rw-r--r-- | tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp index 9ada7352b4..a32045bbbb 100644 --- a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp +++ b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2017 Intel Corporation. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <qlist.h> @@ -128,6 +128,9 @@ void tst_QRandomGenerator::basics() QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wself-move") QT_WARNING_DISABLE_CLANG("-Wself-assign-overloaded") +#if defined(Q_CC_GNU_ONLY) && Q_CC_GNU >= 1301 +QT_WARNING_DISABLE_GCC("-Wself-move") +#endif // copyable && movable rng = rng; rng = std::move(rng); @@ -610,7 +613,7 @@ template <typename UInt> static void boundedQuality_template() QVector<UInt> buffer(BufferCount, filler); generate(buffer.begin(), buffer.end(), [&] { return rng.bounded(Bound); }); - for (UInt value : qAsConst(buffer)) { + for (UInt value : std::as_const(buffer)) { QVERIFY(value < Bound); histogram[value]++; } |