diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-06-15 18:51:21 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2018-07-02 10:31:10 +0000 |
commit | ec127d7e4898940116be9fbbc8dc94b4cfa9b18c (patch) | |
tree | af9dc33792e1948bdc7362925ab68f74ee9085a8 /src/core/web_engine_context.h | |
parent | 59b8f28d029e45ac3b3e95edda82e6607a880979 (diff) |
Migrate from BUILDFLAG to QT_CONFIG
During configuration we mapped qt webengine fetures
to chromium ones and passed them to gn. We used BUILDFLAG to
optionally compile code in core. Use QT_CONFIG directly
for qt files and add config sanity checks to make
sure requested features are present.
Change-Id: I930df114ac9aec8e73139ea9135925fc3ad8e39c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/core/web_engine_context.h')
-rw-r--r-- | src/core/web_engine_context.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h index 646123121..0729144a0 100644 --- a/src/core/web_engine_context.h +++ b/src/core/web_engine_context.h @@ -40,14 +40,9 @@ #ifndef WEB_ENGINE_CONTEXT_H #define WEB_ENGINE_CONTEXT_H -#include "qtwebenginecoreglobal.h" - -#include "build/build_config.h" - +#include "build_config_qt.h" #include "base/memory/ref_counted.h" #include "base/values.h" -#include "printing/buildflags/buildflags.h" - #include <QVector> namespace base { @@ -59,11 +54,11 @@ class BrowserMainRunner; class ContentMainRunner; } -#if BUILDFLAG(ENABLE_BASIC_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) namespace printing { class PrintJobManager; } -#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) +#endif QT_FORWARD_DECLARE_CLASS(QObject) @@ -84,9 +79,9 @@ public: BrowserContextAdapter *defaultBrowserContext(); QObject *globalQObject(); -#if BUILDFLAG(ENABLE_BASIC_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) printing::PrintJobManager* getPrintJobManager(); -#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) +#endif void destroyBrowserContext(); void addBrowserContext(BrowserContextAdapter*); void removeBrowserContext(BrowserContextAdapter*); @@ -107,9 +102,9 @@ private: std::unique_ptr<DevToolsServerQt> m_devtoolsServer; QVector<BrowserContextAdapter*> m_browserContextAdapters; -#if BUILDFLAG(ENABLE_BASIC_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) std::unique_ptr<printing::PrintJobManager> m_printJobManager; -#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) +#endif static scoped_refptr<QtWebEngineCore::WebEngineContext> m_handle; static bool m_destroyed; }; |