aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qmltest/CMakeLists.txt7
-rw-r--r--src/qmltest/quicktest.cpp32
2 files changed, 2 insertions, 37 deletions
diff --git a/src/qmltest/CMakeLists.txt b/src/qmltest/CMakeLists.txt
index dd8139af9d..0e9d5c73f6 100644
--- a/src/qmltest/CMakeLists.txt
+++ b/src/qmltest/CMakeLists.txt
@@ -43,13 +43,6 @@ qt_internal_add_module(QuickTest
## Scopes:
#####################################################################
-qt_internal_extend_target(QuickTest CONDITION TARGET Qt::Widgets
- DEFINES
- QT_QMLTEST_WITH_WIDGETS
- PUBLIC_LIBRARIES
- Qt::Widgets
-)
-
qt_internal_extend_target(QuickTest CONDITION QT_FEATURE_qml_debug
DEFINES
QT_QML_DEBUG_NO_WARNING
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index 9085f96337..78937766cb 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -72,10 +72,6 @@
#include <private/qqmlcomponent_p.h>
#include <private/qv4resolvedtypereference_p.h>
-#ifdef QT_QMLTEST_WITH_WIDGETS
-#include <QtWidgets/QApplication>
-#endif
-
QT_BEGIN_NAMESPACE
/*!
@@ -362,28 +358,9 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD
int quick_test_main_with_setup(int argc, char **argv, const char *name, const char *sourceDir, QObject *setup)
{
- // Peek at arguments to check for '-widgets' argument
-#ifdef QT_QMLTEST_WITH_WIDGETS
- bool withWidgets = false;
- for (int index = 1; index < argc; ++index) {
- if (strcmp(argv[index], "-widgets") == 0) {
- withWidgets = true;
- break;
- }
- }
-#endif
-
QCoreApplication *app = nullptr;
- if (!QCoreApplication::instance()) {
-#ifdef QT_QMLTEST_WITH_WIDGETS
- if (withWidgets)
- app = new QApplication(argc, argv);
- else
-#endif
- {
- app = new QGuiApplication(argc, argv);
- }
- }
+ if (!QCoreApplication::instance())
+ app = new QGuiApplication(argc, argv);
if (setup)
maybeInvokeSetupMethod(setup, "applicationAvailable()");
@@ -415,11 +392,6 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch
index += 2;
} else if (strcmp(argv[index], "-opengl") == 0) {
++index;
-#ifdef QT_QMLTEST_WITH_WIDGETS
- } else if (strcmp(argv[index], "-widgets") == 0) {
- withWidgets = true;
- ++index;
-#endif
} else if (strcmp(argv[index], "-translation") == 0 && (index + 1) < argc) {
translationFile = stripQuotes(QString::fromLocal8Bit(argv[index + 1]));
index += 2;