aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmltest/quicktest.cpp')
-rw-r--r--src/qmltest/quicktest.cpp32
1 files changed, 2 insertions, 30 deletions
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;