summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-05-01 07:38:12 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-06-12 08:39:19 +0000
commit2715088397641a85c1fb61d64bdb4c677713337f (patch)
tree030309fb1dbf51553273f0b1948087088e6d4935 /tests/auto
parentb7f36051fb0bd16fa61e08ecd77978a45a125dea (diff)
Fine tune configure and clean up header includes
Previously configure was generating two config headers qtwebengine-config.h and qtwebengine-config_p.h, however those headers were never installed or included as dependency in Makefiles. Moreover, due to the name clash all features were included into qt_lib_webengine_*.pri which is QtWebEngine QML module. Move configure to core so all features belong now to qt_lib_webenginecore*.pri. Fix global includes to include qtwebenginecore-config*.h. Drop all DEFINES and use QT_CONFIG instead. Cleanup all evil looking includes in headers for webengine and webenginewidgets. Change-Id: Iddbc8bf4487d9a5f0c19a71a9569535083507756 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/quick/inspectorserver/inspectorserver.pro2
-rw-r--r--tests/auto/quick/inspectorserver/tst_inspectorserver.cpp2
-rw-r--r--tests/auto/quick/publicapi/publicapi.pro2
-rw-r--r--tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro2
-rw-r--r--tests/auto/quick/qquickwebengineview/qquickwebengineview.pro7
-rw-r--r--tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp12
-rw-r--r--tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro2
-rw-r--r--tests/auto/quick/quick.pro3
-rw-r--r--tests/auto/quick/shared/util.h6
-rw-r--r--tests/auto/quick/tests.pri9
-rw-r--r--tests/auto/widgets/tests.pri3
-rw-r--r--tests/auto/widgets/widgets.pro3
12 files changed, 23 insertions, 30 deletions
diff --git a/tests/auto/quick/inspectorserver/inspectorserver.pro b/tests/auto/quick/inspectorserver/inspectorserver.pro
index 1a2c2f053..fdc213f38 100644
--- a/tests/auto/quick/inspectorserver/inspectorserver.pro
+++ b/tests/auto/quick/inspectorserver/inspectorserver.pro
@@ -1,4 +1,4 @@
include(../tests.pri)
QT += webengine
-QT_PRIVATE += webengine-private
+QT_PRIVATE += core-private webengine-private webenginecore-private
DEFINES += IMPORT_DIR=\"\\\"$${ROOT_BUILD_DIR}$${QMAKE_DIR_SEP}imports\\\"\"
diff --git a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
index e45b4466c..5f47ee797 100644
--- a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
+++ b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
@@ -33,7 +33,7 @@
#include <QtQml/QQmlEngine>
#include <QtTest/QtTest>
#include <QQuickWebEngineProfile>
-#include <private/qquickwebengineview_p.h>
+#include <QtWebEngine/private/qquickwebengineview_p.h>
#define INSPECTOR_SERVER_PORT "23654"
static const QUrl s_inspectorServerHttpBaseUrl("http://localhost:" INSPECTOR_SERVER_PORT);
diff --git a/tests/auto/quick/publicapi/publicapi.pro b/tests/auto/quick/publicapi/publicapi.pro
index b178f56cd..c56fd2503 100644
--- a/tests/auto/quick/publicapi/publicapi.pro
+++ b/tests/auto/quick/publicapi/publicapi.pro
@@ -1,3 +1,3 @@
include(../tests.pri)
QT += webengine
-QT_PRIVATE += webengine-private
+QT_PRIVATE += core-private webengine-private webenginecore-private
diff --git a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro
index 826b47de7..699186741 100644
--- a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro
+++ b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro
@@ -1,6 +1,6 @@
include(../tests.pri)
exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-QT_PRIVATE += webengine-private
+QT_PRIVATE += core-private webengine-private webenginecore-private
HEADERS += ../shared/util.h
diff --git a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro
index 25bf44597..c253bc2a6 100644
--- a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro
+++ b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro
@@ -1,11 +1,6 @@
include(../tests.pri)
exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-QT_PRIVATE += webengine-private gui-private
+QT_PRIVATE += webengine-private gui-private webenginecore-private
HEADERS += ../shared/util.h
-
-qtConfig(webengine-printing-and-pdf) {
- DEFINES += ENABLE_PDF
-}
-
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index b252fa763..42e96c0f5 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -37,9 +37,9 @@
#include <QtQml/QQmlEngine>
#include <QtTest/QtTest>
#include <QtWebEngine/QQuickWebEngineProfile>
-#include <private/qinputmethod_p.h>
-#include <private/qquickwebengineview_p.h>
-#include <private/qquickwebenginesettings_p.h>
+#include <QtGui/private/qinputmethod_p.h>
+#include <QtWebEngine/private/qquickwebengineview_p.h>
+#include <QtWebEngine/private/qquickwebenginesettings_p.h>
#include <qpa/qplatforminputcontext.h>
#include <functional>
@@ -623,8 +623,8 @@ void tst_QQuickWebEngineView::setZoomFactor()
void tst_QQuickWebEngineView::printToPdf()
{
-#if !defined(ENABLE_PDF)
- QSKIP("ENABLE_PDF");
+#if !QT_CONFIG(webengine_printing_and_pdf)
+ QSKIP("no webengine-printing-and-pdf");
#else
QTemporaryDir tempDir(QDir::tempPath() + "/tst_qwebengineview-XXXXXX");
QVERIFY(tempDir.isValid());
@@ -650,7 +650,7 @@ void tst_QQuickWebEngineView::printToPdf()
QList<QVariant> failedArguments = savePdfSpy.takeFirst();
QVERIFY2(failedArguments.at(0).toString() == path, "File path for second saved PDF does not match arguments");
QVERIFY2(failedArguments.at(1).toBool() == false, "Printing to PDF file succeeded though it should fail");
-#endif // !defined(ENABLE_PDF)
+#endif // !QT_CONFIG(webengine_printing_and_pdf)
}
void tst_QQuickWebEngineView::stopSettingFocusWhenDisabled()
diff --git a/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro b/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro
index 2a2155e44..a0ee3fd89 100644
--- a/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro
+++ b/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro
@@ -1,4 +1,4 @@
include(../tests.pri)
CONFIG -= testcase # remove, once this passes in the CI
exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-QT_PRIVATE += webengine-private gui-private
+QT_PRIVATE += webengine-private gui-private webenginecore-private
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index a28a401e9..02ce59f17 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -1,4 +1,5 @@
-QT_FOR_CONFIG += webengine-private
+include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093
+QT_FOR_CONFIG += webenginecore-private
TEMPLATE = subdirs
diff --git a/tests/auto/quick/shared/util.h b/tests/auto/quick/shared/util.h
index bfe3ff9c6..c2e7d3e19 100644
--- a/tests/auto/quick/shared/util.h
+++ b/tests/auto/quick/shared/util.h
@@ -34,8 +34,8 @@
#include <QSignalSpy>
#include <QTimer>
#include <QtTest/QtTest>
-#include <private/qquickwebengineview_p.h>
-#include <private/qquickwebengineloadrequest_p.h>
+#include <QtWebEngine/private/qquickwebengineview_p.h>
+#include <QtWebEngine/private/qquickwebengineloadrequest_p.h>
#if !defined(TESTS_SOURCE_DIR)
#define TESTS_SOURCE_DIR ""
@@ -108,7 +108,7 @@ inline bool waitForLoadFailed(QQuickWebEngineView *webEngineView, int timeout =
inline bool waitForViewportReady(QQuickWebEngineView *webEngineView, int timeout = 10000)
{
-#ifdef ENABLE_QML_TESTSUPPORT_API
+#if QT_CONFIG(webengine_testsupport)
QSignalSpy spy(reinterpret_cast<QObject *>(webEngineView->testSupport()), SIGNAL(loadVisuallyCommitted()));
return spy.wait(timeout);
#else
diff --git a/tests/auto/quick/tests.pri b/tests/auto/quick/tests.pri
index 7983a248f..f809ebd68 100644
--- a/tests/auto/quick/tests.pri
+++ b/tests/auto/quick/tests.pri
@@ -1,5 +1,5 @@
-include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
-QT_FOR_CONFIG += webengine-private
+include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093
+QT_FOR_CONFIG += webenginecore-private
TEMPLATE = app
@@ -18,9 +18,4 @@ QT += testlib network quick webengine
# This define is used by some tests to look up resources in the source tree
DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\"
-
-qtConfig(webengine-testsupport) {
- DEFINES += ENABLE_QML_TESTSUPPORT_API
-}
-
include(../embed_info_plist.pri)
diff --git a/tests/auto/widgets/tests.pri b/tests/auto/widgets/tests.pri
index 5e6699cf8..7fd002235 100644
--- a/tests/auto/widgets/tests.pri
+++ b/tests/auto/widgets/tests.pri
@@ -1,4 +1,5 @@
-QT_FOR_CONFIG += webengine-private
+include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093
+QT_FOR_CONFIG += webenginecore-private
TEMPLATE = app
diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro
index 5a13e8075..778795743 100644
--- a/tests/auto/widgets/widgets.pro
+++ b/tests/auto/widgets/widgets.pro
@@ -1,4 +1,5 @@
-QT_FOR_CONFIG += webengine
+include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093
+QT_FOR_CONFIG += webenginecore
TEMPLATE = subdirs