summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/CMakeLists.txt17
-rw-r--r--tests/auto/gui/kernel/kernel.pro3
-rw-r--r--tests/auto/gui/kernel/qaction/CMakeLists.txt4
-rw-r--r--tests/auto/gui/kernel/qaction/qaction.pro2
-rw-r--r--tests/auto/gui/kernel/qactiongroup/CMakeLists.txt4
-rw-r--r--tests/auto/gui/kernel/qactiongroup/qactiongroup.pro2
-rw-r--r--tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qaddpostroutine/qaddpostroutine.pro7
-rw-r--r--tests/auto/gui/kernel/qaddpostroutine/tst_qaddpostroutine.cpp66
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp4
-rw-r--r--tests/auto/gui/kernel/qhighdpiscaling/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qshortcut/CMakeLists.txt4
-rw-r--r--tests/auto/gui/kernel/qshortcut/qshortcut.pro2
13 files changed, 126 insertions, 15 deletions
diff --git a/tests/auto/gui/kernel/CMakeLists.txt b/tests/auto/gui/kernel/CMakeLists.txt
index ecac48d1c1..1cb38a7c9e 100644
--- a/tests/auto/gui/kernel/CMakeLists.txt
+++ b/tests/auto/gui/kernel/CMakeLists.txt
@@ -1,17 +1,18 @@
# Generated from kernel.pro.
+if(QT_FEATURE_action)
+ add_subdirectory(qaction)
+ add_subdirectory(qactiongroup)
+endif()
add_subdirectory(qbackingstore)
add_subdirectory(qcursor)
add_subdirectory(qdrag)
add_subdirectory(qevent)
add_subdirectory(qfileopenevent)
add_subdirectory(qguieventdispatcher)
-add_subdirectory(qguimetatype)
add_subdirectory(qguitimer)
-add_subdirectory(qguivariant)
add_subdirectory(qinputmethod)
add_subdirectory(qkeyevent)
-add_subdirectory(qkeysequence)
add_subdirectory(qmouseevent)
add_subdirectory(qpalette)
add_subdirectory(qscreen)
@@ -20,12 +21,22 @@ add_subdirectory(qwindow)
add_subdirectory(qguiapplication)
add_subdirectory(qpixelformat)
add_subdirectory(qrasterwindow)
+add_subdirectory(qaddpostroutine)
if(NOT ANDROID AND NOT UIKIT)
add_subdirectory(qclipboard)
endif()
if(TARGET Qt::Network)
add_subdirectory(qguieventloop)
endif()
+if(QT_FEATURE_shortcut)
+ add_subdirectory(qguimetatype)
+ add_subdirectory(qguivariant)
+ add_subdirectory(qkeysequence)
+ add_subdirectory(qshortcut)
+endif()
+if(QT_FEATURE_highdpiscaling)
+ add_subdirectory(qhighdpiscaling)
+endif()
if(TARGET Qt::Widgets)
add_subdirectory(qmouseevent_modal)
add_subdirectory(qtouchevent)
diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro
index 5a935699c5..85bebbddc9 100644
--- a/tests/auto/gui/kernel/kernel.pro
+++ b/tests/auto/gui/kernel/kernel.pro
@@ -28,7 +28,8 @@ SUBDIRS=\
qguiapplication \
qpixelformat \
qopenglwindow \
- qrasterwindow
+ qrasterwindow \
+ qaddpostroutine
win32:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop
diff --git a/tests/auto/gui/kernel/qaction/CMakeLists.txt b/tests/auto/gui/kernel/qaction/CMakeLists.txt
index c14444c123..bdd1a1d165 100644
--- a/tests/auto/gui/kernel/qaction/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qaction/CMakeLists.txt
@@ -1,10 +1,10 @@
# Generated from qaction.pro.
#####################################################################
-## tst_qaction Test:
+## tst_qaction_kernel Test:
#####################################################################
-add_qt_test(tst_qaction
+add_qt_test(tst_qaction_kernel
SOURCES
tst_qaction.cpp
PUBLIC_LIBRARIES
diff --git a/tests/auto/gui/kernel/qaction/qaction.pro b/tests/auto/gui/kernel/qaction/qaction.pro
index fae8d826f4..83e8296e68 100644
--- a/tests/auto/gui/kernel/qaction/qaction.pro
+++ b/tests/auto/gui/kernel/qaction/qaction.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
-TARGET = tst_qaction
+TARGET = tst_qaction_kernel
QT += gui-private core-private testlib
SOURCES += tst_qaction.cpp
diff --git a/tests/auto/gui/kernel/qactiongroup/CMakeLists.txt b/tests/auto/gui/kernel/qactiongroup/CMakeLists.txt
index 6ef659ebc1..bcab5e05a2 100644
--- a/tests/auto/gui/kernel/qactiongroup/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qactiongroup/CMakeLists.txt
@@ -1,10 +1,10 @@
# Generated from qactiongroup.pro.
#####################################################################
-## tst_qactiongroup Test:
+## tst_qactiongroup_kernel Test:
#####################################################################
-add_qt_test(tst_qactiongroup
+add_qt_test(tst_qactiongroup_kernel
SOURCES
tst_qactiongroup.cpp
PUBLIC_LIBRARIES
diff --git a/tests/auto/gui/kernel/qactiongroup/qactiongroup.pro b/tests/auto/gui/kernel/qactiongroup/qactiongroup.pro
index 81ceb10429..a60109c63e 100644
--- a/tests/auto/gui/kernel/qactiongroup/qactiongroup.pro
+++ b/tests/auto/gui/kernel/qactiongroup/qactiongroup.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
-TARGET = tst_qactiongroup
+TARGET = tst_qactiongroup_kernel
QT += testlib
SOURCES += tst_qactiongroup.cpp
diff --git a/tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt b/tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt
new file mode 100644
index 0000000000..4af9ebedd5
--- /dev/null
+++ b/tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qaddpostroutine.pro.
+
+#####################################################################
+## tst_qaddpostroutine Test:
+#####################################################################
+
+qt_add_test(tst_qaddpostroutine
+ SOURCES
+ tst_qaddpostroutine.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qaddpostroutine/qaddpostroutine.pro b/tests/auto/gui/kernel/qaddpostroutine/qaddpostroutine.pro
new file mode 100644
index 0000000000..e67720b5d5
--- /dev/null
+++ b/tests/auto/gui/kernel/qaddpostroutine/qaddpostroutine.pro
@@ -0,0 +1,7 @@
+CONFIG += testcase
+TARGET = tst_qaddpostroutine
+
+QT += testlib
+
+SOURCES += tst_qaddpostroutine.cpp
+
diff --git a/tests/auto/gui/kernel/qaddpostroutine/tst_qaddpostroutine.cpp b/tests/auto/gui/kernel/qaddpostroutine/tst_qaddpostroutine.cpp
new file mode 100644
index 0000000000..500543d2e1
--- /dev/null
+++ b/tests/auto/gui/kernel/qaddpostroutine/tst_qaddpostroutine.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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:GPL-EXCEPT$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+#include <QTimer>
+
+static bool done = false;
+
+static void cleanup()
+{
+ done = true;
+ QEventLoop loop;
+ QTimer::singleShot(100,&loop, &QEventLoop::quit);
+ loop.exec();
+}
+
+struct tst_qAddPostRoutine : public QObject
+{
+public:
+ tst_qAddPostRoutine();
+ ~tst_qAddPostRoutine();
+};
+
+tst_qAddPostRoutine::tst_qAddPostRoutine()
+{
+ qAddPostRoutine(cleanup);
+}
+
+tst_qAddPostRoutine::~tst_qAddPostRoutine()
+{
+ Q_ASSERT(done);
+}
+int main(int argc, char *argv[])
+{
+ tst_qAddPostRoutine tc;
+ QGuiApplication app(argc, argv);
+ app.setAttribute(Qt::AA_Use96Dpi, true);
+ QTEST_SET_MAIN_SOURCE_PATH
+ return QTest::qExec(&tc, argc, argv);
+}
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index bff9f7d0e0..e099b4dfc7 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -289,10 +289,10 @@ void tst_QClipboard::copyImage()
image.fill(QColor(Qt::transparent));
image.setPixel(QPoint(1, 0), QColor(Qt::blue).rgba());
QGuiApplication::clipboard()->setImage(image);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// The Pasteboard needs a moment to breathe (at least on older Macs).
QTest::qWait(100);
-#endif // Q_OS_OSX
+#endif // Q_OS_MACOS
// paster will perform hard-coded checks on the copied image.
QByteArray errorMessage;
QVERIFY2(runHelper(QStringLiteral("paster/paster"),
diff --git a/tests/auto/gui/kernel/qhighdpiscaling/CMakeLists.txt b/tests/auto/gui/kernel/qhighdpiscaling/CMakeLists.txt
new file mode 100644
index 0000000000..69cff9229f
--- /dev/null
+++ b/tests/auto/gui/kernel/qhighdpiscaling/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qhighdpiscaling.pro.
+
+#####################################################################
+## tst_qhighdpiscaling Test:
+#####################################################################
+
+qt_add_test(tst_qhighdpiscaling
+ SOURCES
+ tst_qhighdpiscaling.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qshortcut/CMakeLists.txt b/tests/auto/gui/kernel/qshortcut/CMakeLists.txt
index 66ad66335e..fab20dceed 100644
--- a/tests/auto/gui/kernel/qshortcut/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qshortcut/CMakeLists.txt
@@ -1,10 +1,10 @@
# Generated from qshortcut.pro.
#####################################################################
-## tst_qshortcut Test:
+## tst_qshortcut_kernel Test:
#####################################################################
-add_qt_test(tst_qshortcut
+add_qt_test(tst_qshortcut_kernel
SOURCES
tst_qshortcut.cpp
PUBLIC_LIBRARIES
diff --git a/tests/auto/gui/kernel/qshortcut/qshortcut.pro b/tests/auto/gui/kernel/qshortcut/qshortcut.pro
index e7e37663e0..5dc016b099 100644
--- a/tests/auto/gui/kernel/qshortcut/qshortcut.pro
+++ b/tests/auto/gui/kernel/qshortcut/qshortcut.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
-TARGET = tst_qshortcut
+TARGET = tst_qshortcut_kernel
QT += testlib
SOURCES += tst_qshortcut.cpp