summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-11-20 12:49:06 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-11-20 12:49:06 (GMT)
commit485a631f2ae06e3328176049c51053e3047448bb (patch)
tree76ed7ca62abd4e9bdd24ba779df7c5c00609a028
parent361a72a861a213a7bc735fbce7c3433a2f6a08cc (diff)
parentafc51951769ac7320a98a973bcb95a12bc970019 (diff)
downloadqtlocation-485a631f2ae06e3328176049c51053e3047448bb.tar.gz
Merge 5.10 into 5.10.0
Change-Id: I81af4fc4e6dcc204b3657ec321820d6c7109e336
-rw-r--r--src/3rdparty/icu_dependency.pri13
m---------src/3rdparty/mapbox-gl-native0
-rw-r--r--src/location/configure.json2
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap.cpp2
-rw-r--r--src/location/declarativemaps/qdeclarativepolygonmapitem.cpp1
-rw-r--r--src/location/doc/src/plugins/mapboxgl.qdoc8
-rw-r--r--src/plugins/geoservices/mapboxgl/mapboxgl.pro11
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp13
-rw-r--r--src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp9
9 files changed, 27 insertions, 32 deletions
diff --git a/src/3rdparty/icu_dependency.pri b/src/3rdparty/icu_dependency.pri
deleted file mode 100644
index 6318631..0000000
--- a/src/3rdparty/icu_dependency.pri
+++ /dev/null
@@ -1,13 +0,0 @@
-win32 {
- CONFIG(static, static|shared) {
- CONFIG(debug, debug|release) {
- LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd
- } else {
- LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt
- }
- } else {
- LIBS_PRIVATE += -licuin -licuuc -licudt
- }
-} else {
- LIBS_PRIVATE += -licui18n -licuuc -licudata
-}
diff --git a/src/3rdparty/mapbox-gl-native b/src/3rdparty/mapbox-gl-native
-Subproject 1c633072fcea7ad153ab6f8ec40dd72d83541ea
+Subproject 572822c8ca15be190b43afbf7f91d132e988bf2
diff --git a/src/location/configure.json b/src/location/configure.json
index 3337b07..4de6e86 100644
--- a/src/location/configure.json
+++ b/src/location/configure.json
@@ -37,7 +37,7 @@
"condition": [
"features.opengl",
"features.c++14",
- "!config.qnx && (!config.win32 || (config.mingw && features.angle))"
+ "!config.qnx && (!config.win32 || config.mingw)"
],
"output": [ "privateFeature" ]
},
diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp
index 7087a50..34885f5 100644
--- a/src/location/declarativemaps/qdeclarativegeomap.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomap.cpp
@@ -2271,7 +2271,7 @@ bool QDeclarativeGeoMap::sendTouchEvent(QTouchEvent *event)
auto touchPointGrabberItem = [touchDevice, windowPriv](const QTouchEvent::TouchPoint &point) -> QQuickItem* {
if (QQuickEventPoint *eventPointer = windowPriv->pointerEventInstance(touchDevice)->pointById(point.id()))
- return eventPointer->grabber();
+ return eventPointer->grabberItem();
return nullptr;
};
diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
index b481c64..7460a37 100644
--- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
+++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
@@ -374,6 +374,7 @@ void QDeclarativePolygonMapItem::setMap(QDeclarativeGeoMap *quickMap, QGeoMap *m
This property holds the ordered list of coordinates which
define the polygon.
+ Having less than 3 different coordinates in the path results in undefined behavior.
\sa addCoordinate, removeCoordinate
*/
diff --git a/src/location/doc/src/plugins/mapboxgl.qdoc b/src/location/doc/src/plugins/mapboxgl.qdoc
index 9099fb3..8ad6a9c 100644
--- a/src/location/doc/src/plugins/mapboxgl.qdoc
+++ b/src/location/doc/src/plugins/mapboxgl.qdoc
@@ -60,7 +60,7 @@ and tiles hosted by Mapbox. To create a Mapbox account visit \l{https://www.mapb
Qt Location Mapbox GL Plugin has the following support for platforms:
\list
- \li Microsoft Windows (win32) - Supported, requires MinGW 5.0+ and ANGLE as OpenGL backend
+ \li Microsoft Windows (win32) - Supported, requires MinGW 5.0+
\li Linux X11 - Supported, requires GCC 4.9+
\li macOS - Supported
\li Android - Supported
@@ -109,6 +109,12 @@ The following table lists optional parameters that can be passed to the Mapbox p
but the offline database must be populated using the \l {https://github.com/mapbox/mapbox-gl-native/blob/master/bin/offline.cpp}
{offline tool}. The offline database will work alongside with the ambient cache in the same file.
Make sure to comply with Mapbox Terms of Service before creating an offline database.
+
+ \b {Note:} The map tile cache file name must be "mapboxgl.db". When using the offline tool, the default
+ output is "offline.db". For using the generated output from the offline tool, you must move that to the
+ proper directory, and rename it as "mapboxgl.db". The offline tool also provides the "--output"
+ parameter for specifying the name of the generated output.
+
\row
\li mapboxgl.mapping.cache.memory
\li Whether or not the cache should be in-memory only. Valid values are \b true and \b false. The default
diff --git a/src/plugins/geoservices/mapboxgl/mapboxgl.pro b/src/plugins/geoservices/mapboxgl/mapboxgl.pro
index f35f26d..17b6f53 100644
--- a/src/plugins/geoservices/mapboxgl/mapboxgl.pro
+++ b/src/plugins/geoservices/mapboxgl/mapboxgl.pro
@@ -35,16 +35,7 @@ load(qt_build_paths)
LIBS_PRIVATE += -L$$MODULE_BASE_OUTDIR/lib -lqmapboxgl$$qtPlatformTargetSuffix()
qtConfig(icu) {
- include(../../../3rdparty/icu_dependency.pri)
-}
-
-# When building for Windows with dynamic OpenGL, this plugin
-# can only run with ANGLE because Mapbox GL requires at least
-# OpenGL ES and does not use QOpenGLFunctions for resolving
-# the OpenGL symbols. -lopengl32 only gives OpenGL 1.1.
-win32:qtConfig(dynamicgl) {
- qtConfig(combined-angle-lib): LIBS_PRIVATE += -l$${LIBQTANGLE_NAME}
- else: LIBS_PRIVATE += -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME}
+ QMAKE_USE_PRIVATE += icu
}
PLUGIN_TYPE = geoservices
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
index 69bb6e4..f39bfae 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
@@ -124,7 +124,10 @@ QMapbox::Feature featureFromMapPolygon(QDeclarativePolygonMapItem *mapItem)
coordinates << QMapbox::Coordinate { coordinate.latitude(), coordinate.longitude() };
}
}
- coordinates.append(coordinates.first());
+
+ if (!coordinates.empty())
+ coordinates.append(coordinates.first()); // closing the path
+
QMapbox::CoordinatesCollections geometry { { coordinates } };
return QMapbox::Feature(QMapbox::Feature::PolygonType, geometry, {}, getId(mapItem));
@@ -381,7 +384,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
const QString id = getId(item);
changes << QSharedPointer<QMapboxGLStyleChange>(
- new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->mapItemOpacity()));
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->color().alphaF() * item->mapItemOpacity()));
changes << QSharedPointer<QMapboxGLStyleChange>(
new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-color"), item->color()));
changes << QSharedPointer<QMapboxGLStyleChange>(
@@ -398,7 +401,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
const QString id = getId(item);
changes << QSharedPointer<QMapboxGLStyleChange>(
- new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->mapItemOpacity()));
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->color().alphaF() * item->mapItemOpacity()));
changes << QSharedPointer<QMapboxGLStyleChange>(
new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-color"), item->color()));
changes << QSharedPointer<QMapboxGLStyleChange>(
@@ -415,7 +418,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
const QString id = getId(item);
changes << QSharedPointer<QMapboxGLStyleChange>(
- new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->mapItemOpacity()));
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->color().alphaF() * item->mapItemOpacity()));
changes << QSharedPointer<QMapboxGLStyleChange>(
new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-color"), item->color()));
changes << QSharedPointer<QMapboxGLStyleChange>(
@@ -432,7 +435,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
const QString id = getId(item);
changes << QSharedPointer<QMapboxGLStyleChange>(
- new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("line-opacity"), item->mapItemOpacity()));
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("line-opacity"), item->line()->color().alphaF() * item->mapItemOpacity()));
changes << QSharedPointer<QMapboxGLStyleChange>(
new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("line-color"), item->line()->color()));
changes << QSharedPointer<QMapboxGLStyleChange>(
diff --git a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
index 82aa868..7721fe6 100644
--- a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
+++ b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
@@ -68,8 +68,10 @@ void QSGMapboxGLTextureNode::resize(const QSize &size, qreal pixelRatio)
m_map->setFramebufferObject(m_fbo->handle());
QSGPlainTexture *fboTexture = static_cast<QSGPlainTexture *>(texture());
- if (!fboTexture)
+ if (!fboTexture) {
fboTexture = new QSGPlainTexture;
+ fboTexture->setHasAlphaChannel(true);
+ }
fboTexture->setTextureId(m_fbo->texture());
fboTexture->setTextureSize(fbSize);
@@ -92,6 +94,11 @@ void QSGMapboxGLTextureNode::render(QQuickWindow *window)
f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
m_fbo->bind();
+
+ f->glClearColor(0.f, 0.f, 0.f, 0.f);
+ f->glColorMask(true, true, true, true);
+ f->glClear(GL_COLOR_BUFFER_BIT);
+
m_map->render();
m_fbo->release();