diff options
Diffstat (limited to 'tests/auto/widgets/widgets/qfocusframe')
-rw-r--r-- | tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt | 11 | ||||
-rw-r--r-- | tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt b/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt index d5e32e9337..5e2f3bd955 100644 --- a/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt +++ b/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt @@ -1,13 +1,20 @@ -# Generated from qfocusframe.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_qfocusframe Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qfocusframe LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qfocusframe SOURCES tst_qfocusframe.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp index 92038cfa3a..560ba686cc 100644 --- a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp +++ b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 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 <QTest> @@ -70,7 +70,7 @@ void tst_QFocusFrame::focusFrameInsideScrollview() window.show(); QFocusFrame *focusFrame = nullptr; - QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>()); + QTRY_VERIFY((focusFrame = window.findChild<QFocusFrame *>())); const QPoint initialOffset = focusFrame->widget()->mapToGlobal(QPoint()) - focusFrame->mapToGlobal(QPoint()); tableView.scrollTo(itemModel->index(40, 0)); |