summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-08-28 07:52:39 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-08-28 08:45:37 +0000
commit7b9390bd139c8e6314bcf3167f3d0538b9f7708b (patch)
tree72b33de7d193ead86d094ba1037dbcb08823f3ce /src
parentf5932513e5d9a4627185996736ca2c66e6e103de (diff)
parent1e9eb569c57c08f0eaa79a9afeb57402271f11b1 (diff)
downloadqtlocation-7b9390bd139c8e6314bcf3167f3d0538b9f7708b.tar.gz
Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6
Diffstat (limited to 'src')
-rw-r--r--src/imports/location/qquickgeomapgesturearea.cpp2
-rw-r--r--src/location/doc/images/places-list.pngbin28215 -> 18195 bytes
-rw-r--r--src/location/doc/images/places-map.pngbin0 -> 167995 bytes
-rw-r--r--src/location/doc/src/examples/places-map.qdoc2
-rw-r--r--src/location/doc/src/places.qdoc2
-rw-r--r--src/location/doc/src/plugins/osm.qdoc15
-rw-r--r--src/location/maps/qgeocameratiles.cpp1
-rw-r--r--src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp2
-rw-r--r--src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp8
-rw-r--r--src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp2
-rw-r--r--src/plugins/geoservices/osm/qplacemanagerengineosm.cpp7
-rw-r--r--src/plugins/geoservices/osm/qplacemanagerengineosm.h1
-rw-r--r--src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp2
13 files changed, 28 insertions, 16 deletions
diff --git a/src/imports/location/qquickgeomapgesturearea.cpp b/src/imports/location/qquickgeomapgesturearea.cpp
index b8f0167d..9ab11b97 100644
--- a/src/imports/location/qquickgeomapgesturearea.cpp
+++ b/src/imports/location/qquickgeomapgesturearea.cpp
@@ -1180,8 +1180,6 @@ bool QQuickGeoMapGestureArea::tryStartFlick()
/*!
\internal
*/
-// FIXME:
-// - not left right / up down flicking, so if map is rotated, will act unintuitively
void QQuickGeoMapGestureArea::startFlick(int dx, int dy, int timeMs)
{
if (timeMs < 0)
diff --git a/src/location/doc/images/places-list.png b/src/location/doc/images/places-list.png
index 02416e53..bf09a031 100644
--- a/src/location/doc/images/places-list.png
+++ b/src/location/doc/images/places-list.png
Binary files differ
diff --git a/src/location/doc/images/places-map.png b/src/location/doc/images/places-map.png
new file mode 100644
index 00000000..4982df23
--- /dev/null
+++ b/src/location/doc/images/places-map.png
Binary files differ
diff --git a/src/location/doc/src/examples/places-map.qdoc b/src/location/doc/src/examples/places-map.qdoc
index 7796c8ba..6e58bfb8 100644
--- a/src/location/doc/src/examples/places-map.qdoc
+++ b/src/location/doc/src/examples/places-map.qdoc
@@ -32,7 +32,7 @@
\brief The Places Map example demonstrates how to search for and display a list of places
on a map using a MapItemView
- \image places-map.jpg
+ \image places-map.png
The example displays a map of the current location or, if no position is
available, it uses Brisbane/Australia. Subsequently a search for places
diff --git a/src/location/doc/src/places.qdoc b/src/location/doc/src/places.qdoc
index 4de65220..291af614 100644
--- a/src/location/doc/src/places.qdoc
+++ b/src/location/doc/src/places.qdoc
@@ -155,7 +155,7 @@
\li
\snippet places_map/places_map.qml Places MapItemView
\li
- \inlineimage places-map.jpg
+ \inlineimage places-map.png
\endtable
\note For simplicty's sake we have assumed that every search result is of
diff --git a/src/location/doc/src/plugins/osm.qdoc b/src/location/doc/src/plugins/osm.qdoc
index d5b23437..f6de9c20 100644
--- a/src/location/doc/src/plugins/osm.qdoc
+++ b/src/location/doc/src/plugins/osm.qdoc
@@ -72,13 +72,20 @@ a prefix.
\row
\li osm.routing.host
\li Url string set when making network requests to the routing server. This parameter should be set to a
- valid server url with the correct osrm api. If not specified the default \l {http://router.project-osrm.org/viaroute}{url} will be used.
- \note The api documentation and sources are available at \l {http://project-osrm.org/}{Project OSRM}.
+ valid server url with the correct osrm API. If not specified the default \l {http://router.project-osrm.org/viaroute}{url} will be used.
+ \note The API documentation and sources are available at \l {http://project-osrm.org/}{Project OSRM}.
\row
\li osm.geocoding.host
\li Url string set when making network requests to the geocoding server. This parameter should be set to a
- valid server url with the correct osm api. If not specified the default \l {http://nominatim.openstreetmap.org/}{url} will be used.
- \note The api documentation is available at \l {https://wiki.openstreetmap.org/wiki/Nominatim}{Project OSM Nominatim}.
+ valid server url with the correct osm API. If not specified the default \l {http://nominatim.openstreetmap.org/}{url} will be used.
+ \note The API documentation is available at \l {https://wiki.openstreetmap.org/wiki/Nominatim}{Project OSM Nominatim}.
+\row
+ \li osm.places.host
+ \li Url string set when making network requests to the places server.
+ This parameter should be set to a valid server url with the correct osm API.
+ If not specified the default \l {http://nominatim.openstreetmap.org/search}{url}
+ will be used.
+ \note The API documentation is available at \l {https://wiki.openstreetmap.org/wiki/Nominatim}{Project OSM Nominatim}.
\endtable
\section1 Parameter Usage Example
diff --git a/src/location/maps/qgeocameratiles.cpp b/src/location/maps/qgeocameratiles.cpp
index 58aa1f30..d2783a5b 100644
--- a/src/location/maps/qgeocameratiles.cpp
+++ b/src/location/maps/qgeocameratiles.cpp
@@ -152,6 +152,7 @@ QSet<QGeoTileSpec> QGeoCameraTiles::prefetchTiles(PrefetchStle style)
double neighbourScale = (1.0 + zoomFraction)/2.0;
d_ptr->updateGeometry(PREFETCH_FRUSTUM_SCALE * neighbourScale);
}
+ break;
}
case PrefetchTwoNeighbourLayers: {
diff --git a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
index 4ddc8a79..757b9577 100644
--- a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
@@ -75,7 +75,7 @@ QGeoCodingManagerEngineOsm::QGeoCodingManagerEngineOsm(const QVariantMap &parame
m_userAgent = "Qt Location based application";
if (parameters.contains(QStringLiteral("osm.geocoding.host")))
- m_urlPrefix = parameters.value(QStringLiteral("geocoding.host")).toString().toLatin1();
+ m_urlPrefix = parameters.value(QStringLiteral("osm.geocoding.host")).toString().toLatin1();
else
m_urlPrefix = QStringLiteral("http://nominatim.openstreetmap.org");
diff --git a/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp
index ab582434..df3351c2 100644
--- a/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp
@@ -43,13 +43,13 @@ QGeoRoutingManagerEngineOsm::QGeoRoutingManagerEngineOsm(const QVariantMap &para
QString *errorString)
: QGeoRoutingManagerEngine(parameters), m_networkManager(new QNetworkAccessManager(this))
{
- if (parameters.contains(QStringLiteral("useragent")))
- m_userAgent = parameters.value(QStringLiteral("useragent")).toString().toLatin1();
+ if (parameters.contains(QStringLiteral("osm.useragent")))
+ m_userAgent = parameters.value(QStringLiteral("osm.useragent")).toString().toLatin1();
else
m_userAgent = "Qt Location based application";
- if (parameters.contains(QStringLiteral("routing.host")))
- m_urlPrefix = parameters.value(QStringLiteral("routing.host")).toString().toLatin1();
+ if (parameters.contains(QStringLiteral("osm.routing.host")))
+ m_urlPrefix = parameters.value(QStringLiteral("osm.routing.host")).toString().toLatin1();
else
m_urlPrefix = QStringLiteral("http://router.project-osrm.org/viaroute");
diff --git a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
index d89de0b0..3671051d 100644
--- a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
@@ -46,7 +46,7 @@ QGeoTiledMappingManagerEngineOsm::QGeoTiledMappingManagerEngineOsm(const QVarian
{
QGeoCameraCapabilities cameraCaps;
cameraCaps.setMinimumZoomLevel(0.0);
- cameraCaps.setMaximumZoomLevel(18.0);
+ cameraCaps.setMaximumZoomLevel(19.0);
setCameraCapabilities(cameraCaps);
setTileSize(QSize(256, 256));
diff --git a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
index 2ae5bd7e..ed2c9ff0 100644
--- a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
@@ -97,6 +97,11 @@ QPlaceManagerEngineOsm::QPlaceManagerEngineOsm(const QVariantMap &parameters,
else
m_userAgent = "Qt Location based application";
+ if (parameters.contains(QStringLiteral("osm.places.host")))
+ m_urlPrefix = parameters.value(QStringLiteral("osm.places.host")).toString();
+ else
+ m_urlPrefix = QStringLiteral("http://nominatim.openstreetmap.org/search");
+
*error = QGeoServiceProvider::NoError;
errorString->clear();
}
@@ -175,7 +180,7 @@ QPlaceSearchReply *QPlaceManagerEngineOsm::search(const QPlaceSearchRequest &req
queryItems.addQueryItem(QStringLiteral("addressdetails"), QStringLiteral("1"));
- QUrl requestUrl(QStringLiteral("http://nominatim.openstreetmap.org/search?"));
+ QUrl requestUrl(m_urlPrefix);
requestUrl.setQuery(queryItems);
QNetworkReply *networkReply = m_networkManager->get(QNetworkRequest(requestUrl));
diff --git a/src/plugins/geoservices/osm/qplacemanagerengineosm.h b/src/plugins/geoservices/osm/qplacemanagerengineosm.h
index 9a15b493..828d7bf1 100644
--- a/src/plugins/geoservices/osm/qplacemanagerengineosm.h
+++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.h
@@ -75,6 +75,7 @@ private:
QNetworkAccessManager *m_networkManager;
QByteArray m_userAgent;
+ QString m_urlPrefix;
QList<QLocale> m_locales;
QNetworkReply *m_categoriesReply;
diff --git a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
index 53c2a903..fe5b048e 100644
--- a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
+++ b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
@@ -285,7 +285,7 @@ void QGeoPositionInfoSourceGeoclueMaster::setOptions()
const QVariant v = i.value();
GValue *value = new GValue;
- *value = { 0, { { 0 } } };
+ memset(value, 0, sizeof(*value));
switch (v.userType()) {
case QMetaType::QString: