summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-06-18 11:20:03 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-06-18 13:53:01 +0000
commit13215272d29fcd99d79b590cb03bb0e0487f5838 (patch)
tree56ed1ef0e087130c109b00487d1b70fdddfafb4f
parent15c733d64cfa491868a3730b8dc59230157da17c (diff)
Fix webengine geolocation feature
Use feature check in the configuration and in the implementation files. Make feature public, so developers can check if webengine was complied with or without geolocation. Change-Id: If679b5c366074c2f48fad5ba189870571567fe81 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r--examples/webenginewidgets/webenginewidgets.pro2
-rw-r--r--src/core/configure.json2
-rw-r--r--src/core/content_browser_client_qt.cpp4
-rw-r--r--src/core/core_chromium.pri5
-rw-r--r--src/core/core_common.pri2
-rw-r--r--src/core/location_provider_qt.h2
6 files changed, 7 insertions, 10 deletions
diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro
index 6b0e6df42..feabadec6 100644
--- a/examples/webenginewidgets/webenginewidgets.pro
+++ b/examples/webenginewidgets/webenginewidgets.pro
@@ -13,7 +13,7 @@ SUBDIRS += \
stylesheetbrowser \
videoplayer
-qtHaveModule(positioning): SUBDIRS += maps
+qtConfig(webengine-geolocation): SUBDIRS += maps
qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile {
SUBDIRS += spellchecker
diff --git a/src/core/configure.json b/src/core/configure.json
index 518ec982f..f933ceb5a 100644
--- a/src/core/configure.json
+++ b/src/core/configure.json
@@ -469,7 +469,7 @@
"webengine-geolocation": {
"label": "Geolocation",
"condition": "module.positioning",
- "output": [ "privateFeature" ]
+ "output": [ "publicFeature" ]
},
"webengine-pulseaudio": {
"label": "Use PulseAudio",
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 0a83ceacd..b7e894938 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -123,7 +123,7 @@
#include "renderer_host/pepper/pepper_host_factory_qt.h"
#endif
-#if defined(QT_USE_POSITIONING)
+#if QT_CONFIG(webengine_geolocation)
#include "location_provider_qt.h"
#endif
@@ -731,7 +731,7 @@ bool ContentBrowserClientQt::CanCreateWindow(
std::unique_ptr<device::LocationProvider> ContentBrowserClientQt::OverrideSystemLocationProvider()
{
-#if defined(QT_USE_POSITIONING)
+#if QT_CONFIG(webengine_geolocation)
return base::WrapUnique(new LocationProviderQt());
#else
return nullptr;
diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri
index 12cccc045..f2b529951 100644
--- a/src/core/core_chromium.pri
+++ b/src/core/core_chromium.pri
@@ -1,5 +1,5 @@
include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri)
-QT_FOR_CONFIG += webenginecore-private
+QT_FOR_CONFIG += webenginecore webenginecore-private
qtConfig(debug_and_release): CONFIG += debug_and_release
@@ -260,8 +260,7 @@ contains(QT_CONFIG, opengl) {
stream_video_node.h
}
-qtHaveModule(positioning) {
+qtConfig(webengine-geolocation) {
SOURCES += location_provider_qt.cpp
HEADERS += location_provider_qt.h
- DEFINES += QT_USE_POSITIONING=1
}
diff --git a/src/core/core_common.pri b/src/core/core_common.pri
index 370fe4d2a..3ce53bba4 100644
--- a/src/core/core_common.pri
+++ b/src/core/core_common.pri
@@ -5,4 +5,4 @@ TARGET = QtWebEngineCore
QT += qml quick webchannel
QT_PRIVATE += quick-private gui-private core-private webenginecoreheaders-private
-qtHaveModule(positioning):QT += positioning
+qtConfig(webengine-geolocation): QT += positioning
diff --git a/src/core/location_provider_qt.h b/src/core/location_provider_qt.h
index 5c59b07ed..cbf60100b 100644
--- a/src/core/location_provider_qt.h
+++ b/src/core/location_provider_qt.h
@@ -76,8 +76,6 @@ private:
LocationProviderUpdateCallback m_callback;
QtPositioningHelper *m_positioningHelper;
};
-//#define QT_USE_POSITIONING 1
-
} // namespace QtWebEngineCore
#endif // LOCATION_PROVIDER_QT_H