diff options
Diffstat (limited to 'tests/auto/quickcontrols/controls/macos')
-rw-r--r-- | tests/auto/quickcontrols/controls/macos/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/auto/quickcontrols/controls/macos/tst_macos.cpp | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/quickcontrols/controls/macos/CMakeLists.txt b/tests/auto/quickcontrols/controls/macos/CMakeLists.txt index 04d186c63f..0d2e523a2a 100644 --- a/tests/auto/quickcontrols/controls/macos/CMakeLists.txt +++ b/tests/auto/quickcontrols/controls/macos/CMakeLists.txt @@ -4,7 +4,7 @@ if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) cmake_minimum_required(VERSION 3.16) project(tst_macos LANGUAGES C CXX ASM) - find_package(Qt6BuildInternals COMPONENTS STANDALONE_TEST) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) endif() # Collect test data diff --git a/tests/auto/quickcontrols/controls/macos/tst_macos.cpp b/tests/auto/quickcontrols/controls/macos/tst_macos.cpp index 59c8585f03..91ce22cc0b 100644 --- a/tests/auto/quickcontrols/controls/macos/tst_macos.cpp +++ b/tests/auto/quickcontrols/controls/macos/tst_macos.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// 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 <QtQuickTest/quicktest.h> #include <QtQuickControls2/qquickstyle.h> @@ -10,6 +10,9 @@ int main(int argc, char *argv[]) qputenv("QML_NO_TOUCH_COMPRESSION", "1"); // See comment in tst_windows.cpp. qputenv("QT_QUICK_CONTROLS_IGNORE_CUSTOMIZATION_WARNINGS", "1"); + // The tests were originally written before native menus existed, + // and some of them try to open menus, which we can't test natively. + QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows); QQuickStyle::setStyle("macOS"); return quick_test_main(argc, argv, "tst_controls::macOS", TST_CONTROLS_DATA); } |