summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-04-21 15:38:34 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-04-28 11:38:11 +0000
commit1aa24b25a99335e350503fb45a0bca2f25d3dd05 (patch)
tree1456b5a7ffba2364e535194a58f6122a1f449c05 /src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp
parent380aad323cd622aa500fa31e195da40c8b660bc1 (diff)
downloadqtlocation-1aa24b25a99335e350503fb45a0bca2f25d3dd05.tar.gz
Enable Mapbox GL plugin on MinGW builds
Qt CI is using MinGW 5.3.0 that should do the job compiling Mapbox GL. For now, only the ANGLE OpenGL backend is supported on Windows for this plugin. I.e. you need to set QT_OPENGL=angle or Qt::AA_UseOpenGLES. Task-number: QTBUG-60110 Change-Id: Iebd4d1569191f47a14b264c489b5d3fb23338d78 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp')
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp
index 30c01f8c..fb8dd19e 100644
--- a/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp
@@ -38,6 +38,7 @@
#include "qgeoserviceproviderpluginmapboxgl.h"
#include "qgeomappingmanagerenginemapboxgl.h"
+#include <QtGui/QOpenGLContext>
QT_BEGIN_NAMESPACE
@@ -54,6 +55,15 @@ QGeoCodingManagerEngine *QGeoServiceProviderFactoryMapboxGL::createGeocodingMana
QGeoMappingManagerEngine *QGeoServiceProviderFactoryMapboxGL::createMappingManagerEngine(
const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const
{
+#ifdef Q_OS_WIN
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGLES) {
+ qWarning("The Mapbox GL plugin only supports OpenGL ES on Windows. \
+ Try setting the environment variable QT_OPENGL to 'angle'.");
+
+ return 0;
+ }
+#endif
+
return new QGeoMappingManagerEngineMapboxGL(parameters, error, errorString);
}