aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/quickcontrols2/testbench
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/quickcontrols2/testbench')
-rw-r--r--tests/manual/quickcontrols2/testbench/+Imagine/ApplicationWindow.qml55
-rw-r--r--tests/manual/quickcontrols2/testbench/+Imagine/ContentPane.qml55
-rw-r--r--tests/manual/quickcontrols2/testbench/+Imagine/Dialog.qml55
-rw-r--r--tests/manual/quickcontrols2/testbench/+Imagine/Menu.qml55
-rw-r--r--tests/manual/quickcontrols2/testbench/+Imagine/ToolBar.qml57
-rw-r--r--tests/manual/quickcontrols2/testbench/.gitignore83
-rw-r--r--tests/manual/quickcontrols2/testbench/ApplicationWindow.qml53
-rw-r--r--tests/manual/quickcontrols2/testbench/CMakeLists.txt115
-rw-r--r--tests/manual/quickcontrols2/testbench/ColorEditor.qml80
-rw-r--r--tests/manual/quickcontrols2/testbench/ContentPane.qml53
-rw-r--r--tests/manual/quickcontrols2/testbench/ControlContainer.qml70
-rw-r--r--tests/manual/quickcontrols2/testbench/Dialog.qml53
-rw-r--r--tests/manual/quickcontrols2/testbench/ExampleContainer.qml83
-rw-r--r--tests/manual/quickcontrols2/testbench/Menu.qml53
-rw-r--r--tests/manual/quickcontrols2/testbench/README.md35
-rw-r--r--tests/manual/quickcontrols2/testbench/SettingsDialog.qml447
-rw-r--r--tests/manual/quickcontrols2/testbench/ToolBar.qml53
-rw-r--r--tests/manual/quickcontrols2/testbench/assetfixer.cpp564
-rw-r--r--tests/manual/quickcontrols2/testbench/assetfixer.h126
-rw-r--r--tests/manual/quickcontrols2/testbench/clipboard.cpp124
-rw-r--r--tests/manual/quickcontrols2/testbench/clipboard.h72
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/BusyIndicator.qml65
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Button.qml90
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/CheckBox.qml74
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/CheckDelegate.qml87
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/ComboBox.qml71
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/DelayButton.qml72
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Dial.qml65
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Dialog.qml87
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Frame.qml64
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/GroupBox.qml66
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/ItemDelegate.qml84
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Label.qml66
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Menu.qml121
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/MenuBar.qml79
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Page.qml68
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/PageIndicator.qml111
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Pane.qml68
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/ProgressBar.qml66
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/RadioButton.qml73
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/RadioDelegate.qml86
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/RangeSlider.qml69
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/RoundButton.qml88
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/ScrollBar.qml114
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/ScrollIndicator.qml104
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Slider.qml69
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/SpinBox.qml78
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/SplitView.qml79
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/SwipeDelegate.qml106
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Switch.qml76
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/SwitchDelegate.qml86
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/TabBar.qml81
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/TextArea.qml73
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/TextField.qml73
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/ToolBar.qml87
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/ToolTip.qml67
-rw-r--r--tests/manual/quickcontrols2/testbench/controls/Tumbler.qml67
-rw-r--r--tests/manual/quickcontrols2/testbench/deployment.pri14
-rw-r--r--tests/manual/quickcontrols2/testbench/directoryvalidator.cpp102
-rw-r--r--tests/manual/quickcontrols2/testbench/directoryvalidator.h84
-rw-r--r--tests/manual/quickcontrols2/testbench/fonts.qrc5
-rw-r--r--tests/manual/quickcontrols2/testbench/fonts/LICENSE.txt12
-rw-r--r--tests/manual/quickcontrols2/testbench/fonts/fontawesome.ttfbin5464 -> 0 bytes
-rw-r--r--tests/manual/quickcontrols2/testbench/main.cpp94
-rw-r--r--tests/manual/quickcontrols2/testbench/qml.qrc55
-rw-r--r--tests/manual/quickcontrols2/testbench/testbench.pro24
-rw-r--r--tests/manual/quickcontrols2/testbench/testbench.qml533
67 files changed, 0 insertions, 6144 deletions
diff --git a/tests/manual/quickcontrols2/testbench/+Imagine/ApplicationWindow.qml b/tests/manual/quickcontrols2/testbench/+Imagine/ApplicationWindow.qml
deleted file mode 100644
index a8e49b07..00000000
--- a/tests/manual/quickcontrols2/testbench/+Imagine/ApplicationWindow.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls.Imagine
-
-ApplicationWindow {
- Imagine.path: defaultImaginePath
-}
diff --git a/tests/manual/quickcontrols2/testbench/+Imagine/ContentPane.qml b/tests/manual/quickcontrols2/testbench/+Imagine/ContentPane.qml
deleted file mode 100644
index 3e1cad86..00000000
--- a/tests/manual/quickcontrols2/testbench/+Imagine/ContentPane.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls.Imagine
-
-Pane {
- Imagine.path: settings.useCustomImaginePath && settings.imaginePath.length > 0 ? settings.imaginePath : undefined
-}
diff --git a/tests/manual/quickcontrols2/testbench/+Imagine/Dialog.qml b/tests/manual/quickcontrols2/testbench/+Imagine/Dialog.qml
deleted file mode 100644
index 7ea9619e..00000000
--- a/tests/manual/quickcontrols2/testbench/+Imagine/Dialog.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls.Imagine
-
-Dialog {
- Imagine.path: defaultImaginePath
-}
diff --git a/tests/manual/quickcontrols2/testbench/+Imagine/Menu.qml b/tests/manual/quickcontrols2/testbench/+Imagine/Menu.qml
deleted file mode 100644
index 9587e0d4..00000000
--- a/tests/manual/quickcontrols2/testbench/+Imagine/Menu.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls.Imagine
-
-Menu {
- Imagine.path: defaultImaginePath
-}
diff --git a/tests/manual/quickcontrols2/testbench/+Imagine/ToolBar.qml b/tests/manual/quickcontrols2/testbench/+Imagine/ToolBar.qml
deleted file mode 100644
index b1b32894..00000000
--- a/tests/manual/quickcontrols2/testbench/+Imagine/ToolBar.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls.Imagine
-
-ToolBar {
- // Seems to be necessary to get the default assets to be used here,
- // though it should inherit the window's path
- Imagine.path: defaultImaginePath
-}
diff --git a/tests/manual/quickcontrols2/testbench/.gitignore b/tests/manual/quickcontrols2/testbench/.gitignore
deleted file mode 100644
index 75fae8bc..00000000
--- a/tests/manual/quickcontrols2/testbench/.gitignore
+++ /dev/null
@@ -1,83 +0,0 @@
-testbench
-*.png
-*.so
-*.so.*
-*.app
-*.exe
-*.dll
-*.dylib
-*.lib
-*.exp
-*.a
-*.la
-*.core
-*.moc
-*.o
-*.obj
-*.orig
-*.swp
-*.rej
-*.so
-*.pbxuser
-*.mode1
-*.mode1v3
-*_pch.h.cpp
-*_resource.rc
-*~
-.#*
-*.*#
-.qmake.stash
-.qmake.cache
-.qmake.vars
-*.prl
-tags
-.DS_Store
-*.debug
-Makefile*
-*.Debug
-*.Release
-*.prl
-*.pro.user
-*.qmlproject.user*
-moc_*.h
-moc_*.cpp
-ui_*.h
-qrc_*.cpp
-callgrind.out.*
-pcviewer.cfg
-*.flc
-.*.swp
-*.ib_pdb_index
-*.idb
-*.ilk
-*.pdb
-*.sln
-*.suo
-*.vcproj
-*vcproj.*.*.user
-*.ncb
-.pch
-.rcc
-.project
-.cproject
-.make.cache
-android-build
-app_process
-qtc-debugging-helper
-android-*.so-deployment-settings.json
-*.directory
-*_plugin_import.cpp
-*_wrapper.sh
-*_wrapper.bat
-*.mak
-*.xib
-*.plist
-*.pbxproj
-*_plugin_import.cpp
-*.xcsettings
-*.xcscheme
-*.xcodeproj
-qt.conf
-*.version
-*.version.in
-*.qmlc
diff --git a/tests/manual/quickcontrols2/testbench/ApplicationWindow.qml b/tests/manual/quickcontrols2/testbench/ApplicationWindow.qml
deleted file mode 100644
index 3c6785c9..00000000
--- a/tests/manual/quickcontrols2/testbench/ApplicationWindow.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls
-
-ApplicationWindow {}
diff --git a/tests/manual/quickcontrols2/testbench/CMakeLists.txt b/tests/manual/quickcontrols2/testbench/CMakeLists.txt
deleted file mode 100644
index 66933a92..00000000
--- a/tests/manual/quickcontrols2/testbench/CMakeLists.txt
+++ /dev/null
@@ -1,115 +0,0 @@
-# Generated from testbench.pro.
-
-if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
- cmake_minimum_required(VERSION 3.16)
- project(testbench LANGUAGES C CXX ASM)
- find_package(Qt6BuildInternals COMPONENTS STANDALONE_TEST)
-endif()
-
-#####################################################################
-## testbench Binary:
-#####################################################################
-
-qt_internal_add_manual_test(testbench
- GUI
- SOURCES
- assetfixer.cpp assetfixer.h
- clipboard.cpp clipboard.h
- directoryvalidator.cpp directoryvalidator.h
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Gui
- Qt::Qml
- Qt::Quick
- Qt::QuickControls2
- Qt::QuickControls2Private
-)
-
-# Resources:
-set(qml_resource_files
- "+Imagine/ApplicationWindow.qml"
- "+Imagine/ContentPane.qml"
- "+Imagine/Dialog.qml"
- "+Imagine/Menu.qml"
- "+Imagine/ToolBar.qml"
- "ApplicationWindow.qml"
- "ColorEditor.qml"
- "ContentPane.qml"
- "ControlContainer.qml"
- "Dialog.qml"
- "ExampleContainer.qml"
- "Menu.qml"
- "SettingsDialog.qml"
- "ToolBar.qml"
- "controls/BusyIndicator.qml"
- "controls/Button.qml"
- "controls/CheckBox.qml"
- "controls/CheckDelegate.qml"
- "controls/ComboBox.qml"
- "controls/DelayButton.qml"
- "controls/Dial.qml"
- "controls/Dialog.qml"
- "controls/Frame.qml"
- "controls/GroupBox.qml"
- "controls/ItemDelegate.qml"
- "controls/Label.qml"
- "controls/Menu.qml"
- "controls/MenuBar.qml"
- "controls/Page.qml"
- "controls/PageIndicator.qml"
- "controls/Pane.qml"
- "controls/ProgressBar.qml"
- "controls/RadioButton.qml"
- "controls/RadioDelegate.qml"
- "controls/RangeSlider.qml"
- "controls/RoundButton.qml"
- "controls/ScrollBar.qml"
- "controls/ScrollIndicator.qml"
- "controls/Slider.qml"
- "controls/SpinBox.qml"
- "controls/SplitView.qml"
- "controls/SwipeDelegate.qml"
- "controls/Switch.qml"
- "controls/SwitchDelegate.qml"
- "controls/TabBar.qml"
- "controls/TextArea.qml"
- "controls/TextField.qml"
- "controls/ToolBar.qml"
- "controls/ToolTip.qml"
- "controls/Tumbler.qml"
- "testbench.qml"
-)
-
-qt_internal_add_resource(testbench "qml"
- PREFIX
- "/"
- FILES
- ${qml_resource_files}
-)
-set(fonts_resource_files
- "fonts/fontawesome.ttf"
-)
-
-qt_internal_add_resource(testbench "fonts"
- PREFIX
- "/"
- FILES
- ${fonts_resource_files}
-)
-
-
-#### Keys ignored in scope 1:.:.:testbench.pro:<TRUE>:
-# QML_IMPORT_PATH = <EMPTY>
-# TEMPLATE = "app"
-
-## Scopes:
-#####################################################################
-
-#### Keys ignored in scope 3:.:.:deployment.pri:UNIX AND NOT ANDROID:
-# INSTALLS = "target"
-
-#### Keys ignored in scope 5:.:.:deployment.pri:QNX:
-# target.path = "/tmp/$${TARGET}/bin"
-
-#### Keys ignored in scope 6:.:.:deployment.pri:else:
-# target.path = "/opt/$${TARGET}/bin"
diff --git a/tests/manual/quickcontrols2/testbench/ColorEditor.qml b/tests/manual/quickcontrols2/testbench/ColorEditor.qml
deleted file mode 100644
index 2723f33d..00000000
--- a/tests/manual/quickcontrols2/testbench/ColorEditor.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-RowLayout {
- property alias labelText: label.text
- property string toolTipText
- property alias color: textField.text
-
- ToolTip.text: toolTipText
- ToolTip.visible: textField.hovered
-
- Layout.columnSpan: 2
-
- Label {
- id: label
-
- Layout.fillWidth: true
- }
-
- TextField {
- id: textField
-
- validator: RegularExpressionValidator{
- regularExpression: /#?[0-9a-fA-F]*/
- }
-
- Layout.preferredWidth: 200
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/ContentPane.qml b/tests/manual/quickcontrols2/testbench/ContentPane.qml
deleted file mode 100644
index 0a8c2f82..00000000
--- a/tests/manual/quickcontrols2/testbench/ContentPane.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls
-
-Pane {}
diff --git a/tests/manual/quickcontrols2/testbench/ControlContainer.qml b/tests/manual/quickcontrols2/testbench/ControlContainer.qml
deleted file mode 100644
index 4bd99bd3..00000000
--- a/tests/manual/quickcontrols2/testbench/ControlContainer.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-
-Item {
- id: container
-
- implicitWidth: delegate.implicitWidth
- implicitHeight: delegate.implicitHeight
-
- property var controlMetaObject
- property var states
-
- Loader {
- id: delegate
- sourceComponent: controlMetaObject ? controlMetaObject.component : null
-
- function is(state) {
- return container.states.indexOf(state) !== -1
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/Dialog.qml b/tests/manual/quickcontrols2/testbench/Dialog.qml
deleted file mode 100644
index 32c4806a..00000000
--- a/tests/manual/quickcontrols2/testbench/Dialog.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls
-
-Dialog {}
diff --git a/tests/manual/quickcontrols2/testbench/ExampleContainer.qml b/tests/manual/quickcontrols2/testbench/ExampleContainer.qml
deleted file mode 100644
index 903e52db..00000000
--- a/tests/manual/quickcontrols2/testbench/ExampleContainer.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-Frame {
- id: container
-
- property var controlMetaObject
-
- ColumnLayout {
- id: exampleLayout
- anchors.centerIn: parent
-
- Label {
- text: !exampleLoader.active ? qsTr("Show example") : qsTr("Hide example")
-
- Layout.alignment: Qt.AlignHCenter
-
- MouseArea {
- anchors.fill: parent
- onClicked: exampleLoader.active = !exampleLoader.active
- }
- }
-
- Loader {
- id: exampleLoader
- active: false
- sourceComponent: controlMetaObject ? controlMetaObject.exampleComponent : null
-
- Layout.preferredHeight: active ? item.implicitHeight : 0
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/Menu.qml b/tests/manual/quickcontrols2/testbench/Menu.qml
deleted file mode 100644
index 377cc3a0..00000000
--- a/tests/manual/quickcontrols2/testbench/Menu.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls
-
-Menu {}
diff --git a/tests/manual/quickcontrols2/testbench/README.md b/tests/manual/quickcontrols2/testbench/README.md
deleted file mode 100644
index bd434de6..00000000
--- a/tests/manual/quickcontrols2/testbench/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Style Testbench
-
-The Style Testbench provides a way to quickly see how controls look in different states with a given style.
-
-When run with the Imagine style, the testbench will react to changes to image assets and automatically fix and reload them.
-To use this functionality, click on the settings icon and then the settings menu item.
-From there, check "Use Custom Imagine Style Assets" and provide a path to your custom assets in the text field.
-If you want your 9-patch assets to be automatically fixed up (e.g. turn 4 pixel-thick 9-patch lines exported at
-@4x to a 1 pixel-thick line), check "Fix Imagine Style Assets".
-
-## Custom Text colors
-
-To use custom text colors, enable the "Use Custom Palette" option in the settings dialog, and then provide colors in the relevant fields. As an example, the WindowText palette role affects text that is displayed directly against the window (labels, flat button text, etc.), ButtonText affects text that is displayed against a button's background, and so on. A full list of color roles can be found here:
-
-http://doc.qt.io/qt-5/qpalette.html#ColorRole-enum
-
-The custom text color settings apply to every style that supports palettes, until turned off.
-
-The "Copy Palette Settings To Clipboard" button in the settings dialog can be used to copy the current colors and share them with others. Once someone has your custom colors, they can import them with the "Imort Palette Settings From Clipboard" button.
-
-## Tips
-
-- Ensure that 9-patch lines are black (#000000) or red (#ff0000). If these colors are slightly
- off (e.g. #010101), the assets won't display correctly when run in the application.
-- Don't use pure black in assets that have black 9-patch lines, as this will confuse the asset fixer.
-
-## Shortcuts
-
-| Name | Shortcut | Shortcut (Mac) | Description |
-|-------------------|--------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
-| Use Custom Assets | Ctrl+Shift+C | ⌘+Shift+C | If using the Imagine style, toggles between the default assets and the user's custom assets. Custom assets are specified in the settings dialog. |
-| Fix Custom Assets | Ctrl+Shift+X | ⌘+Shift+X | If using the Imagine style, manually fixes the assets. This is done automatically when "Automatically Fix Custom Assets" checkbox is checked. |
-| Reload Assets | Ctrl+R | ⌘+R | If using the Imagine style, reloads the assets from disk. This is usually done automatically. |
-| Search/Filter | Ctrl+F | ⌘+F | Filter the controls that are shown. Case-sensitive. |
-| Quit | Ctrl+Q | ⌘+Q | Quit the application. |
diff --git a/tests/manual/quickcontrols2/testbench/SettingsDialog.qml b/tests/manual/quickcontrols2/testbench/SettingsDialog.qml
deleted file mode 100644
index d11b5bea..00000000
--- a/tests/manual/quickcontrols2/testbench/SettingsDialog.qml
+++ /dev/null
@@ -1,447 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-import Backend
-import "." as Ui
-
-Ui.Dialog {
- id: settingsDialog
- title: "Settings"
- width: 500
- height: 400
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
-
- property alias imaginePathTextField: imaginePathTextField
- property alias customImagineStyleCheckBox: customImagineStyleCheckBox
- property alias autoFixImagineAssetsCheckBox: autoFixImagineAssetsCheckBox
-
- onAboutToShow: {
- styleComboBox.currentIndex = styleComboBox.styleIndex
- customImagineStyleCheckBox.checked = settings.useCustomImaginePath
- imaginePathTextField.text = settings.imaginePath
- autoFixImagineAssetsCheckBox.checked = settings.autoFixImagineAssets
-
- updatePaletteSettingsControls(paletteSettings)
- }
-
- onAccepted: {
- settings.style = styleComboBox.displayText
- settings.useCustomImaginePath = customImagineStyleCheckBox.checked
- settings.imaginePath = imaginePathTextField.text
- settings.autoFixImagineAssets = autoFixImagineAssetsCheckBox.checked
-
- paletteSettings.useCustomPalette = useCustomPaletteCheckBox.checked
- paletteSettings.window = windowColorEditor.color
- paletteSettings.windowText = windowTextColorEditor.color
- paletteSettings.base = baseColorEditor.color
- paletteSettings.text = textColorEditor.color
- paletteSettings.button = buttonColorEditor.color
- paletteSettings.buttonText = buttonTextColorEditor.color
- paletteSettings.brightText = brightTextColorEditor.color
- paletteSettings.toolTipBase = toolTipBaseColorEditor.color
- paletteSettings.toolTipText = toolTipTextColorEditor.color
- paletteSettings.light = lightColorEditor.color
- paletteSettings.midlight = midlightColorEditor.color
- paletteSettings.dark = darkColorEditor.color
- paletteSettings.mid = midColorEditor.color
- paletteSettings.shadow = shadowColorEditor.color
- paletteSettings.highlight = highlightColorEditor.color
- paletteSettings.highlightedText = highlightedTextColorEditor.color
- paletteSettings.link = linkColorEditor.color
- }
-
- function updatePaletteSettingsControls(source) {
- useCustomPaletteCheckBox.checked = paletteSettings.useCustomPalette
- windowColorEditor.color = source.window
- windowTextColorEditor.color = source.windowText
- baseColorEditor.color = source.base
- textColorEditor.color = source.text
- buttonColorEditor.color = source.button
- buttonTextColorEditor.color = source.buttonText
- brightTextColorEditor.color = source.brightText
- toolTipBaseColorEditor.color = source.toolTipBase
- toolTipTextColorEditor.color = source.toolTipText
- lightColorEditor.color = source.light
- midlightColorEditor.color = source.midlight
- darkColorEditor.color = source.dark
- midColorEditor.color = source.mid
- shadowColorEditor.color = source.shadow
- highlightColorEditor.color = source.highlight
- highlightedTextColorEditor.color = source.highlightedText
- linkColorEditor.color = source.link
- }
-
- function paletteSettingsMap() {
- var map = ({});
- map.window = windowColorEditor.color
- map.windowText = windowTextColorEditor.color
- map.base = baseColorEditor.color
- map.text = textColorEditor.color
- map.button = buttonColorEditor.color
- map.buttonText = buttonTextColorEditor.color
- map.brightText = brightTextColorEditor.color
- map.toolTipBase = toolTipBaseColorEditor.color
- map.toolTipText = toolTipTextColorEditor.color
- map.light = lightColorEditor.color
- map.midlight = midlightColorEditor.color
- map.dark = darkColorEditor.color
- map.mid = midColorEditor.color
- map.shadow = shadowColorEditor.color
- map.highlight = highlightColorEditor.color
- map.highlightedText = highlightedTextColorEditor.color
- map.link = linkColorEditor.color
- return map;
- }
-
- Clipboard {
- id: clipboard
- }
-
- DirectoryValidator {
- id: directoryValidator
- path: imaginePathTextField.text
- }
-
- contentItem: Flickable {
- contentWidth: settingsDialog.availableWidth
- contentHeight: contentLayout.implicitHeight
- flickableDirection: Qt.Vertical
- clip: true
-
- ColumnLayout {
- id: contentLayout
- anchors.fill: parent
-
- GroupBox {
- title: qsTr("General")
- Layout.fillWidth: true
-
- GridLayout {
- columns: 2
-
- Label {
- text: "Style:"
- }
-
- ComboBox {
- id: styleComboBox
- model: availableStyles
-
- property int styleIndex: -1
-
- Component.onCompleted: {
- styleIndex = find(settings.style, Qt.MatchFixedString)
- if (styleIndex !== -1)
- currentIndex = styleIndex
- }
-
- Layout.fillWidth: true
- }
-
- Item {
- Layout.fillWidth: true
- }
-
- Label {
- text: "Restart required"
- color: "#e41e25"
- opacity: styleComboBox.currentIndex !== styleComboBox.styleIndex ? 1.0 : 0.0
- Layout.topMargin: 12
- Layout.maximumHeight: styleComboBox.currentIndex !== styleComboBox.styleIndex ? implicitHeight : 0
- }
- }
- }
-
- GroupBox {
- title: qsTr("Imagine Style")
- visible: usingImagineStyle
- Layout.fillWidth: true
- Layout.columnSpan: 2
-
- GridLayout {
- columns: 2
- anchors.fill: parent
-
- CheckBox {
- id: customImagineStyleCheckBox
- text: qsTr("Use Custom Assets")
- enabled: usingImagineStyle
-
- Layout.columnSpan: 2
- }
-
- Label {
- text: "Asset Path"
- enabled: usingImagineStyle && customImagineStyleCheckBox.checked
- }
-
- TextField {
- id: imaginePathTextField
- text: settings.imaginePath
- enabled: usingImagineStyle && customImagineStyleCheckBox.checked
-
- Layout.preferredWidth: 200
- Layout.fillWidth: true
-
- ToolTip {
- text: "Path to a folder that contains Imagine style image assets"
- visible: imaginePathTextField.hovered
- delay: 500
- parent: imaginePathTextField
- }
- }
-
- Item {
- Layout.fillWidth: true
- }
-
- Label {
- text: directoryValidator.errorMessage
- color: "#e41e25"
- opacity: !directoryValidator.valid ? 1.0 : 0.0
- elide: Label.ElideMiddle
- Layout.topMargin: !directoryValidator.valid ? 12 : 0
- Layout.maximumHeight: !directoryValidator.valid ? implicitHeight : 0
-
- Layout.fillWidth: true
- }
-
- CheckBox {
- id: autoFixImagineAssetsCheckBox
- text: "Automatically Fix Custom Assets"
- enabled: usingImagineStyle && customImagineStyleCheckBox.checked
-
- Layout.columnSpan: 2
-
- ToolTip {
- text: "If set, custom Imagine style assets will be modified to be compliant whenever they have changed on disk"
- visible: autoFixImagineAssetsCheckBox.hovered
- delay: 500
- parent: imaginePathTextField
- }
- }
- }
- }
-
- GroupBox {
- title: qsTr("Palette")
- Layout.fillWidth: true
-
- GridLayout {
- columns: 2
- anchors.fill: parent
-
- CheckBox {
- id: useCustomPaletteCheckBox
- text: qsTr("Use Custom Palette")
- }
-
- ColorEditor {
- id: windowColorEditor
- labelText: qsTr("Window")
- toolTipText: qsTr("A general background color.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: windowTextColorEditor
- labelText: qsTr("WindowText")
- toolTipText: qsTr("A general foreground color.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: baseColorEditor
- labelText: qsTr("Base")
- toolTipText: qsTr("Used mostly as the background color for text editor controls and items views. It is usually white or another light color.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: textColorEditor
- labelText: qsTr("Text")
- toolTipText: qsTr("The foreground color used with Base. This is usually the same as the WindowText, in which case it must provide good contrast with Window and Base.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: buttonColorEditor
- labelText: qsTr("Button")
- toolTipText: qsTr("The general button background color. This background can be different from Window as some styles require a different background color for buttons.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: buttonTextColorEditor
- labelText: qsTr("ButtonText")
- toolTipText: qsTr("A foreground color used with the Button color.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: brightTextColorEditor
- labelText: qsTr("BrightText")
- toolTipText: qsTr("A text color that is very different from WindowText, and contrasts well with e.g. Dark. Typically used for text that needs to be drawn where Text, WindowText or ButtonText would give poor contrast, such as on highlighted buttons.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: toolTipBaseColorEditor
- labelText: qsTr("ToolTipBase")
- toolTipText: qsTr("Used as the background color for tooltips.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: toolTipTextColorEditor
- labelText: qsTr("ToolTipText")
- toolTipText: qsTr("Used as the foreground color for tooltips.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: lightColorEditor
- labelText: qsTr("Light")
- toolTipText: qsTr("Lighter than Button.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: midlightColorEditor
- labelText: qsTr("Midlight")
- toolTipText: qsTr("Between Button and Light.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: darkColorEditor
- labelText: qsTr("Dark")
- toolTipText: qsTr("Darker than Button.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: midColorEditor
- labelText: qsTr("Mid")
- toolTipText: qsTr("Between Button and Dark.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: shadowColorEditor
- labelText: qsTr("Shadow")
- toolTipText: qsTr("A very dark color.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: highlightColorEditor
- labelText: qsTr("Highlight")
- toolTipText: qsTr("A color to indicate a selected item or the current item.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: linkColorEditor
- labelText: qsTr("Link")
- toolTipText: qsTr("A text color used for hyperlinks.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- ColorEditor {
- id: highlightedTextColorEditor
- labelText: qsTr("HighlightedText")
- toolTipText: qsTr("A text color that contrasts with Highlight.")
- enabled: useCustomPaletteCheckBox.checked
- }
-
- Button {
- text: qsTr("Copy Palette Settings To Clipboard")
- enabled: useCustomPaletteCheckBox.checked
- onClicked: clipboard.copy(paletteSettingsMap())
-
- Layout.columnSpan: 2
- Layout.alignment: Qt.AlignRight
- }
-
- Button {
- text: qsTr("Import Palette Settings From Clipboard")
- enabled: useCustomPaletteCheckBox.checked
- onClicked: updatePaletteSettingsControls(clipboard.paste())
-
- Layout.columnSpan: 2
- Layout.alignment: Qt.AlignRight
- }
- }
- }
-
- Item {
- Layout.fillHeight: true
- }
- }
- }
-
- footer: DialogButtonBox {
- Button {
- text: qsTr("OK")
- DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
- enabled: !imaginePathTextField.enabled || (imaginePathTextField.enabled && directoryValidator.valid)
- }
- Button {
- text: qsTr("Cancel")
- DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/ToolBar.qml b/tests/manual/quickcontrols2/testbench/ToolBar.qml
deleted file mode 100644
index 90cbc195..00000000
--- a/tests/manual/quickcontrols2/testbench/ToolBar.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Controls
-
-ToolBar {}
diff --git a/tests/manual/quickcontrols2/testbench/assetfixer.cpp b/tests/manual/quickcontrols2/testbench/assetfixer.cpp
deleted file mode 100644
index 4813dac5..00000000
--- a/tests/manual/quickcontrols2/testbench/assetfixer.cpp
+++ /dev/null
@@ -1,564 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "assetfixer.h"
-
-#include <QDebug>
-#include <QDir>
-#include <QDirIterator>
-#include <QImage>
-#include <QLoggingCategory>
-#include <QQmlApplicationEngine>
-#include <QQuickWindow>
-#include <QtMath>
-
-#include "directoryvalidator.h"
-
-Q_LOGGING_CATEGORY(lcAssetFixer, "qt.quick.controls.tools.testbench.assetfixer.brief")
-Q_LOGGING_CATEGORY(lcAssetFixerVerbose, "qt.quick.controls.tools.testbench.assetfixer.verbose")
-
-static const QColor black = Qt::black;
-static const QColor red = Qt::red;
-
-/*
- This class:
-
- - Watches a given asset directory for changes. When it notices a change in the directory's
- "last modification" time, it suggests that client code call fixAssets(). It suggests
- rather than just doing it itself because the client code (QML) may want to wait a second
- or two to see if more changes are coming before doing an expensive fixup, as exporting
- a bunch of files into a directory will cause several directoryChanged() emissions from
- QFileSystemWatcher.
- - Fixes 9-patch image assets via the function below.
-*/
-
-/*
- This function:
-
- - Crops the image to the area within the 9-patch lines if necessary.
- This can happen if e.g. a shadow is applied to an asset in Illustrator
- and it causes the image to be larger than necessary.
- - Reduces the thickness of the 9-patch lines. This is necessary to enable
- designers not to have to worry about creating one pixel-thick lines for
- each DPI variant of an asset; they can simply export the asset at each
- DPI variant as usual and this program will fix it for them.
-
- See README.md for more information.
-*/
-bool cropImageToLines(QImage *image)
-{
- QRect cropArea;
- /*
- We need to keep track of this because of the following case:
-
- ______________________
- ______________________
- ||
- oooooooooooooooooooooooo
- ||
-
- If we didn't keep track of thickness, the top edge's lines would be found fine,
- but then we'd look at the bottom edge and we'd accidentally pick up the left edge's lines.
- Keeping track of thickness ensures that we have some way of knowing if we're far enough
- in for the line to belong to a certain edge.
-
- Note that this approach is still limited, as it doesn't account for the top edge,
- but we have to start somewhere in order to find the thickness.
- */
- int thickness = 0;
-
- bool cropTop = false;
- bool foundOnePixelThick9PatchLine = false;
- // We have to go row by row because otherwise we might find a pixel that
- // belongs to e.g. the left edge.
- for (int y = 0; y < qFloor(image->height() / 2.0) && !cropTop && !foundOnePixelThick9PatchLine; ++y) {
- for (int x = 1; x < image->width() - 2 && !cropTop && !foundOnePixelThick9PatchLine; ++x) {
- const QColor pixelColor = image->pixelColor(x, y);
- if (pixelColor == black || pixelColor == red) {
- if (y == 0) {
- const QColor pixelColorBelow = image->pixelColor(x, y + 1);
- if (pixelColorBelow != black && pixelColorBelow != red) {
- // We've already found the top of the 9-patch line, and the row below it
- // is a different color, so we know that it's one pixel thick, and that we're done.
- // Note that we can't just assume all of the other edges are the same and return here,
- // as we also need to account for e.g. shadows.
- qCDebug(lcAssetFixerVerbose) << "found one-pixel-thick nine patch line on top edge at x" << x;
- foundOnePixelThick9PatchLine = true;
- thickness = 1;
- }
- } else {
- // It's not already at the top edge, so crop the top edge.
- cropTop = true;
-
- // Now that we've found the line, find out how thick it is.
- for (int yy = y; yy < qFloor(image->height() / 2.0); ++yy) {
- const QColor pixelColor = image->pixelColor(x, yy);
- if (pixelColor == black || pixelColor == red) {
- cropArea.setTop(yy);
- } else {
- break;
- }
- }
-
- // + 1 for the pixel that we leave in when cropping,
- // another +1 for the fact that this else statement is only entered when y > 0
- if (thickness == 0) {
- thickness = cropArea.top() - y + 2;
- qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on top edge at x" << x << "y" << y
- << "with thickness" << thickness;
- } else {
- qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on top edge at x" << x << "y" << y
- << "using existing thickness of" << thickness;
- }
- }
- }
- }
- }
-
- bool cropBottom = false;
- foundOnePixelThick9PatchLine = false;
- for (int y = image->height() - 1; y >= qCeil(image->height() / 2.0) && !cropBottom && !foundOnePixelThick9PatchLine; --y) {
- for (int x = qMax(1, thickness); x < image->width() - 2 && !cropBottom && !foundOnePixelThick9PatchLine; ++x) {
- const QColor pixelColor = image->pixelColor(x, y);
- if (pixelColor == black || pixelColor == red) {
- if (y == image->height() - 1) {
- const QColor pixelColorAbove = image->pixelColor(x, y - 1);
- if (pixelColorAbove != black && pixelColorAbove != red) {
- // We've already found the bottom of the 9-patch line, and the row above it
- // is a different color, so we know that it's one pixel thick, and that we're done.
- qCDebug(lcAssetFixerVerbose) << "found one-pixel-thick nine patch line on bottom edge at x" << x;
- foundOnePixelThick9PatchLine = true;
- if (thickness == 0)
- thickness = 1;
- }
- } else {
- // It's not already at the bottom edge, so crop the bottom edge.
- cropBottom = true;
-
- // Now that we've found the line, find out how thick it is.
- for (int yy = y; yy >= qCeil(image->height() / 2.0); --yy) {
- const QColor pixelColor = image->pixelColor(x, yy);
- if (pixelColor == black || pixelColor == red) {
- cropArea.setBottom(yy);
- } else {
- break;
- }
- }
-
- // + 1 for the pixel that we leave in when cropping,
- // another +1 for the fact that this else statement is only entered when y < image->height() - 1
- if (thickness == 0) {
- thickness = y - cropArea.bottom() + 2;
- qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on bottom edge at x" << x << "y" << y
- << "with thickness" << thickness;
- } else {
- qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on bottom edge at x" << x << "y" << y
- << "using existing thickness of" << thickness;
- }
- }
- break;
- }
- }
- }
-
- bool cropLeft = false;
- foundOnePixelThick9PatchLine = false;
- for (int x = 0; x < qFloor(image->width() / 2.0) && !cropLeft && !foundOnePixelThick9PatchLine; ++x) {
- for (int y = qMax(1, thickness); y < image->height() - 2 && !cropLeft && !foundOnePixelThick9PatchLine; ++y) {
- const QColor pixelColor = image->pixelColor(x, y);
- if (pixelColor == black || pixelColor == red) {
- if (x == 0) {
- const QColor pixelColorToTheRight = image->pixelColor(x + 1, y);
- if (pixelColorToTheRight != black && pixelColorToTheRight != red) {
- // We've already found the beginning of the 9-patch line, and the column after it
- // is a different color, so we know that it's one pixel thick, and that we're done.
- qCDebug(lcAssetFixerVerbose) << "found one-pixel-thick nine patch line on left edge at y" << y;
- foundOnePixelThick9PatchLine = true;
- }
- } else {
- // It's not already at the left edge, so crop the left edge.
- cropLeft = true;
-
- // Now that we've found the line, find out how thick it is.
- for (int xx = x; xx < qFloor(image->width() / 2.0); ++xx) {
- const QColor pixelColor = image->pixelColor(xx, y);
- if (pixelColor == black || pixelColor == red) {
- cropArea.setLeft(xx);
- } else {
- break;
- }
- }
-
- // + 1 for the pixel that we leave in when cropping,
- // another +1 for the fact that this else statement is only entered when x > 0
- if (thickness == 0) {
- thickness = cropArea.left() - x + 2;
- qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on left edge at x" << x << "y" << y
- << "with thickness" << thickness;
- } else {
- qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on left edge at x" << x << "y" << y
- << "using existing thickness of" << thickness;
- }
- }
- }
- }
- }
-
- bool cropRight = false;
- foundOnePixelThick9PatchLine = false;
- for (int x = image->width() - 1; x >= qCeil(image->width() / 2.0) && !cropRight && !foundOnePixelThick9PatchLine; --x) {
- for (int y = qMax(1, thickness); y < image->height() - 2 && !cropRight && !foundOnePixelThick9PatchLine; ++y) {
- const QColor pixelColor = image->pixelColor(x, y);
- if (pixelColor == black || pixelColor == red) {
- if (x == image->width() - 1) {
- const QColor pixelColorToTheLeft = image->pixelColor(x - 1, y);
- if (pixelColorToTheLeft != black && pixelColorToTheLeft != red) {
- // We've already found the end of the 9-patch line, and the column before it
- // is a different color, so we know that it's one pixel thick, and that we're done.
- qCDebug(lcAssetFixerVerbose) << "found one-pixel-thick nine patch line on right edge at y" << y;
- foundOnePixelThick9PatchLine = true;
- }
- } else {
- // It's not already at the right edge, so crop the right edge.
- cropRight = true;
-
- // Now that we've found the line, find out how thick it is.
- for (int xx = x; xx >= qCeil(image->width() / 2.0); --xx) {
- const QColor pixelColor = image->pixelColor(xx, y);
- if (pixelColor == black || pixelColor == red) {
- cropArea.setRight(xx);
- } else {
- break;
- }
- }
-
- // + 1 for the pixel that we leave in when cropping,
- // another +1 for the fact that this else statement is only entered when x < image->width() - 1
- if (thickness == 0) {
- thickness = x - cropArea.right() + 2;
- qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on right edge at x" << x << "y" << y
- << "with thickness" << thickness;
- } else {
- qCDebug(lcAssetFixerVerbose) << "found first croppable nine patch line on right edge at x" << x << "y" << y
- << "using existing thickness of" << thickness;
- }
- }
- break;
- }
- }
- }
-
- const QRect copyArea(cropLeft ? cropArea.x() : (thickness ? thickness - 1 : 0),
- cropTop ? cropArea.y() : (thickness ? thickness - 1 : 0),
- cropRight ? cropArea.width() : image->width() - (thickness ? (thickness - 1) * 2 : 0),
- cropBottom ? cropArea.height() : image->height() - (thickness ? (thickness - 1) * 2 : 0));
-
- if (cropLeft | cropRight | cropTop | cropBottom) {
- qCDebug(lcAssetFixerVerbose) << "cropping area" << copyArea;
- *image = image->copy(copyArea);
- return true;
- }
-
- return false;
-}
-
-AssetFixer::AssetFixer(QObject *parent) :
- QObject(parent),
- mComponentComplete(false),
- mFirstWatch(true),
- mShouldWatch(false),
- mShouldFix(false),
- mLastModified(QDateTime::fromSecsSinceEpoch(0))
-{
-}
-
-bool AssetFixer::shouldWatch() const
-{
- return mShouldWatch;
-}
-
-void AssetFixer::setShouldWatch(bool watch)
-{
- if (watch == mShouldWatch)
- return;
-
- stopWatching();
-
- mShouldWatch = watch;
-
- startWatching();
-
- emit shouldWatchChanged();
-}
-
-bool AssetFixer::shouldFix() const
-{
- return mShouldFix;
-}
-
-void AssetFixer::setShouldFix(bool fix)
-{
- if (fix == mShouldFix)
- return;
-
- mShouldFix = fix;
- emit shouldFixChanged();
-}
-
-QString AssetFixer::assetDirectory() const
-{
- return mAssetDirectory;
-}
-
-void AssetFixer::setAssetDirectory(const QString &assetDirectory)
-{
- if (assetDirectory == mAssetDirectory)
- return;
-
- stopWatching();
-
- const QString oldAssetDirectory = assetDirectory;
- mAssetDirectory.clear();
-
- if (isAssetDirectoryValid(assetDirectory)) {
- mAssetDirectory = assetDirectory;
- startWatching();
- }
-
- if (mAssetDirectory != oldAssetDirectory)
- emit assetDirectoryChanged();
-}
-
-QUrl AssetFixer::assetDirectoryUrl() const
-{
- return QUrl::fromLocalFile(mAssetDirectory);
-}
-
-QDateTime AssetFixer::assetDirectoryLastModified() const
-{
- return mLastModified;
-}
-
-void AssetFixer::setAssetDirectoryLastModified(const QDateTime &assetDirectoryLastModified)
-{
- if (assetDirectoryLastModified == mLastModified)
- return;
-
- mLastModified = assetDirectoryLastModified;
- emit assetDirectoryLastModifiedChanged();
-}
-
-void AssetFixer::componentComplete()
-{
- mComponentComplete = true;
-}
-
-void AssetFixer::classBegin()
-{
-}
-
-void AssetFixer::onAssetsChanged()
-{
- const QFileInfo fileInfo(mAssetDirectory);
- const QDateTime lastModified = fileInfo.lastModified();
-
- qCDebug(lcAssetFixer) << "Change in asset directory" << mAssetDirectory << "detected"
- << "lastModified:" << lastModified;
- const qint64 secsSinceLastModification = mLastModified.secsTo(lastModified);
- if (secsSinceLastModification == 0) {
- qCDebug(lcAssetFixer) << "Change in asset directory" << mAssetDirectory << "detected, "
- << "but QFileInfo says the directory hasn't been modified; ignoring";
- } else {
- setAssetDirectoryLastModified(lastModified);
-
- QString message;
- if (lcAssetFixer().isDebugEnabled()) {
- message = QString::fromLatin1("Change in asset directory %1 detected, and QFileInfo says that there have been " \
- "%2 seconds since it was previously last modified); %3").arg(mAssetDirectory).arg(secsSinceLastModification);
- }
-
- if (shouldFix()) {
- qCDebug(lcAssetFixer) << message.arg(QLatin1String("suggesting delayed fix"));
- emit delayedFixSuggested();
- } else {
- qCDebug(lcAssetFixer) << message.arg(QLatin1String("suggesting reload"));
- emit reloadSuggested();
- }
- }
-}
-
-void AssetFixer::stopWatching()
-{
- if (!mShouldWatch || mAssetDirectory.isEmpty() || !mComponentComplete)
- return;
-
- disconnect(&mFileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, &AssetFixer::onAssetsChanged);
- mFileSystemWatcher.removePath(mAssetDirectory);
-}
-
-void AssetFixer::startWatching()
-{
- if (!mShouldWatch || mAssetDirectory.isEmpty() || !mComponentComplete || !isAssetDirectoryValid(mAssetDirectory))
- return;
-
- if (mFileSystemWatcher.addPath(mAssetDirectory)) {
- // TODO: for some reason this is not called when an image is edited, but is when the same image is "touch"ed.
- // We could add watchers for each file, but then the application might have to be limited to displaying
- // the elements for one control at a time so that we don't breach the 256 file descriptor limit on some platforms:
- // http://doc.qt.io/qt-5/qfilesystemwatcher.html#details
-
- // We only emit a signal here rather than automatically responding to it ourselves,
- // because we want to give the UI time to start animations.
- connect(&mFileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, &AssetFixer::onAssetsChanged);
-
- const QFileInfo fileInfo(mAssetDirectory);
- bool suggestFix = false;
- if (mFirstWatch) {
- mFirstWatch = false;
-
- // Here we check if the assets have been modified since the last time the application closed.
- // Checking this avoids a slow startup (due to fixing up assets).
- if (fileInfo.lastModified() > mLastModified) {
- qCDebug(lcAssetFixer) << "asset directory" << mAssetDirectory << "was modified at"
- << fileInfo.lastModified() << ", which is later than our last stored modification time of"
- << mLastModified << "; suggesting fix";
- suggestFix = true;
- } else {
- qCDebug(lcAssetFixer) << "asset directory" << mAssetDirectory << "has not been modified since"
- << "the application was last closed; a fix is not necessary";
-
- // For some reason not all assets are updated if we don't do this.
- emit reloadSuggested();
- }
-
- // Don't need to call setAssetDirectoryLastModified() here, as we should have gotten it from settings.
- } else {
- suggestFix = true;
- }
-
- if (suggestFix) {
- setAssetDirectoryLastModified(fileInfo.lastModified());
- emit fixSuggested();
- }
- } else {
- qWarning() << "Could not watch asset directory" << mAssetDirectory;
- }
-}
-
-bool AssetFixer::isAssetDirectoryValid(const QString &assetDirectory)
-{
- DirectoryValidator validator;
- validator.setPath(assetDirectory);
- return validator.isValid();
-}
-
-void AssetFixer::clearImageCache()
-{
- QQmlApplicationEngine *engine = qobject_cast<QQmlApplicationEngine*>(qmlEngine(this));
- if (!engine) {
- qWarning() << "No QQmlApplicationEngine for AssetFixer - assets may not reload properly";
- return;
- }
-
- QQuickWindow *window = qobject_cast<QQuickWindow*>(engine->rootObjects().first());
- if (!window) {
- qWarning() << "No QQuickWindow - assets may not reload properly";
- return;
- }
-
- // We can't seem to disable image caching on a per-Image basis (by the time the QQuickImages
- // are available, the cache has already been filled), so we call this instead.
- qCDebug(lcAssetFixer) << "Calling QQuickWindow::releaseResources() to clear pixmap cache";
- window->releaseResources();
-}
-
-void AssetFixer::fixAssets()
-{
- if (!mShouldFix || !mComponentComplete || mAssetDirectory.isEmpty() || !isAssetDirectoryValid(mAssetDirectory))
- return;
-
- QDir assetDir(mAssetDirectory);
- qCDebug(lcAssetFixer) << "Fixing up assets in" << assetDir.absolutePath() << "...";
- int filesChanged = 0;
-
- QStringList nameFilters;
- nameFilters << QLatin1String("*.9.png");
- QDirIterator dirIt(assetDir.absolutePath(), nameFilters, QDir::Files | QDir::Readable | QDir::NoSymLinks);
- while (dirIt.hasNext()) {
- const QString imagePath = dirIt.next();
-
- QImage image(imagePath);
- if (image.isNull()) {
- qWarning() << "Couldn't open image at" << imagePath;
- return;
- }
-
- qCDebug(lcAssetFixerVerbose).nospace() << "found " << imagePath << " (" << image.width() << "x" << image.height() << ") - "
- << "checking if we need to crop 9-patch lines";
-
- if (cropImageToLines(&image)) {
- if (!image.save(imagePath)) {
- qWarning() << "Couldn't save" << imagePath;
- return;
- }
-
- ++filesChanged;
- }
- }
-
- qCDebug(lcAssetFixer) << "Fixed" << filesChanged << "assets";
-
- // Let the application know that it should reload the Imagine style's assets.
- // Currently we always suggest a reload after fixing files, even if no files were fixed.
- // This is because the default Imagine style assets are automatically loaded at first, and then we
- // set a custom path shortly after, so we must ensure that the Imagine style is using the correct assets.
- // Reloads are just a matter of changing Imagine.path, which is very fast.
- emit reloadSuggested();
-}
diff --git a/tests/manual/quickcontrols2/testbench/assetfixer.h b/tests/manual/quickcontrols2/testbench/assetfixer.h
deleted file mode 100644
index 4af9ccf4..00000000
--- a/tests/manual/quickcontrols2/testbench/assetfixer.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef ASSETFIXER_H
-#define ASSETFIXER_H
-
-#include <QObject>
-#include <QDateTime>
-#include <QFileSystemWatcher>
-#include <QQmlParserStatus>
-#include <QUrl>
-
-class AssetFixer : public QObject, public QQmlParserStatus
-{
- Q_OBJECT
- Q_PROPERTY(bool shouldWatch READ shouldWatch WRITE setShouldWatch NOTIFY shouldWatchChanged FINAL)
- Q_PROPERTY(bool shouldFix READ shouldFix WRITE setShouldFix NOTIFY shouldFixChanged FINAL)
- Q_PROPERTY(QString assetDirectory READ assetDirectory WRITE setAssetDirectory NOTIFY assetDirectoryChanged FINAL)
- Q_PROPERTY(QUrl assetDirectoryUrl READ assetDirectoryUrl NOTIFY assetDirectoryChanged FINAL)
- Q_PROPERTY(QDateTime assetDirectoryLastModified READ assetDirectoryLastModified WRITE setAssetDirectoryLastModified
- NOTIFY assetDirectoryLastModifiedChanged FINAL)
- Q_INTERFACES(QQmlParserStatus)
-
-public:
- explicit AssetFixer(QObject *parent = nullptr);
-
- bool shouldWatch() const;
- void setShouldWatch(bool shouldWatch);
-
- bool shouldFix() const;
- void setShouldFix(bool shouldFix);
-
- QString assetDirectory() const;
- void setAssetDirectory(const QString &assetDirectory);
-
- QUrl assetDirectoryUrl() const;
-
- QDateTime assetDirectoryLastModified() const;
- void setAssetDirectoryLastModified(const QDateTime &assetDirectoryLastModified);
-
-signals:
- void shouldWatchChanged();
- void shouldFixChanged();
- void assetDirectoryChanged();
- void assetDirectoryLastModifiedChanged();
-
- void fixSuggested();
- void delayedFixSuggested();
- void reloadSuggested();
-
- void error(const QString &errorMessage);
-
-public slots:
- void clearImageCache();
- void fixAssets();
-
-protected:
- void componentComplete() override;
- void classBegin() override;
-
-private slots:
- void onAssetsChanged();
-
-private:
- void stopWatching();
- void startWatching();
-
- bool isAssetDirectoryValid(const QString &assetDirectory);
-
- bool mComponentComplete;
- bool mFirstWatch;
- bool mShouldWatch;
- bool mShouldFix;
- QString mAssetDirectory;
- QFileSystemWatcher mFileSystemWatcher;
- QDateTime mLastModified;
-};
-
-#endif // ASSETFIXER_H
diff --git a/tests/manual/quickcontrols2/testbench/clipboard.cpp b/tests/manual/quickcontrols2/testbench/clipboard.cpp
deleted file mode 100644
index 1daebfc9..00000000
--- a/tests/manual/quickcontrols2/testbench/clipboard.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "clipboard.h"
-
-#include <QClipboard>
-#include <QGuiApplication>
-#include <QSettings>
-
-const QStringList keys = {
- "Palette/window",
- "Palette/windowText",
- "Palette/base",
- "Palette/text",
- "Palette/button",
- "Palette/buttonText",
- "Palette/brightText",
- "Palette/toolTipBase",
- "Palette/toolTipText",
- "Palette/light",
- "Palette/midlight",
- "Palette/dark",
- "Palette/mid",
- "Palette/shadow",
- "Palette/highlight",
- "Palette/highlightedText",
- "Palette/link"
-};
-
-Clipboard::Clipboard(QObject *parent) :
- QObject(parent)
-{
-}
-
-// Converts the JS map into a big string and copies it to the clipboard.
-void Clipboard::copy(const QJSValue &keyValueMap)
-{
- QString paletteSettingsString;
- QVariantMap map = keyValueMap.toVariant().value<QVariantMap>();
- const QList<QString> mapKeys = map.keys();
- for (const QString &key : mapKeys) {
- paletteSettingsString += "Palette/" + key + "=" + map.value(key).toString() + ",";
- }
-
- // Remove the trailing comma.
- if (!paletteSettingsString.isEmpty())
- paletteSettingsString.chop(1);
-
- QGuiApplication::clipboard()->setText(paletteSettingsString);
-}
-
-// Converts the big string into a JS map and returns it.
-QVariant Clipboard::paste() const
-{
- QClipboard *clipboard = QGuiApplication::clipboard();
- if (clipboard->text().isEmpty())
- return QVariant();
-
- QVariantMap keyValueMap;
-
- const QStringList settingsList = clipboard->text().split(QLatin1Char(','));
- for (const QString &setting : settingsList) {
- const QStringList keyValuePair = setting.split(QLatin1Char('='));
- if (keyValuePair.size() < 2)
- continue;
-
- QString key = keyValuePair.first();
- if (keys.contains(key)) {
- key.remove(QLatin1String("Palette/"));
- const QString value = keyValuePair.last();
-
- keyValueMap.insert(key, value);
- }
- }
-
- return QVariant(keyValueMap);
-}
diff --git a/tests/manual/quickcontrols2/testbench/clipboard.h b/tests/manual/quickcontrols2/testbench/clipboard.h
deleted file mode 100644
index a21dd9c6..00000000
--- a/tests/manual/quickcontrols2/testbench/clipboard.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CLIPBOARD_H
-#define CLIPBOARD_H
-
-#include <QObject>
-#include <QJSValue>
-#include <QVariant>
-
-class Clipboard : public QObject
-{
- Q_OBJECT
-public:
- explicit Clipboard(QObject *parent = nullptr);
-
-public slots:
- void copy(const QJSValue &keyValueMap);
- QVariant paste() const;
-
-// void copyPaletteSettingsToClipboard();
-// void importPaletteSettingsFromClipboard();
-};
-
-#endif // CLIPBOARD_H
diff --git a/tests/manual/quickcontrols2/testbench/controls/BusyIndicator.qml b/tests/manual/quickcontrols2/testbench/controls/BusyIndicator.qml
deleted file mode 100644
index cc0f4518..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/BusyIndicator.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["mirrored"]
- ]
-
- property Component component: BusyIndicator {
- enabled: !is("disabled")
- LayoutMirroring.enabled: is("mirrored")
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Button.qml b/tests/manual/quickcontrols2/testbench/controls/Button.qml
deleted file mode 100644
index ac57453f..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Button.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["checked"],
- ["checked", "disabled"],
- ["checked"],
- ["highlighted"],
- ["highlighted", "disabled"],
- ["highlighted", "pressed"],
- ["highlighted", "checked"],
- ["highlighted", "checkable", "pressed"],
- ["highlighted", "checkable", "checked"],
- ["flat"],
- ["flat", "disabled"],
- ["flat", "pressed"],
- ["flat", "checked"],
- ["flat", "checkable"],
- ["flat", "checkable", "pressed"],
- ["flat", "checkable", "checked", "pressed"],
- ["flat", "checkable", "highlighted"],
- ["flat", "checkable", "highlighted", "pressed"],
- ["flat", "checkable", "highlighted", "checked"]
- ]
-
- property Component component: Button {
- text: "Button"
- enabled: !is("disabled")
- flat: is("flat")
- checkable: is("checkable")
- checked: is("checked")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- highlighted: is("highlighted")
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/CheckBox.qml b/tests/manual/quickcontrols2/testbench/controls/CheckBox.qml
deleted file mode 100644
index 0598dae8..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/CheckBox.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["checked"],
- ["checked", "disabled"],
- ["checked", "pressed"],
- ["partially-checked"],
- ["partially-checked", "disabled"],
- ["partially-checked", "pressed"],
- ]
-
- property Component component: CheckBox {
- text: "CheckBox"
- enabled: !is("disabled")
- checkState: is("checked") ? Qt.Checked : is("partially-checked") ? Qt.PartiallyChecked : Qt.Unchecked
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/CheckDelegate.qml b/tests/manual/quickcontrols2/testbench/controls/CheckDelegate.qml
deleted file mode 100644
index 8f546384..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/CheckDelegate.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["checked"],
- ["checked", "disabled"],
- ["checked", "pressed"],
- ["partially-checked"],
- ["partially-checked", "disabled"],
- ["partially-checked", "pressed"],
- ]
-
- property Component component: CheckDelegate {
- text: "CheckDelegate"
- enabled: !is("disabled")
- checkState: is("checked") ? Qt.Checked : is("partially-checked") ? Qt.PartiallyChecked : Qt.Unchecked
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- focusPolicy: Qt.StrongFocus
- }
-
- property Component exampleComponent: ListView {
- implicitWidth: 200
- implicitHeight: 200
- clip: true
- model: 20
- delegate: CheckDelegate {
- width: parent.width
- text: "CheckDelegate"
- focusPolicy: Qt.StrongFocus
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/ComboBox.qml b/tests/manual/quickcontrols2/testbench/controls/ComboBox.qml
deleted file mode 100644
index 75fb7701..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/ComboBox.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["open"],
- ["editable"],
- ["editable", "disabled"]
- ]
-
- property Component component: ComboBox {
- enabled: !is("disabled")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- editable: is("editable")
- model: ["ComboBox", "Apple", "Bird", "Cat", "Dog", "Elephant"]
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/DelayButton.qml b/tests/manual/quickcontrols2/testbench/controls/DelayButton.qml
deleted file mode 100644
index c0f6faa2..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/DelayButton.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["disabled", "checked"],
- ["pressed"],
- ["checked"],
- ]
-
- property Component component: Component {
- DelayButton {
- text: "DelayButton"
-// enabled: !is("disabled")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
-// down: is("pressed") ? true : undefined
- onDownChanged: print("down", down)
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Dial.qml b/tests/manual/quickcontrols2/testbench/controls/Dial.qml
deleted file mode 100644
index 16c99ec8..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Dial.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- // TODO: no down property to test this with
-// ["pressed"]
- ]
-
- property Component component: Dial {
- enabled: !is("disabled")
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Dialog.qml b/tests/manual/quickcontrols2/testbench/controls/Dialog.qml
deleted file mode 100644
index 0ea9d3be..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Dialog.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-// TODO
-QtObject {
- property string customControlName: qsTr("Dialog")
-
- property var supportedStates: [
- [],
- ["modal"],
- ["dim"]
- ]
-
- property Component component: Button {
- id: dialogButton
- text: qsTr("Dialog")
- hoverEnabled: true
-
- onClicked: dialog.open()
-
- Dialog {
- id: dialog
- x: (window.width - width) / 2
- y: (window.height - height) / 2
- standardButtons: Dialog.Ok | Dialog.Cancel
- parent: window.contentItem
- modal: is("modal")
- dim: is("dim") || is("modal")
-
- Label {
- text: "Lorem ipsum dolor sit amet, \nconsectetuer adipiscing elit, \n"
- + "sed diam nonummy nibh euismod tincidunt ut \nlaoreet dolore magna aliquam erat volutpat."
- }
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Frame.qml b/tests/manual/quickcontrols2/testbench/controls/Frame.qml
deleted file mode 100644
index dd88c3b8..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Frame.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ]
-
- property Component component: Frame {
- Label {
- text: "Frame"
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/GroupBox.qml b/tests/manual/quickcontrols2/testbench/controls/GroupBox.qml
deleted file mode 100644
index 80ced769..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/GroupBox.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ]
-
- property Component component: GroupBox {
- title: qsTr("Title")
-
- Label {
- text: qsTr("GroupBox")
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/ItemDelegate.qml b/tests/manual/quickcontrols2/testbench/controls/ItemDelegate.qml
deleted file mode 100644
index 0b887e2f..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/ItemDelegate.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["highlighted"],
- ["highlighted", "pressed"]
- ]
-
- property Component component: ItemDelegate {
- text: "ItemDelegate"
- enabled: !is("disabled")
- checkable: is("checkable")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- highlighted: is("highlighted")
- focusPolicy: Qt.StrongFocus
- }
-
- property Component exampleComponent: ListView {
- implicitWidth: 200
- implicitHeight: 200
- clip: true
- model: 20
- delegate: ItemDelegate {
- width: parent.width
- text: "ItemDelegate"
- focusPolicy: Qt.StrongFocus
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Label.qml b/tests/manual/quickcontrols2/testbench/controls/Label.qml
deleted file mode 100644
index d8155a20..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Label.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"]
- ]
-
- property Component component: Label {
- text: "Label with a <a href=\"http://doc.qt.io\">link</a>"
- onTextChanged: print(text)
- enabled: !is("disabled")
- textFormat: Label.StyledText
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Menu.qml b/tests/manual/quickcontrols2/testbench/controls/Menu.qml
deleted file mode 100644
index ba15c052..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Menu.qml
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-// TODO
-QtObject {
- property string customControlName: qsTr("Menu, MenuItem & MenuSeparator")
-
- property var supportedStates: [
- []
- ]
-
- property Component component: Button {
- id: menuButton
- text: qsTr("Menu")
- checked: menu.visible
- checkable: true
-
- Menu {
- id: menu
- x: 1
- y: 1 + parent.height
- visible: menuButton.checked
- closePolicy: Popup.CloseOnPressOutsideParent
-
- MenuItem {
- text: "Normal"
- }
- MenuItem {
- text: "Pressed"
- down: true
- }
- MenuItem {
- text: "Disabled"
- enabled: false
- }
-
- MenuSeparator {}
-
- MenuItem {
- text: "Checked"
- checked: true
- }
- MenuItem {
- text: "Checked + Pressed"
- checked: true
- down: true
- }
- MenuItem {
- text: "Checked + Disabled"
- checked: true
- enabled: false
- }
-
- MenuSeparator {}
-
- Menu {
- title: "Submenu"
-
- MenuItem {
- text: "Submenu item"
- }
- }
-
- Menu {
- title: "Disabled Submenu"
- enabled: false
- }
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/MenuBar.qml b/tests/manual/quickcontrols2/testbench/controls/MenuBar.qml
deleted file mode 100644
index f435c9a5..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/MenuBar.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-// TODO
-QtObject {
- property string customControlName: qsTr("MenuBar & MenuBarItem")
-
- property var supportedStates: [
- []
- ]
-
- property Component component: MenuBar {
- MenuBarItem {
- text: qsTr("Normal")
- }
- MenuBarItem {
- text: qsTr("Pressed")
- down: true
- }
- MenuBarItem {
- text: qsTr("Highlighted")
- highlighted: true
- }
- MenuBarItem {
- text: qsTr("Disabled")
- enabled: false
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Page.qml b/tests/manual/quickcontrols2/testbench/controls/Page.qml
deleted file mode 100644
index 3d310676..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Page.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ]
-
- property Component component: Page {
- width: 100
- height: 100
-
- Label {
- text: "Page"
- anchors.centerIn: parent
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/PageIndicator.qml b/tests/manual/quickcontrols2/testbench/controls/PageIndicator.qml
deleted file mode 100644
index 5de29ef1..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/PageIndicator.qml
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- // TODO: no down property to test this with
-// ["pressed"]
- ]
-
- property Component component: PageIndicator {
- enabled: !is("disabled")
- count: 5
- }
-
- property Component exampleComponent: ColumnLayout {
- implicitWidth: 200
- implicitHeight: 200
-
- // TODO: why doesn't this fill the ColumnLayout? :/
- StackLayout {
- id: swipeView
- currentIndex: pageIndicator.currentIndex
-
- Label {
- text: qsTr("Page 1")
- horizontalAlignment: Label.AlignHCenter
- }
-
- Label {
- text: qsTr("Page 2")
- horizontalAlignment: Label.AlignHCenter
- }
-
- Label {
- text: qsTr("Page 3")
- horizontalAlignment: Label.AlignHCenter
- }
-
- Label {
- text: qsTr("Page 4")
- horizontalAlignment: Label.AlignHCenter
- }
-
- Label {
- text: qsTr("Page 5")
- horizontalAlignment: Label.AlignHCenter
- }
- }
-
- PageIndicator {
- id: pageIndicator
- currentIndex: swipeView.currentIndex
- count: swipeView.count
- interactive: true
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Pane.qml b/tests/manual/quickcontrols2/testbench/controls/Pane.qml
deleted file mode 100644
index b5329b71..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Pane.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ]
-
- property Component component: Pane {
- width: 100
- height: 100
-
- Label {
- text: "Pane"
- anchors.centerIn: parent
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/ProgressBar.qml b/tests/manual/quickcontrols2/testbench/controls/ProgressBar.qml
deleted file mode 100644
index bc2d9045..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/ProgressBar.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["indeterminate"]
- ]
-
- property Component component: ProgressBar {
- enabled: !is("disabled")
- indeterminate: is("indeterminate")
- value: 0.25
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/RadioButton.qml b/tests/manual/quickcontrols2/testbench/controls/RadioButton.qml
deleted file mode 100644
index 7ca9bd0a..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/RadioButton.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["checked"],
- ["checked", "disabled"],
- ["checked", "pressed"],
- ]
-
- property Component component: Component {
- RadioButton {
- text: "RadioButton"
- enabled: !is("disabled")
- checked: is("checked")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/RadioDelegate.qml b/tests/manual/quickcontrols2/testbench/controls/RadioDelegate.qml
deleted file mode 100644
index ddafd14c..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/RadioDelegate.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["checked"],
- ["checked", "disabled"],
- ["checked", "pressed"]
- ]
-
- property Component component: Component {
- RadioDelegate {
- text: "RadioDelegate"
- enabled: !is("disabled")
- checked: is("checked")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- focusPolicy: Qt.StrongFocus
- }
- }
-
- property Component exampleComponent: ListView {
- implicitWidth: 200
- implicitHeight: 200
- clip: true
- model: 20
- delegate: RadioDelegate {
- width: parent.width
- text: "RadioDelegate"
- focusPolicy: Qt.StrongFocus
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/RangeSlider.qml b/tests/manual/quickcontrols2/testbench/controls/RangeSlider.qml
deleted file mode 100644
index 71208fb8..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/RangeSlider.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- ["vertical"],
- ["vertical", "disabled"],
- ["vertical", "pressed"],
- ["horizontal"],
- ["horizontal", "disabled"],
- ["horizontal", "pressed"]
- ]
-
- property Component component: RangeSlider {
- enabled: !is("disabled")
- orientation: is("horizontal") ? Qt.Horizontal : Qt.Vertical
- second.value: 0.5
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/RoundButton.qml b/tests/manual/quickcontrols2/testbench/controls/RoundButton.qml
deleted file mode 100644
index fb2d1d43..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/RoundButton.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["checked"],
- ["checked", "disabled"],
- ["highlighted"],
- ["highlighted", "disabled"],
- ["highlighted", "pressed"],
- ["highlighted", "checked"],
- ["highlighted", "checkable", "pressed"],
- ["highlighted", "checkable", "checked"],
- ["flat"],
- ["flat", "disabled"],
- ["flat", "pressed"],
- ["flat", "checked"],
- ["flat", "checkable"],
- ["flat", "checkable", "pressed"],
- ["flat", "checkable", "checked", "pressed"],
- ["flat", "checkable", "highlighted"],
- ["flat", "checkable", "highlighted", "pressed"],
- ["flat", "checkable", "highlighted", "checked"]
- ]
-
- property Component component: RoundButton {
- text: "B"
- enabled: !is("disabled")
- flat: is("flat")
- checkable: is("checkable")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- highlighted: is("highlighted")
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/ScrollBar.qml b/tests/manual/quickcontrols2/testbench/controls/ScrollBar.qml
deleted file mode 100644
index 4ed80f75..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/ScrollBar.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- ["vertical"],
- ["vertical", "disabled"],
- ["vertical", "interactive"],
- ["vertical", "interactive", "disabled"],
- ["horizontal"],
- ["horizontal", "disabled"],
- ["horizontal", "interactive"],
- ["horizontal", "interactive", "disabled"]
- ]
-
- property Component component: Frame {
- width: 100
- height: 100
- clip: true
-
- Label {
- text: "ABCDEFG\nHIJKLMN"
- font.pixelSize: 40
- x: -horizontalScrollBar.position * width
- y: -verticalScrollBar.position * height
- }
-
- ScrollBar {
- id: verticalScrollBar
- enabled: !is("disabled")
- orientation: Qt.Vertical
- interactive: is("interactive")
- visible: is("vertical")
- size: 0.3
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: parent.bottom
-
- Binding {
- target: verticalScrollBar
- property: "active"
- value: verticalScrollBar.visible
- }
- }
-
- ScrollBar {
- id: horizontalScrollBar
- enabled: !is("disabled")
- orientation: Qt.Horizontal
- interactive: is("interactive")
- visible: is("horizontal")
- size: 0.3
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
-
- Binding {
- target: horizontalScrollBar
- property: "active"
- value: horizontalScrollBar.visible
- }
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/ScrollIndicator.qml b/tests/manual/quickcontrols2/testbench/controls/ScrollIndicator.qml
deleted file mode 100644
index d9ee487d..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/ScrollIndicator.qml
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- ["vertical"],
- ["vertical", "disabled"],
- ["horizontal"],
- ["horizontal", "disabled"],
- ]
-
- property Component component: Frame {
- width: 100
- height: 100
- clip: true
-
- Label {
- text: "ABCDEFG\nHIJKLMN"
- font.pixelSize: 40
- x: horizontalScrollIndicator.position * width
- y: verticalScrollIndicator.position * height
- }
-
- ScrollIndicator {
- id: verticalScrollIndicator
- enabled: !is("disabled")
- orientation: Qt.Vertical
- active: true
- visible: is("vertical")
- size: 0.3
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- }
-
- ScrollIndicator {
- id: horizontalScrollIndicator
- enabled: !is("disabled")
- orientation: Qt.Horizontal
- active: true
- visible: is("horizontal")
- size: 0.3
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
-
- Binding {
- target: horizontalScrollIndicator
- property: "active"
- value: horizontalScrollIndicator.visible
- }
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Slider.qml b/tests/manual/quickcontrols2/testbench/controls/Slider.qml
deleted file mode 100644
index 21e751ac..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Slider.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- ["vertical"],
- ["vertical", "disabled"],
- ["vertical", "pressed"],
- ["horizontal"],
- ["horizontal", "disabled"],
- ["horizontal", "pressed"]
- ]
-
- property Component component: Slider {
- enabled: !is("disabled")
- orientation: is("horizontal") ? Qt.Horizontal : Qt.Vertical
- value: 0.5
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/SpinBox.qml b/tests/manual/quickcontrols2/testbench/controls/SpinBox.qml
deleted file mode 100644
index 22ca6cce..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/SpinBox.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["pressed"],
- ["disabled"],
- ["mirrored"],
- ["mirrored", "pressed"],
- ["mirrored", "disabled"],
- ["editable"],
- ["editable", "pressed"],
- ["editable", "disabled"],
- ["editable", "mirrored"],
- ["editable", "mirrored", "pressed"],
- ["editable", "mirrored", "disabled"]
- ]
-
- property Component component: SpinBox {
- value: 1
- enabled: !is("disabled")
- editable: is("editable")
- up.pressed: is("pressed")
-
- LayoutMirroring.enabled: is("mirrored")
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/SplitView.qml b/tests/manual/quickcontrols2/testbench/controls/SplitView.qml
deleted file mode 100644
index f2801def..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/SplitView.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- []
- ]
-
- property Component component: SplitView {
- implicitWidth: 400
- implicitHeight: 100
-
- Rectangle {
- color: "salmon"
- implicitWidth: 25
- implicitHeight: 25
- }
- Rectangle {
- color: "navajowhite"
- implicitWidth: 100
- implicitHeight: 100
- }
- Rectangle {
- color: "steelblue"
- implicitWidth: 200
- implicitHeight: 200
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/SwipeDelegate.qml b/tests/manual/quickcontrols2/testbench/controls/SwipeDelegate.qml
deleted file mode 100644
index 13d0a443..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/SwipeDelegate.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["highlighted"],
- ["highlighted", "pressed"]
- ]
-
- property Component actionComponent: Component {
- Rectangle {
- color: SwipeDelegate.pressed ? "#333" : "#444"
- width: parent ? parent.width : 0
- height: parent ? parent.height: 0
- clip: true
-
- Label {
- text: "Test"
- color: "white"
- anchors.centerIn: parent
- }
- }
- }
-
- property Component component: SwipeDelegate {
- id: swipeDelegate
- text: "SwipeDelegate"
- enabled: !is("disabled")
- checkable: is("checkable")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- highlighted: is("highlighted")
- focusPolicy: Qt.StrongFocus
-
- swipe.left: actionComponent
- swipe.right: actionComponent
- }
-
- property Component exampleComponent: ListView {
- implicitWidth: 200
- implicitHeight: 200
- clip: true
- model: 20
- delegate: SwipeDelegate {
- width: parent.width
- text: "SwipeDelegate"
- focusPolicy: Qt.StrongFocus
-
- swipe.left: actionComponent
- swipe.right: actionComponent
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Switch.qml b/tests/manual/quickcontrols2/testbench/controls/Switch.qml
deleted file mode 100644
index 6e877a49..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Switch.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["checked"],
- ["checked", "disabled"],
- ["checked", "disabled", "mirrored"],
- ["checked", "pressed"],
- ["checked", "pressed", "mirrored"],
- ["mirrored"],
- ]
-
- property Component component: Switch {
- text: "Switch"
- enabled: !is("disabled")
- checked: is("checked")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
-
- LayoutMirroring.enabled: is("mirrored")
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/SwitchDelegate.qml b/tests/manual/quickcontrols2/testbench/controls/SwitchDelegate.qml
deleted file mode 100644
index 4f60da55..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/SwitchDelegate.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ["pressed"],
- ["highlighted"],
- ["highlighted", "pressed"],
- ["mirrored"]
- ]
-
- property Component component: SwitchDelegate {
- text: "SwitchDelegate"
- enabled: !is("disabled")
- // Only set it if it's pressed, or the non-pressed examples will have no press effects
- down: is("pressed") ? true : undefined
- highlighted: is("highlighted")
- focusPolicy: Qt.StrongFocus
-
- LayoutMirroring.enabled: is("mirrored")
- }
-
- property Component exampleComponent: ListView {
- implicitWidth: 200
- implicitHeight: 200
- clip: true
- model: 20
- delegate: SwitchDelegate {
- width: parent.width
- text: "SwitchDelegate"
- focusPolicy: Qt.StrongFocus
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/TabBar.qml b/tests/manual/quickcontrols2/testbench/controls/TabBar.qml
deleted file mode 100644
index a7a1de49..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/TabBar.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-// TODO
-QtObject {
- property string customControlName: qsTr("TabBar & TabButton")
-
- property var supportedStates: [
- ["header"],
- ["header", "disabled"],
- ["footer"],
- ["footer", "disabled"]
- ]
-
- property Component component: TabBar {
- implicitHeight: tabButton1.implicitHeight
- enabled: !is("disabled")
- position: is("header") ? TabBar.Header : TabBar.Footer
-
- TabButton {
- id: tabButton1
- text: qsTr("TabButton 1")
- }
- TabButton {
- text: qsTr("TabButton 2")
- }
- TabButton {
- text: qsTr("TabButton 3")
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/TextArea.qml b/tests/manual/quickcontrols2/testbench/controls/TextArea.qml
deleted file mode 100644
index dfe28f79..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/TextArea.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ]
-
- property Component component: Column {
- spacing: 10
-
- TextArea {
- text: "TextArea\nwith\ntext"
- enabled: !is("disabled")
- }
-
- TextArea {
- placeholderText: "TextArea with placeholderText"
- enabled: !is("disabled")
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/TextField.qml b/tests/manual/quickcontrols2/testbench/controls/TextField.qml
deleted file mode 100644
index 1eed3a6c..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/TextField.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"],
- ]
-
- property Component component: Column {
- spacing: 10
-
- TextField {
- text: "TextField with text"
- enabled: !is("disabled")
- }
-
- TextField {
- placeholderText: "TextField with placeholderText"
- enabled: !is("disabled")
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/ToolBar.qml b/tests/manual/quickcontrols2/testbench/controls/ToolBar.qml
deleted file mode 100644
index 3aba3377..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/ToolBar.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-// TODO
-QtObject {
- property string customControlName: qsTr("ToolBar, ToolButton & ToolSeparator")
-
- property var supportedStates: [
- ["header"],
- ["header", "disabled"],
- ["footer"],
- ["footer", "disabled"]
- ]
-
- property Component component: ToolBar {
- enabled: !is("disabled")
- position: is("header") ? ToolBar.Header : ToolBar.Footer
-
- RowLayout {
- anchors.fill: parent
-
- ToolButton {
- text: qsTr("ToolButton 1")
- }
- ToolButton {
- text: qsTr("ToolButton 2")
- }
-
- ToolSeparator {}
-
- ToolButton {
- text: qsTr("ToolButton 3")
- }
- }
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/ToolTip.qml b/tests/manual/quickcontrols2/testbench/controls/ToolTip.qml
deleted file mode 100644
index ddcf92f8..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/ToolTip.qml
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-QtObject {
- property var supportedStates: [
- []
- ]
-
- property Component component: Button {
- text: qsTr("Hover over me")
-
- ToolTip.text: qsTr("ToolTip")
- ToolTip.visible: hovered
- ToolTip.delay: 500
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/controls/Tumbler.qml b/tests/manual/quickcontrols2/testbench/controls/Tumbler.qml
deleted file mode 100644
index a2dbebef..00000000
--- a/tests/manual/quickcontrols2/testbench/controls/Tumbler.qml
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-QtObject {
- property var supportedStates: [
- [],
- ["disabled"]
- ]
-
- property Component component: Tumbler {
- model: 20
- enabled: !is("disabled")
-
- LayoutMirroring.enabled: is("mirrored")
- }
-}
diff --git a/tests/manual/quickcontrols2/testbench/deployment.pri b/tests/manual/quickcontrols2/testbench/deployment.pri
deleted file mode 100644
index c89af25a..00000000
--- a/tests/manual/quickcontrols2/testbench/deployment.pri
+++ /dev/null
@@ -1,14 +0,0 @@
-unix:!android {
- isEmpty(target.path) {
- qnx {
- target.path = /tmp/$${TARGET}/bin
- } else {
- target.path = /opt/$${TARGET}/bin
- }
- export(target.path)
- }
- INSTALLS += target
-}
-
-export(INSTALLS)
-
diff --git a/tests/manual/quickcontrols2/testbench/directoryvalidator.cpp b/tests/manual/quickcontrols2/testbench/directoryvalidator.cpp
deleted file mode 100644
index d0d4cd8d..00000000
--- a/tests/manual/quickcontrols2/testbench/directoryvalidator.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "directoryvalidator.h"
-
-#include <QFileInfo>
-
-DirectoryValidator::DirectoryValidator(QObject *parent) :
- QObject(parent)
-{
-}
-
-QString DirectoryValidator::path() const
-{
- return mPath;
-}
-
-void DirectoryValidator::setPath(const QString &path)
-{
- if (path == mPath)
- return;
-
- const bool wasValid = isValid();
- const QString oldErrorMessage = mErrorMessage;
-
- mPath = path;
- mErrorMessage.clear();
-
- QFileInfo fileInfo(mPath);
- if (!fileInfo.exists()) {
- mErrorMessage = QLatin1String("Directory does not exist");
- } else {
- if (!fileInfo.isDir()) {
- mErrorMessage = QLatin1String("Not a directory");
- }
- }
-
- if (isValid() != wasValid)
- emit validChanged();
-
- if (mErrorMessage != oldErrorMessage)
- emit errorMessageChanged();
-
- emit pathChanged();
-}
-
-bool DirectoryValidator::isValid() const
-{
- return mErrorMessage.isEmpty();
-}
-
-QString DirectoryValidator::errorMessage() const
-{
- return mErrorMessage;
-}
diff --git a/tests/manual/quickcontrols2/testbench/directoryvalidator.h b/tests/manual/quickcontrols2/testbench/directoryvalidator.h
deleted file mode 100644
index a1650d86..00000000
--- a/tests/manual/quickcontrols2/testbench/directoryvalidator.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef DIRECTORYVALIDATOR_H
-#define DIRECTORYVALIDATOR_H
-
-#include <QObject>
-
-class DirectoryValidator : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged FINAL)
- Q_PROPERTY(bool valid READ isValid NOTIFY validChanged FINAL)
- Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorMessageChanged FINAL)
-
-public:
- explicit DirectoryValidator(QObject *parent = nullptr);
-
- QString path() const;
- void setPath(const QString &path);
-
- bool isValid() const;
- QString errorMessage() const;
-
-signals:
- void pathChanged();
- void validChanged();
- void errorMessageChanged();
-
-private:
- void updateValid();
-
- QString mPath;
- QString mErrorMessage;
-};
-
-#endif // DIRECTORYVALIDATOR_H
diff --git a/tests/manual/quickcontrols2/testbench/fonts.qrc b/tests/manual/quickcontrols2/testbench/fonts.qrc
deleted file mode 100644
index fc86e031..00000000
--- a/tests/manual/quickcontrols2/testbench/fonts.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>fonts/fontawesome.ttf</file>
- </qresource>
-</RCC>
diff --git a/tests/manual/quickcontrols2/testbench/fonts/LICENSE.txt b/tests/manual/quickcontrols2/testbench/fonts/LICENSE.txt
deleted file mode 100644
index 8fa3da36..00000000
--- a/tests/manual/quickcontrols2/testbench/fonts/LICENSE.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Font license info
-
-
-## Font Awesome
-
- Copyright (C) 2016 by Dave Gandy
-
- Author: Dave Gandy
- License: SIL ()
- Homepage: http://fortawesome.github.com/Font-Awesome/
-
-
diff --git a/tests/manual/quickcontrols2/testbench/fonts/fontawesome.ttf b/tests/manual/quickcontrols2/testbench/fonts/fontawesome.ttf
deleted file mode 100644
index 49b6c5da..00000000
--- a/tests/manual/quickcontrols2/testbench/fonts/fontawesome.ttf
+++ /dev/null
Binary files differ
diff --git a/tests/manual/quickcontrols2/testbench/main.cpp b/tests/manual/quickcontrols2/testbench/main.cpp
deleted file mode 100644
index ddad828f..00000000
--- a/tests/manual/quickcontrols2/testbench/main.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QDebug>
-#include <QFontDatabase>
-#include <QGuiApplication>
-#include <QSettings>
-#include <QQmlApplicationEngine>
-#include <QQmlContext>
-#include <QQuickStyle>
-#include <QtQuickControls2/private/qquickstyle_p.h>
-
-#include "assetfixer.h"
-#include "clipboard.h"
-#include "directoryvalidator.h"
-
-int main(int argc, char *argv[])
-{
- QGuiApplication::setApplicationName("testbench");
- QGuiApplication::setOrganizationName("QtProject");
-
- QGuiApplication app(argc, argv);
-
- QSettings settings;
- QString style = QQuickStyle::name();
- if (!style.isEmpty() && !QQuickStylePrivate::isUsingDefaultStyle())
- settings.setValue("style", style);
- else
- QQuickStyle::setStyle(settings.value("style").isValid() ? settings.value("style").toString() : "Imagine");
-
- if (QFontDatabase::addApplicationFont(":/fonts/fontawesome.ttf") == -1) {
- qWarning() << "Failed to load fontawesome font";
- }
-
- QQmlApplicationEngine engine;
-
- qmlRegisterType<AssetFixer>("Backend", 1, 0, "AssetFixer");
- qmlRegisterType<Clipboard>("Backend", 1, 0, "Clipboard");
- qmlRegisterType<DirectoryValidator>("Backend", 1, 0, "DirectoryValidator");
-
- engine.rootContext()->setContextProperty("availableStyles", QQuickStylePrivate::builtInStyles());
-
- engine.load(QUrl(QStringLiteral("qrc:/testbench.qml")));
-
- return app.exec();
-}
-
diff --git a/tests/manual/quickcontrols2/testbench/qml.qrc b/tests/manual/quickcontrols2/testbench/qml.qrc
deleted file mode 100644
index 82e69be6..00000000
--- a/tests/manual/quickcontrols2/testbench/qml.qrc
+++ /dev/null
@@ -1,55 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>ControlContainer.qml</file>
- <file>controls/Button.qml</file>
- <file>controls/CheckBox.qml</file>
- <file>controls/RadioButton.qml</file>
- <file>controls/CheckDelegate.qml</file>
- <file>controls/ComboBox.qml</file>
- <file>controls/DelayButton.qml</file>
- <file>controls/Dial.qml</file>
- <file>controls/Frame.qml</file>
- <file>controls/GroupBox.qml</file>
- <file>controls/ItemDelegate.qml</file>
- <file>controls/Page.qml</file>
- <file>controls/PageIndicator.qml</file>
- <file>controls/Pane.qml</file>
- <file>controls/ProgressBar.qml</file>
- <file>controls/RadioDelegate.qml</file>
- <file>controls/RangeSlider.qml</file>
- <file>controls/RoundButton.qml</file>
- <file>controls/ScrollBar.qml</file>
- <file>controls/ScrollIndicator.qml</file>
- <file>controls/Slider.qml</file>
- <file>controls/SpinBox.qml</file>
- <file>controls/SwipeDelegate.qml</file>
- <file>controls/Switch.qml</file>
- <file>controls/SwitchDelegate.qml</file>
- <file>controls/TabBar.qml</file>
- <file>controls/TextArea.qml</file>
- <file>controls/TextField.qml</file>
- <file>SettingsDialog.qml</file>
- <file>ColorEditor.qml</file>
- <file>controls/ToolBar.qml</file>
- <file>controls/Dialog.qml</file>
- <file>controls/Menu.qml</file>
- <file>ExampleContainer.qml</file>
- <file>controls/Label.qml</file>
- <file>controls/ToolTip.qml</file>
- <file>controls/Tumbler.qml</file>
- <file>controls/BusyIndicator.qml</file>
- <file>testbench.qml</file>
- <file>controls/MenuBar.qml</file>
- <file>controls/SplitView.qml</file>
- <file>+Imagine/ApplicationWindow.qml</file>
- <file>ApplicationWindow.qml</file>
- <file>+Imagine/ToolBar.qml</file>
- <file>ToolBar.qml</file>
- <file>+Imagine/Menu.qml</file>
- <file>Menu.qml</file>
- <file>+Imagine/Dialog.qml</file>
- <file>Dialog.qml</file>
- <file>ContentPane.qml</file>
- <file>+Imagine/ContentPane.qml</file>
- </qresource>
-</RCC>
diff --git a/tests/manual/quickcontrols2/testbench/testbench.pro b/tests/manual/quickcontrols2/testbench/testbench.pro
deleted file mode 100644
index 4509f496..00000000
--- a/tests/manual/quickcontrols2/testbench/testbench.pro
+++ /dev/null
@@ -1,24 +0,0 @@
-TEMPLATE = app
-
-QT += qml quick quickcontrols2 quickcontrols2-private
-CONFIG += c++11
-
-HEADERS += \
- assetfixer.h \
- directoryvalidator.h \
- clipboard.h
-
-SOURCES += main.cpp \
- assetfixer.cpp \
- directoryvalidator.cpp \
- clipboard.cpp
-
-RESOURCES += qml.qrc \
- fonts.qrc
-
-# Additional import path used to resolve QML modules in Qt Creator's code model
-QML_IMPORT_PATH =
-
-# Default rules for deployment.
-include(deployment.pri)
-
diff --git a/tests/manual/quickcontrols2/testbench/testbench.qml b/tests/manual/quickcontrols2/testbench/testbench.qml
deleted file mode 100644
index 8f0951ad..00000000
--- a/tests/manual/quickcontrols2/testbench/testbench.qml
+++ /dev/null
@@ -1,533 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick
-import QtQuick.Window
-import QtQuick.Layouts
-import QtQuick.Controls
-import Qt.labs.folderlistmodel
-import Qt.labs.settings
-
-import Backend
-import "." as Ui
-
-Ui.ApplicationWindow {
- id: window
- visible: true
- width: 1000
- height: 750
- title: "Style Testbench - " + settings.style + " Style" + (usingImagineStyle ? imagineTitleText : "")
-
- readonly property bool usingImagineStyle: settings.style === "Imagine"
- // Some controls should be visible regardless of whether or not custom assets are lacking for it,
- // so we use the default assets in some cases.
- readonly property string defaultImaginePath: "qrc:/qt-project.org/imports/QtQuick/Controls/Imagine/images/"
- property bool settingsLoaded: false
- readonly property string imagineTitleText: " - " + (settings.useCustomImaginePath ? settings.imaginePath : "Default Assets")
-
- LoggingCategory {
- id: brief
- name: "qt.quick.controls.tools.testbench.assetfixer.brief"
- }
-
- Shortcut {
- sequence: "Ctrl+F"
- onActivated: searchTextField.forceActiveFocus()
- }
-
- Shortcut {
- sequence: "Ctrl+Q"
- onActivated: Qt.quit()
- }
-
- Action {
- id: fixAssetsAction
- text: qsTr("Fix Custom Assets")
- shortcut: "Ctrl+Shift+X"
- enabled: usingImagineStyle
- onTriggered: assetFixer.manualFix()
- }
-
- Action {
- id: useCustomAssetsAction
- text: qsTr("Use Custom Assets")
- shortcut: "Ctrl+Shift+C"
- enabled: usingImagineStyle
- checkable: true
- checked: settings.useCustomImaginePath
- onTriggered: settings.useCustomImaginePath = !settings.useCustomImaginePath
- }
-
- Action {
- id: reloadAssetsAction
- text: qsTr("Reload Assets")
- shortcut: "Ctrl+R"
- enabled: usingImagineStyle
- onTriggered: assetFixer.reloadAssets()
- }
-
- FontMetrics {
- id: fontMetrics
- }
-
- Settings {
- id: settings
-
- property alias windowX: window.x
- property alias windowY: window.y
- property alias windowWidth: window.width
- property alias windowHeight: window.height
-
- property string style: "Imagine"
-
- property bool useCustomImaginePath
- property string imaginePath
- property bool autoFixImagineAssets
- property alias imagineDirLastModified: assetFixer.assetDirectoryLastModified
-
- Component.onCompleted: settingsLoaded = true
- }
-
- Settings {
- id: paletteSettings
-
- category: "Palette"
-
- property bool useCustomPalette
- property string window
- property string windowText
- property string base
- property string text
- property string button
- property string buttonText
- property string brightText
- property string toolTipBase
- property string toolTipText
- property string light
- property string midlight
- property string dark
- property string mid
- property string shadow
- property string highlight
- property string highlightedText
- property string link
- }
-
- header: Ui.ToolBar {
- RowLayout {
- anchors.fill: parent
-
- ToolButton {
- text: "\uf0c9"
- font.family: "fontawesome"
- font.pixelSize: Qt.application.font.pixelSize * 1.6
- onClicked: drawer.open()
- }
-
- ToolSeparator {}
-
- TextField {
- id: searchTextField
- placeholderText: "Search"
- }
-
- Item {
- Layout.fillWidth: true
- }
-
- ToolButton {
- id: optionsMenuButton
- text: "\ue800"
- font.family: "FontAwesome"
- font.pixelSize: Qt.application.font.pixelSize * 1.6
- checked: optionsMenu.visible
- checkable: true
-
- onClicked: optionsMenu.open()
-
- Ui.Menu {
- id: optionsMenu
- x: 1
- y: 1 + parent.height
- visible: optionsMenuButton.checked
- closePolicy: Popup.CloseOnPressOutsideParent
-
- MenuItem {
- text: qsTr("Open Asset Directory")
- onClicked: Qt.openUrlExternally(assetFixer.assetDirectoryUrl)
- enabled: usingImagineStyle
- }
-
- MenuItem {
- action: reloadAssetsAction
- }
-
- MenuItem {
- action: useCustomAssetsAction
- }
-
- MenuItem {
- action: fixAssetsAction
- }
-
- MenuSeparator {}
-
- MenuItem {
- id: settingsMenuItem
- text: qsTr("Settings")
- onTriggered: settingsDialog.open()
- }
-
- MenuSeparator {}
-
- MenuItem {
- text: qsTr("Quit")
- onTriggered: Qt.quit()
- }
- }
- }
- }
- }
-
- SettingsDialog {
- id: settingsDialog
- }
-
- Drawer {
- id: drawer
- width: parent.width * 0.33
- height: window.height
- focus: false
- modal: false
-
- Label {
- text: "Drawer contents go here"
- anchors.centerIn: parent
- }
- }
-
- AssetFixer {
- id: assetFixer
- assetDirectory: settings.imaginePath
- // Don't start watching until the settings have loaded, as AssetFixer can be completed before it.
- // AssetFixer needs the settings in order to check the last modified time of the asset directory.
- // Also, wait until the UI has been rendered for the first time so that we can show our busy indicators, etc.
- shouldWatch: usingImagineStyle && settings.useCustomImaginePath && settingsLoaded && initialUiRenderDelayTimer.hasRun
- shouldFix: (shouldWatch && settings.autoFixImagineAssets) || manuallyFixing
-
- onFixSuggested: autoFix()
- onDelayedFixSuggested: assetFixerFileSystemDelayTimer.restart()
- onReloadSuggested: reloadAssets()
-
- property bool manuallyFixing: false
-
- function reloadAssets() {
- console.log(brief, "Reloading assets...")
- // Clear the model, otherwise ListView will keep the old items around
- // with the old assets, even after clearing the pixmap cache
- listView.resettingModel = true
- listView.model = null
- window.Imagine.path = ""
- assetReloadNextFrameTimer.start()
- }
-
- function autoFix() {
- // This is a bit of a hack, but I can't think of a nice way to solve it.
- // The problem is that shouldWatch becomes true, causing startWatching() to be called.
- // If a fix is suggested as a result of that, this function is called.
- // However, the shouldFix binding hasn't been updated yet, so even though shouldWatch
- // and settings.autoFixImagineAssets are both true (the properties that make up its binding),
- // the if check below fails. So, we check for that case with effectiveShouldFix.
- var effectiveShouldFix = shouldWatch && settings.autoFixImagineAssets;
- if (shouldWatch && effectiveShouldFix && assetDirectory.length > 0) {
- fixEmUp();
- }
- }
-
- function manualFix() {
- fixEmUp(true);
- }
-
- function fixEmUp(manually) {
- assetFixer.manuallyFixing = !!manually
-
- // Disable image caching if it hasn't already been done.
- assetFixer.clearImageCache()
-
- busyIndicatorRow.visible = true
- assetFixerAnimationDelayTimer.start()
- }
- }
-
- // The controls' assets don't always "reload" if the path is cleared and then set in the same frame,
- // so we delay the setting to the next frame.
- Timer {
- id: assetReloadNextFrameTimer
- interval: 0
- onTriggered: {
- window.Imagine.path = Qt.binding(function() {
- return settings.useCustomImaginePath && settings.imaginePath.length > 0 ? settings.imaginePath : undefined
- })
-
- infoToolTip.text = "Reloaded assets"
- infoToolTip.timeout = 1500
- infoToolTip.open()
-
- listView.model = controlFolderListModel
- listView.resettingModel = false
-
- console.log(brief, "... reloaded assets.")
- }
- }
-
- // When exporting or deleting a large amount of assets (not uncommon),
- // the filesystem watcher seems to emit directoryChanged() every second or so,
- // so rather than process hundreds of assets every time we get notified, delay
- // it until we haven't been notified for a while.
- Timer {
- id: assetFixerFileSystemDelayTimer
- interval: 2000
- onRunningChanged: {
- if (running) {
- infoToolTip.text = "Assets changed on disk - reloading in 2 seconds if no further changes are detected"
- infoToolTip.timeout = 2000
- infoToolTip.open()
- }
- }
- onTriggered: assetFixer.autoFix()
- }
-
- // Gives the BusyIndicator animation a chance to start.
- Timer {
- id: assetFixerAnimationDelayTimer
- interval: 100
- onTriggered: {
- assetFixer.fixAssets()
- busyIndicatorRow.visible = false
- assetFixer.manuallyFixing = false
- }
- }
-
- // Gives the UI a chance to render before the initial fixup.
- Timer {
- id: initialUiRenderDelayTimer
- interval: 300
- running: true
- onTriggered: hasRun = true
-
- property bool hasRun: false
- }
-
- function getControlElements(control) {
- var props = [];
- for (var p in control) {
- if (p !== "component" && typeof control[p] === 'object')
- props.push(p);
- }
- return props;
- }
-
- Ui.ContentPane {
- id: contentPane
- anchors.fill: parent
-
- palette.window: effectiveColor(paletteSettings.window)
- palette.windowText: effectiveColor(paletteSettings.windowText)
- palette.base: effectiveColor(paletteSettings.base)
- palette.text: effectiveColor(paletteSettings.text)
- palette.button: effectiveColor(paletteSettings.button)
- palette.buttonText: effectiveColor(paletteSettings.buttonText)
- palette.brightText: effectiveColor(paletteSettings.brightText)
- palette.toolTipBase: effectiveColor(paletteSettings.toolTipBase)
- palette.toolTipText: effectiveColor(paletteSettings.toolTipText)
- palette.light: effectiveColor(paletteSettings.light)
- palette.midlight: effectiveColor(paletteSettings.midlight)
- palette.dark: effectiveColor(paletteSettings.dark)
- palette.mid: effectiveColor(paletteSettings.mid)
- palette.shadow: effectiveColor(paletteSettings.shadow)
- palette.highlight: effectiveColor(paletteSettings.highlight)
- palette.highlightedText: effectiveColor(paletteSettings.highlightedText)
- palette.link: effectiveColor(paletteSettings.link)
-
- function effectiveColor(paletteColorString) {
- return paletteSettings.useCustomPalette && paletteColorString.length > 0 ? paletteColorString : undefined
- }
-
- FolderListModel {
- id: controlFolderListModel
- folder: "qrc:/controls"
- showDirs: false
- nameFilters: searchTextField.text.length > 0 ? ["*" + searchTextField.text + "*.qml"] : []
- caseSensitive: false
- }
-
- ListView {
- id: listView
- anchors.fill: parent
- spacing: 30
- visible: !busyIndicatorRow.visible && !resettingModel
-
- property bool resettingModel: false
-
- ScrollBar.vertical: ScrollBar {
- parent: contentPane
- anchors.top: parent.top
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- }
-
- model: controlFolderListModel
- delegate: ColumnLayout {
- id: rootDelegate
- width: listView.width
-
- MenuSeparator {
- Layout.fillWidth: true
- visible: index !== 0
- }
-
- Label {
- text: customControlName.length === 0 ? model.fileBaseName : customControlName
- font.pixelSize: Qt.application.font.pixelSize * 2
- }
-
- readonly property var controlName: model.fileBaseName
- readonly property var controlMetaObject: controlMetaObjectLoader.item
- readonly property string customControlName: controlMetaObject && controlMetaObject.hasOwnProperty("customControlName")
- ? controlMetaObject.customControlName : ""
- readonly property var supportedStates: rootDelegate.controlMetaObject.supportedStates
- readonly property int maxStateCombinations: {
- var largest = 0;
- for (var i = 0; i < supportedStates.length; ++i) {
- var combinations = supportedStates[i];
- if (combinations.length > largest)
- largest = combinations.length;
- }
- return largest;
- }
-
- Loader {
- id: controlMetaObjectLoader
- source: "qrc" + model.filePath
- }
-
- Flow {
- spacing: 10
-
- Layout.fillWidth: true
-
- Repeater {
- id: stateRepeater
- model: rootDelegate.supportedStates
-
- ColumnLayout {
- id: labelWithDelegatesColumn
- spacing: 4
-
- readonly property var states: modelData
- readonly property string statesAsString: states.join("\n")
-
- Label {
- text: statesAsString.length > 0 ? statesAsString : "normal"
-
- // 4 is the most states for any element (Button)
- Layout.preferredHeight: (fontMetrics.lineSpacing) * (rootDelegate.maxStateCombinations + 1)
- }
-
- ControlContainer {
- id: controlContainer
- objectName: controlName + "ControlContainer"
- controlMetaObject: rootDelegate.controlMetaObject
- states: labelWithDelegatesColumn.states
-
- Layout.alignment: Qt.AlignHCenter
- }
- }
- }
- }
-
- ExampleContainer {
- id: exampleContainer
- controlMetaObject: rootDelegate.controlMetaObject
- visible: !!controlMetaObject.exampleComponent
-
- Layout.alignment: Qt.AlignHCenter
- Layout.topMargin: visible ? 14 : 0
- Layout.fillWidth: true
- Layout.preferredHeight: visible ? implicitHeight : 0
- }
- }
- }
- }
-
- RowLayout {
- id: busyIndicatorRow
- anchors.centerIn: parent
- visible: false
-
- BusyIndicator {
- id: busyIndicator
- running: visible
- }
-
- Label {
- text: qsTr("Fixing assets...")
- font.pixelSize: Qt.application.font.pixelSize * 2
- }
- }
-
- ToolTip {
- id: infoToolTip
- x: (parent.width - width) / 2
- y: parent.height - height - 40
- parent: window.contentItem
- }
-}
-