summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/shared/util.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-10-02 16:23:09 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-10-22 18:03:15 +0200
commit229621361562d0e89aeb5f2d2f0ace0115bf164c (patch)
tree4bf2425711971e24a83138cd20811cecf676eb33 /tests/auto/quick/shared/util.h
parentb3f9b66e6b43087873c7fc6518c0197201fd04c7 (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts: examples/webengine/minimal/main.cpp src/3rdparty src/core/net/url_request_custom_job.cpp tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp Change-Id: I33994024a4be5ed787800c5718a0a443b970c36d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'tests/auto/quick/shared/util.h')
-rw-r--r--tests/auto/quick/shared/util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/quick/shared/util.h b/tests/auto/quick/shared/util.h
index c2e7d3e19..bc5ae445b 100644
--- a/tests/auto/quick/shared/util.h
+++ b/tests/auto/quick/shared/util.h
@@ -36,6 +36,7 @@
#include <QtTest/QtTest>
#include <QtWebEngine/private/qquickwebengineview_p.h>
#include <QtWebEngine/private/qquickwebengineloadrequest_p.h>
+#include <QGuiApplication>
#if !defined(TESTS_SOURCE_DIR)
#define TESTS_SOURCE_DIR ""
@@ -182,4 +183,15 @@ inline QString activeElementId(QQuickWebEngineView *webEngineView)
return arguments.at(1).toString();
}
+#define W_QTEST_MAIN(TestObject) \
+int main(int argc, char *argv[]) \
+{ \
+ QtWebEngine::initialize(); \
+ QGuiApplication app(argc, argv); \
+ app.setAttribute(Qt::AA_Use96Dpi, true); \
+ TestObject tc; \
+ QTEST_SET_MAIN_SOURCE_PATH \
+ return QTest::qExec(&tc, argc, argv); \
+}
#endif /* UTIL_H */
+