summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-16 14:12:07 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-16 14:12:07 +0200
commitd5619b17b3133f0aa17331c07ccb9d2b0626d7d6 (patch)
treec0c08f35e94f562aa38d7a1338e024eb4424c9a0
parent19642842cea91a4588828362eba023c5da5ab57b (diff)
parentfafc158427e9d54298ce5c3419c1d4b6ec3b946e (diff)
downloadqtlocation-d5619b17b3133f0aa17331c07ccb9d2b0626d7d6.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I1903c3a181663c424f0ff13abcc9fb7a5bdb784e
-rw-r--r--src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp6
-rw-r--r--src/imports/location/qdeclarativepolylinemapitem.cpp4
-rw-r--r--src/plugins/geoservices/osm/qgeotileproviderosm.h2
-rw-r--r--src/positioning/doc/src/qtpositioning.qdoc2
4 files changed, 10 insertions, 4 deletions
diff --git a/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp b/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp
index 289ea3d9..7b5a5765 100644
--- a/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp
+++ b/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp
@@ -148,7 +148,11 @@ void QDeclarativeGeoMapCopyrightNotice::copyrightsChanged(const QString &copyrig
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());
diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp
index 2899d839..d10d00a5 100644
--- a/src/imports/location/qdeclarativepolylinemapitem.cpp
+++ b/src/imports/location/qdeclarativepolylinemapitem.cpp
@@ -506,7 +506,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);
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]);
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),