diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-22 11:45:22 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2021-08-31 16:10:57 +0200 |
commit | 023a09ff5e2722d5192752ae95733a8c8bf9a295 (patch) | |
tree | 9b7b472d6e71feba526a920cdf8f0107c998eec4 /tests | |
parent | f6ca497fe43b0f5e976f296e8a4d425516508e51 (diff) |
Test Windows style in tests/auto/quickcontrols2/controls
The goal is to fix the failing tests (which are blacklisted here) in
upcoming patches.
Task-number: QTBUG-95679
Change-Id: Ia34ab03732fc130ea95e88c6196efcff7fc8b46e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 3e812a04ada440707954ab327157915b7911bb8f)
Diffstat (limited to 'tests')
5 files changed, 165 insertions, 0 deletions
diff --git a/tests/auto/quickcontrols2/controls/CMakeLists.txt b/tests/auto/quickcontrols2/controls/CMakeLists.txt index 9e80b76580..f3fa8382b6 100644 --- a/tests/auto/quickcontrols2/controls/CMakeLists.txt +++ b/tests/auto/quickcontrols2/controls/CMakeLists.txt @@ -5,3 +5,6 @@ add_subdirectory(fusion) add_subdirectory(imagine) add_subdirectory(material) add_subdirectory(universal) +if(WIN32) + add_subdirectory(windows) +endif() diff --git a/tests/auto/quickcontrols2/controls/windows/BLACKLIST b/tests/auto/quickcontrols2/controls/windows/BLACKLIST new file mode 100644 index 0000000000..422683648a --- /dev/null +++ b/tests/auto/quickcontrols2/controls/windows/BLACKLIST @@ -0,0 +1,93 @@ +# See qtbase/src/testlib/qtestblacklist.cpp for format + +# QTBUG-70597 +[Tumbler::test_itemsCorrectlyPositioned] +* + +# QTBUG-95679 +# Blacklisted in order to get the native windows style under +# regression control +[Button::test_display:TextBesideIcon] +* +[Button::test_display:TextBesideIcon, mirrored] +* +[Button::test_spacing] +* +[ComboBox::test_defaults] +* +[ComboBox::test_font] +* +[ComboBox::test_implicitContentWidthPolicy_WidestText:Array] +* +[ComboBox::test_implicitContentWidthPolicy_WidestText:ListModel] +* +[ComboBox::test_implicitContentWidthPolicy_WidestTextWhenCompleted:Array] +* +[ComboBox::test_implicitContentWidthPolicy_WidestTextWhenCompleted:ListModel] +* +[Popup::test_font] +* +[ScrollBar::test_flashing] +* +[ScrollBar::test_interactive:true] +* +[ScrollBar::test_mouse:horizontal] +* +[ScrollBar::test_mouse:vertical] +* +[ScrollBar::test_multiTouch] +* +[ScrollBar::test_policy] +* +[ScrollBar::test_snapMode_mouse:NoSnap] +* +[ScrollBar::test_snapMode_mouse:NoSnap2] +* +[ScrollBar::test_snapMode_mouse:SnapAlways] +* +[ScrollBar::test_snapMode_mouse:SnapAlways2] +* +[ScrollBar::test_snapMode_mouse:SnapOnRelease] +* +[ScrollBar::test_snapMode_mouse:SnapOnRelease2] +* +[ScrollBar::test_snapMode_touch:NoSnap] +* +[ScrollBar::test_snapMode_touch:NoSnap2] +* +[ScrollBar::test_snapMode_touch:SnapAlways] +* +[ScrollBar::test_snapMode_touch:SnapAlways2] +* +[ScrollBar::test_snapMode_touch:SnapOnRelease] +* +[ScrollBar::test_snapMode_touch:SnapOnRelease2] +* +[ScrollBar::test_touch:horizontal] +* +[ScrollBar::test_touch:vertical] +* +[ScrollView::test_keys] +* +[Slider::test_snapMode_touch:NoSnap] +* +[Slider::test_snapMode_touch:SnapAlways (0..2)] +* +[Slider::test_snapMode_touch:SnapAlways (1..3)] +* +[Slider::test_snapMode_touch:SnapAlways (-1..1)] +* +[Slider::test_snapMode_touch:SnapAlways (1..-1)] +* +[Slider::test_snapMode_touch:SnapOnRelease (0..2)] +* +[Slider::test_snapMode_touch:SnapOnRelease (1..3)] +* +[Slider::test_snapMode_touch:SnapOnRelease (-1..1)] +* +[Slider::test_snapMode_touch:SnapOnRelease (1..-1)] +* +[TextArea::test_implicitSize] +* +[TextField::test_implicitSize] +* diff --git a/tests/auto/quickcontrols2/controls/windows/CMakeLists.txt b/tests/auto/quickcontrols2/controls/windows/CMakeLists.txt new file mode 100644 index 0000000000..33755c1bbd --- /dev/null +++ b/tests/auto/quickcontrols2/controls/windows/CMakeLists.txt @@ -0,0 +1,18 @@ +# Collect test data +file(GLOB_RECURSE test_data_glob + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../data/tst_*) +list(APPEND test_data ${test_data_glob}) + +qt_internal_add_test(tst_windows + GUI + QMLTEST + SOURCES + tst_windows.cpp + DEFINES + TST_CONTROLS_DATA=\\\"${CMAKE_CURRENT_SOURCE_DIR}/../data\\\" + PUBLIC_LIBRARIES + Qt::Gui + Qt::QuickControls2 + TESTDATA ${test_data} +) diff --git a/tests/auto/quickcontrols2/controls/windows/dependencies.qml b/tests/auto/quickcontrols2/controls/windows/dependencies.qml new file mode 100644 index 0000000000..f7d87422b5 --- /dev/null +++ b/tests/auto/quickcontrols2/controls/windows/dependencies.qml @@ -0,0 +1,5 @@ +import QtTest +import QtQuick +import QtQuick.Controls + +TestCase { } diff --git a/tests/auto/quickcontrols2/controls/windows/tst_windows.cpp b/tests/auto/quickcontrols2/controls/windows/tst_windows.cpp new file mode 100644 index 0000000000..b4a187bca7 --- /dev/null +++ b/tests/auto/quickcontrols2/controls/windows/tst_windows.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtQuickTest/quicktest.h> +#include <QtQuickControls2/qquickstyle.h> + +int main(int argc, char *argv[]) +{ + QTEST_SET_MAIN_SOURCE_PATH + qputenv("QML_NO_TOUCH_COMPRESSION", "1"); + QQuickStyle::setStyle("Windows"); + return quick_test_main(argc, argv, "tst_controls::Windows", TST_CONTROLS_DATA); +} |