diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-05-01 07:38:12 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2018-06-12 08:39:19 +0000 |
commit | 2715088397641a85c1fb61d64bdb4c677713337f (patch) | |
tree | 030309fb1dbf51553273f0b1948087088e6d4935 /src/webengine/api/qquickwebengineview.cpp | |
parent | b7f36051fb0bd16fa61e08ecd77978a45a125dea (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 'src/webengine/api/qquickwebengineview.cpp')
-rw-r--r-- | src/webengine/api/qquickwebengineview.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index ba7377c2c..8d5d843bf 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -39,7 +39,7 @@ #include "qquickwebengineview_p.h" #include "qquickwebengineview_p_p.h" - +#include "qtwebenginecoreglobal_p.h" #include "authentication_dialog_controller.h" #include "browser_context_adapter.h" #include "certificate_error_controller.h" @@ -59,7 +59,7 @@ #include "qwebenginequotarequest.h" #include "qwebengineregisterprotocolhandlerrequest.h" -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) #include "qquickwebenginetestsupport_p.h" #endif @@ -87,8 +87,8 @@ #include <QScreen> #include <QUrl> #include <QTimer> -#include <private/qguiapplication_p.h> -#include <qpa/qplatformintegration.h> +#include <QtGui/private/qguiapplication_p.h> +#include <QtGui/qpa/qplatformintegration.h> QT_BEGIN_NAMESPACE using namespace QtWebEngineCore; @@ -107,7 +107,7 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate() , adapter(QSharedPointer<WebContentsAdapter>::create()) , m_history(new QQuickWebEngineHistory(this)) , m_settings(new QQuickWebEngineSettings(m_profile->settings())) -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) , m_testSupport(0) #endif , contextMenuExtraItems(0) @@ -384,7 +384,7 @@ void QQuickWebEngineViewPrivate::loadStarted(const QUrl &provisionalUrl, bool is { Q_Q(QQuickWebEngineView); if (isErrorPage) { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) if (m_testSupport) m_testSupport->errorPage()->loadStarted(provisionalUrl); #endif @@ -409,7 +409,7 @@ void QQuickWebEngineViewPrivate::loadCommitted() void QQuickWebEngineViewPrivate::loadVisuallyCommitted() { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) if (m_testSupport) Q_EMIT m_testSupport->loadVisuallyCommitted(); #endif @@ -424,7 +424,7 @@ void QQuickWebEngineViewPrivate::loadFinished(bool success, const QUrl &url, boo Q_Q(QQuickWebEngineView); if (isErrorPage) { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) if (m_testSupport) m_testSupport->errorPage()->loadFinished(success, url); #endif @@ -517,7 +517,7 @@ void QQuickWebEngineViewPrivate::close() void QQuickWebEngineViewPrivate::windowCloseRejected() { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) if (m_testSupport) Q_EMIT m_testSupport->windowCloseRejected(); #endif @@ -930,7 +930,7 @@ void QQuickWebEngineViewPrivate::setProfile(QQuickWebEngineProfile *profile) } } -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) QQuickWebEngineTestSupport *QQuickWebEngineView::testSupport() const { Q_D(const QQuickWebEngineView); @@ -1141,7 +1141,7 @@ bool QQuickWebEngineView::recentlyAudible() const void QQuickWebEngineView::printToPdf(const QString& filePath, PrintedPageSizeId pageSizeId, PrintedPageOrientation orientation) { -#if defined(ENABLE_PDF) +#if QT_CONFIG(webengine_printing_and_pdf) Q_D(QQuickWebEngineView); QPageSize layoutSize(static_cast<QPageSize::PageSizeId>(pageSizeId)); QPageLayout::Orientation layoutOrientation = static_cast<QPageLayout::Orientation>(orientation); @@ -1157,7 +1157,7 @@ void QQuickWebEngineView::printToPdf(const QString& filePath, PrintedPageSizeId void QQuickWebEngineView::printToPdf(const QJSValue &callback, PrintedPageSizeId pageSizeId, PrintedPageOrientation orientation) { -#if defined(ENABLE_PDF) +#if QT_CONFIG(webengine_printing_and_pdf) Q_D(QQuickWebEngineView); QPageSize layoutSize(static_cast<QPageSize::PageSizeId>(pageSizeId)); QPageLayout::Orientation layoutOrientation = static_cast<QPageLayout::Orientation>(orientation); |