summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-06-18 11:52:04 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-06-18 13:52:50 +0000
commit15c733d64cfa491868a3730b8dc59230157da17c (patch)
treea20d4e9b0cc902380b59726e2767186a9f74aa1f /examples/webenginewidgets
parent01777e8fcb4ca2e16bfa05c914cfdbcccf132bc9 (diff)
Add sanity config check to examples
Report error if example is used, but no support in webengine. Change-Id: Ic1c8f6c875c0197abdc9ffe92eea05af236c3318 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'examples/webenginewidgets')
-rw-r--r--examples/webenginewidgets/maps/maps.pro5
-rw-r--r--examples/webenginewidgets/spellchecker/spellchecker.pro4
2 files changed, 9 insertions, 0 deletions
diff --git a/examples/webenginewidgets/maps/maps.pro b/examples/webenginewidgets/maps/maps.pro
index 3fee49077..b1cb3b28b 100644
--- a/examples/webenginewidgets/maps/maps.pro
+++ b/examples/webenginewidgets/maps/maps.pro
@@ -10,3 +10,8 @@ SOURCES += main.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/maps
INSTALLS += target
+
+!qtConfig(webengine-geolocation) {
+ error('Qt WebEngine compiled without geolocaton support, this example will not work.')
+}
+
diff --git a/examples/webenginewidgets/spellchecker/spellchecker.pro b/examples/webenginewidgets/spellchecker/spellchecker.pro
index e1f6c6341..682f118fe 100644
--- a/examples/webenginewidgets/spellchecker/spellchecker.pro
+++ b/examples/webenginewidgets/spellchecker/spellchecker.pro
@@ -6,6 +6,10 @@ TARGET = spellchecker
QT += webenginewidgets
CONFIG += c++11
+!qtConfig(webengine-spellchecker) {
+ error("Qt WebEngine compiled without spellchecker support, this example will not work.")
+}
+
qtConfig(webengine-native-spellchecker) {
error("Spellcheck example can not be built when using native OS dictionaries.")
}