summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_view_qt.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-06-15 18:51:21 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-07-02 10:31:10 +0000
commitec127d7e4898940116be9fbbc8dc94b4cfa9b18c (patch)
treeaf9dc33792e1948bdc7362925ab68f74ee9085a8 /src/core/web_contents_view_qt.cpp
parent59b8f28d029e45ac3b3e95edda82e6607a880979 (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_contents_view_qt.cpp')
-rw-r--r--src/core/web_contents_view_qt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp
index 1727d2d49..a60454fa8 100644
--- a/src/core/web_contents_view_qt.cpp
+++ b/src/core/web_contents_view_qt.cpp
@@ -184,7 +184,7 @@ static inline WebEngineContextMenuData fromParams(const content::ContextMenuPara
ret.setEditFlags((WebEngineContextMenuData::EditFlags)params.edit_flags);
ret.setSuggestedFileName(toQt(params.suggested_filename.data()));
ret.setIsEditable(params.is_editable);
-#if BUILDFLAG(ENABLE_SPELLCHECK)
+#if QT_CONFIG(webengine_spellchecker)
ret.setMisspelledWord(toQt(params.misspelled_word));
ret.setSpellCheckerSuggestions(fromVector(params.dictionary_suggestions));
#endif
@@ -197,7 +197,7 @@ static inline WebEngineContextMenuData fromParams(const content::ContextMenuPara
void WebContentsViewQt::ShowContextMenu(content::RenderFrameHost *, const content::ContextMenuParams &params)
{
WebEngineContextMenuData contextMenuData(fromParams(params));
-#if BUILDFLAG(ENABLE_SPELLCHECK)
+#if QT_CONFIG(webengine_spellchecker)
// Do not use params.spellcheck_enabled, since it is never
// correctly initialized for chrome asynchronous spellchecking.
// Even fixing the initialization in ContextMenuClientImpl::showContextMenu