From 3ab6239530810b482d6033bac3d781acea8453ac Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 3 Aug 2016 18:37:24 +0200 Subject: Fix accessing a MapPolyline delegate before it is handed over to Map QDeclarativePolylineMapItem::path() currently retrieves a QQmlContext with contextForObject(parent). This can return a null context if the parent is null. This patch changes the parameter to the this pointer, returning the context for the object itself. Task-number: QTBUG-55081 Change-Id: I48d6abd8be1b3d9505e37338da2b64812375374c Reviewed-by: Simon Hausmann --- src/imports/location/qdeclarativepolylinemapitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp index f2373abf..75c1bfab 100644 --- a/src/imports/location/qdeclarativepolylinemapitem.cpp +++ b/src/imports/location/qdeclarativepolylinemapitem.cpp @@ -498,7 +498,9 @@ void QDeclarativePolylineMapItem::setMap(QDeclarativeGeoMap *quickMap, QGeoMap * QJSValue QDeclarativePolylineMapItem::path() const { - QQmlContext *context = QQmlEngine::contextForObject(parent()); + QQmlContext *context = QQmlEngine::contextForObject(this); + if (!context) + return QJSValue(); QQmlEngine *engine = context->engine(); QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine); -- cgit v1.2.1 From 114674f7d8bf4c1e919d42d76ce34ad43830ed09 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 27 Jul 2016 22:08:01 +0200 Subject: Fix for invisible copyright notice with Holo theme on android The copyright notice is currently rendered using the default application palette. This patch forces the text and link colors to black and blue, since the notice is always shown on top of the map and other colors may not work. Task-number: QTBUG-54964 Change-Id: Icc8832124cd64d5326e0aa7540e3287c4325d31d Reviewed-by: Paul Olav Tvete Reviewed-by: Johan Helsing Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp b/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp index f2c44833..a33f10ff 100644 --- a/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp +++ b/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp @@ -137,7 +137,11 @@ void QDeclarativeGeoMapCopyrightNotice::copyrightsChanged(const QString ©rig m_copyrightsImage.fill(qPremultiply(qRgba(255, 255, 255, 128))); QPainter painter(&m_copyrightsImage); - m_copyrightsHtml->drawContents(&painter); + //m_copyrightsHtml->drawContents(&painter); // <- this uses the default application palette, that might have, f.ex., white text + QAbstractTextDocumentLayout::PaintContext ctx; + ctx.palette.setColor(QPalette::Text, QColor(QStringLiteral("black"))); + ctx.palette.setColor(QPalette::Link, QColor(QStringLiteral("blue"))); + m_copyrightsHtml->documentLayout()->draw(&painter, ctx); setWidth(m_copyrightsImage.width()); setHeight(m_copyrightsImage.height()); -- cgit v1.2.1 From 9eba88b32e3908326c0ae5c37b55df0a5f5be9cd Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 10 Aug 2016 16:36:28 +0200 Subject: Fix for wrong std::copy in QGeoTileProviderOsm::TileProvider This patch fixes a bug that shows up at least on osX and iOS devices caused by an incorrect offset used in std::copy Change-Id: I09f106ddf63983365d4462e2f18a10ce44f1200a Reviewed-by: Timur Pocheptsov --- src/plugins/geoservices/osm/qgeotileproviderosm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/geoservices/osm/qgeotileproviderosm.h b/src/plugins/geoservices/osm/qgeotileproviderosm.h index cdff7997..f396b3b5 100644 --- a/src/plugins/geoservices/osm/qgeotileproviderosm.h +++ b/src/plugins/geoservices/osm/qgeotileproviderosm.h @@ -113,7 +113,7 @@ public: return; int sortedOffsets[3]; - std::copy(offset, offset + 4, sortedOffsets); + std::copy(offset, offset + 3, sortedOffsets); sort2(sortedOffsets[0] ,sortedOffsets[1]); sort2(sortedOffsets[1] ,sortedOffsets[2]); sort2(sortedOffsets[0] ,sortedOffsets[1]); -- cgit v1.2.1 From fafc158427e9d54298ce5c3419c1d4b6ec3b946e Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 12 Aug 2016 11:01:59 +0200 Subject: Doc: Change instances of 'OS X' to 'macOS' As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: Iea1581dc1929e53d710a2fc5eedbdf560a2d225f Reviewed-by: Leena Miettinen --- src/positioning/doc/src/qtpositioning.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/positioning/doc/src/qtpositioning.qdoc b/src/positioning/doc/src/qtpositioning.qdoc index 1ce33085..d5b0eb39 100644 --- a/src/positioning/doc/src/qtpositioning.qdoc +++ b/src/positioning/doc/src/qtpositioning.qdoc @@ -62,7 +62,7 @@ The Qt Positioning API provides positioning information via QML and C++ interfaces. Currently the API is supported on \l {Qt for Android}{Android}, \l {Qt for iOS}{iOS}, -\l {Qt for OS X}{OS X}, +\l {Qt for macOS}{\macos}, \l {Qt for Linux/X11}{Linux} (using \l {http://www.freedesktop.org/wiki/Software/GeoClue}{GeoClue version 0.12.99}), \l {Qt for Windows}{Windows} (with GPS receivers exposed as a serial port providing NMEA sentences), -- cgit v1.2.1