diff options
Diffstat (limited to 'tests/auto/corelib/global/qrandomgenerator')
-rw-r--r-- | tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt index b9468caabb..3d8f892414 100644 --- a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt +++ b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qrandomgenerator Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qrandomgenerator LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qrandomgenerator SOURCES tst_qrandomgenerator.cpp diff --git a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp index d0b1803d55..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); |