summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--src/plugins/geoservices/nokia/nokia.pro1
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp77
-rw-r--r--src/plugins/geoservices/osm/osm.pro1
-rw-r--r--src/plugins/position/android/src/src.pro1
-rw-r--r--src/plugins/position/blackberry/blackberry.pro1
-rw-r--r--src/plugins/position/corelocation/corelocation.pro2
-rw-r--r--src/plugins/position/geoclue/geoclue.pro1
-rw-r--r--src/plugins/position/gypsy/gypsy.pro1
-rw-r--r--src/plugins/position/positionpoll/positionpoll.pro1
-rw-r--r--src/plugins/position/simulator/simulator.pro1
-rw-r--r--src/src.pro21
-rw-r--r--tests/auto/geotestplugin/geotestplugin.pro2
-rw-r--r--tests/auto/placesplugin_unsupported/placesplugin_unsupported.pro2
-rw-r--r--tests/auto/positionplugin/positionplugin.pro2
-rw-r--r--tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp30
-rw-r--r--tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerplugins.pro2
-rw-r--r--tests/auto/qgeomapscene/tst_qgeomapscene.cpp2
-rw-r--r--tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerplugins.pro2
19 files changed, 96 insertions, 56 deletions
diff --git a/.qmake.conf b/.qmake.conf
index efd0e68f..ef45a002 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,4 +1,4 @@
load(qt_build_config)
CONFIG += qt_example_installs
-MODULE_VERSION = 5.3.0
+MODULE_VERSION = 5.3.1
diff --git a/src/plugins/geoservices/nokia/nokia.pro b/src/plugins/geoservices/nokia/nokia.pro
index 647a0a4e..f9c6a5cc 100644
--- a/src/plugins/geoservices/nokia/nokia.pro
+++ b/src/plugins/geoservices/nokia/nokia.pro
@@ -8,6 +8,7 @@ contains(QT_CONFIG, location-china-support) {
}
PLUGIN_TYPE = geoservices
+PLUGIN_CLASS_NAME = NokiaGeoServicePlugin
load(qt_plugin)
HEADERS += \
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
index 5543d001..30ad5808 100644
--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
@@ -600,39 +600,43 @@ QPlaceReply *QPlaceManagerEngineNokiaV2::initializeCategories()
if (m_categoryReply)
return m_categoryReply.data();
- m_tempTree.clear();
- CategoryParser parser;
+ m_tempTree.clear();
+ CategoryParser parser;
- if (!parser.parse(m_localDataPath + QLatin1String("/offline/offline-mapping.json"))) {
- PlaceCategoryNode rootNode;
+ if (parser.parse(m_localDataPath + QLatin1String("/offline/offline-mapping.json"))) {
+ m_tempTree = parser.tree();
+ } else {
+ PlaceCategoryNode rootNode;
- for (int i = 0; FIXED_CATEGORIES_indices[i] != -1; ++i) {
- const QString id = QString::fromLatin1(FIXED_CATEGORIES_string +
- FIXED_CATEGORIES_indices[i]);
- m_tempTree.insert(id, PlaceCategoryNode());
- rootNode.childIds.append(id);
- }
+ for (int i = 0; FIXED_CATEGORIES_indices[i] != -1; ++i) {
+ const QString id = QString::fromLatin1(FIXED_CATEGORIES_string +
+ FIXED_CATEGORIES_indices[i]);
- m_tempTree.insert(QString(), rootNode);
- } else {
- m_tempTree = parser.tree();
- }
+ PlaceCategoryNode node;
+ node.category.setCategoryId(id);
- //request all categories in the tree from the server
- //because we don't want the root node, we remove it from the list
- QStringList ids = m_tempTree.keys();
- ids.removeAll(QString());
- foreach (const QString &id, ids) {
- QUrl requestUrl(QString::fromLatin1("http://") + m_uriProvider->getCurrentHost() +
- QLatin1String("/places/v1/categories/places/") + id);
- QNetworkReply *networkReply = sendRequest(requestUrl);
- connect(networkReply, SIGNAL(finished()), this, SLOT(categoryReplyFinished()));
- connect(networkReply, SIGNAL(error(QNetworkReply::NetworkError)),
- this, SLOT(categoryReplyError()));
-
- m_categoryRequests.insert(id, networkReply);
+ m_tempTree.insert(id, node);
+ rootNode.childIds.append(id);
}
+ m_tempTree.insert(QString(), rootNode);
+ }
+
+ //request all categories in the tree from the server
+ //because we don't want the root node, we remove it from the list
+ QStringList ids = m_tempTree.keys();
+ ids.removeAll(QString());
+ foreach (const QString &id, ids) {
+ QUrl requestUrl(QString::fromLatin1("http://") + m_uriProvider->getCurrentHost() +
+ QLatin1String("/places/v1/categories/places/") + id);
+ QNetworkReply *networkReply = sendRequest(requestUrl);
+ connect(networkReply, SIGNAL(finished()), this, SLOT(categoryReplyFinished()));
+ connect(networkReply, SIGNAL(error(QNetworkReply::NetworkError)),
+ this, SLOT(categoryReplyError()));
+
+ m_categoryRequests.insert(id, networkReply);
+ }
+
QPlaceCategoriesReplyImpl *reply = new QPlaceCategoriesReplyImpl(this);
connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
connect(reply, SIGNAL(error(QPlaceReply::Error,QString)),
@@ -764,6 +768,8 @@ void QPlaceManagerEngineNokiaV2::categoryReplyFinished()
if (!reply)
return;
+ QString categoryId;
+
if (reply->error() == QNetworkReply::NoError) {
QJsonDocument document = QJsonDocument::fromJson(reply->readAll());
if (!document.isObject()) {
@@ -777,7 +783,7 @@ void QPlaceManagerEngineNokiaV2::categoryReplyFinished()
QJsonObject category = document.object();
- QString categoryId = category.value(QLatin1String("categoryId")).toString();
+ categoryId = category.value(QLatin1String("categoryId")).toString();
if (m_tempTree.contains(categoryId)) {
PlaceCategoryNode node = m_tempTree.value(categoryId);
node.category.setName(category.value(QLatin1String("name")).toString());
@@ -786,14 +792,23 @@ void QPlaceManagerEngineNokiaV2::categoryReplyFinished()
m_tempTree.insert(categoryId, node);
}
+ } else {
+ categoryId = m_categoryRequests.key(reply);
+ PlaceCategoryNode rootNode = m_tempTree.value(QString());
+ rootNode.childIds.removeAll(categoryId);
+ m_tempTree.insert(QString(), rootNode);
+ m_tempTree.remove(categoryId);
}
- m_categoryRequests.remove(m_categoryRequests.key(reply));
+ m_categoryRequests.remove(categoryId);
reply->deleteLater();
- if (m_categoryRequests.isEmpty() && m_categoryReply) {
+ if (m_categoryRequests.isEmpty()) {
m_categoryTree = m_tempTree;
- m_categoryReply.data()->emitFinished();
+ m_tempTree.clear();
+
+ if (m_categoryReply)
+ m_categoryReply.data()->emitFinished();
}
}
diff --git a/src/plugins/geoservices/osm/osm.pro b/src/plugins/geoservices/osm/osm.pro
index 897ebbfc..cb82aeaa 100644
--- a/src/plugins/geoservices/osm/osm.pro
+++ b/src/plugins/geoservices/osm/osm.pro
@@ -2,6 +2,7 @@ TARGET = qtgeoservices_osm
QT += location-private positioning-private network
PLUGIN_TYPE = geoservices
+PLUGIN_CLASS_NAME = OSMGeoServicePlugin
load(qt_plugin)
HEADERS += \
diff --git a/src/plugins/position/android/src/src.pro b/src/plugins/position/android/src/src.pro
index a61b77b5..4f1e4412 100644
--- a/src/plugins/position/android/src/src.pro
+++ b/src/plugins/position/android/src/src.pro
@@ -2,6 +2,7 @@ TARGET = qtposition_android
QT = core positioning
PLUGIN_TYPE = position
+PLUGIN_CLASS_NAME = AndroidPositionPlugin
load(qt_plugin)
diff --git a/src/plugins/position/blackberry/blackberry.pro b/src/plugins/position/blackberry/blackberry.pro
index e3543107..852f6dc7 100644
--- a/src/plugins/position/blackberry/blackberry.pro
+++ b/src/plugins/position/blackberry/blackberry.pro
@@ -2,6 +2,7 @@ TARGET = qtposition_blackberry
QT = core positioning
PLUGIN_TYPE = position
+PLUGIN_CLASS_NAME = BBPositionPlugin
load(qt_plugin)
INCLUDEPATH += $$QT.location.includes
diff --git a/src/plugins/position/corelocation/corelocation.pro b/src/plugins/position/corelocation/corelocation.pro
index 1a1a2a39..544d825a 100644
--- a/src/plugins/position/corelocation/corelocation.pro
+++ b/src/plugins/position/corelocation/corelocation.pro
@@ -2,7 +2,7 @@ TARGET = qtposition_cl
QT = core positioning
PLUGIN_TYPE = position
-PLUGIN_CLASS_NAME = QGeoPositionInfoSourceFactoryCL
+PLUGIN_CLASS_NAME = IOSPositionPlugin
load(qt_plugin)
INCLUDEPATH += $$QT.location.includes
diff --git a/src/plugins/position/geoclue/geoclue.pro b/src/plugins/position/geoclue/geoclue.pro
index 5c318645..9db7839f 100644
--- a/src/plugins/position/geoclue/geoclue.pro
+++ b/src/plugins/position/geoclue/geoclue.pro
@@ -2,6 +2,7 @@ TARGET = qtposition_geoclue
QT = core positioning
PLUGIN_TYPE = position
+PLUGIN_CLASS_NAME = GeoCluePositionPlugin
load(qt_plugin)
HEADERS += \
diff --git a/src/plugins/position/gypsy/gypsy.pro b/src/plugins/position/gypsy/gypsy.pro
index f67d41e7..3bd9b144 100644
--- a/src/plugins/position/gypsy/gypsy.pro
+++ b/src/plugins/position/gypsy/gypsy.pro
@@ -2,6 +2,7 @@ TARGET = qtposition_gypsy
QT = core positioning
PLUGIN_TYPE = position
+PLUGIN_CLASS_NAME = GypsyPositionPlugin
load(qt_plugin)
HEADERS += \
diff --git a/src/plugins/position/positionpoll/positionpoll.pro b/src/plugins/position/positionpoll/positionpoll.pro
index 1b7e38f5..4af58327 100644
--- a/src/plugins/position/positionpoll/positionpoll.pro
+++ b/src/plugins/position/positionpoll/positionpoll.pro
@@ -2,6 +2,7 @@ TARGET = qtposition_positionpoll
QT = core positioning
PLUGIN_TYPE = position
+PLUGIN_CLASS_NAME = PollPositionPlugin
load(qt_plugin)
SOURCES += \
diff --git a/src/plugins/position/simulator/simulator.pro b/src/plugins/position/simulator/simulator.pro
index 17948ca5..18d12dfb 100644
--- a/src/plugins/position/simulator/simulator.pro
+++ b/src/plugins/position/simulator/simulator.pro
@@ -2,6 +2,7 @@ TARGET = qtposition_simulator
QT = core network positioning
PLUGIN_TYPE = position
+PLUGIN_CLASS_NAME = SimulatorPositionPlugin
load(qt_plugin)
INCLUDEPATH += $$QT.location.includes
diff --git a/src/src.pro b/src/src.pro
index 26d111d8..9d03f755 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -5,10 +5,13 @@ SUBDIRS += positioning
plugins.depends = positioning
SUBDIRS += plugins
-#TEMPORARY fix for static build errors (QTBUG-37638)
-#positioning_doc_snippets.subdir = positioning/doc/snippets
-#positioning_doc_snippets.depends = positioning
-#SUBDIRS += positioning_doc_snippets
+contains(QT_CONFIG, private_tests) {
+ positioning_doc_snippets.subdir = positioning/doc/snippets
+ #plugin dependency required during static builds
+ positioning_doc_snippets.depends = positioning plugins
+
+ SUBDIRS += positioning_doc_snippets
+}
#no point in building QtLocation without Qt3D
qtHaveModule(3d) {
@@ -20,9 +23,13 @@ qtHaveModule(3d) {
plugins.depends += location
qtHaveModule(quick):imports.depends += location
-# location_doc_snippets.subdir = location/doc/snippets
-# location_doc_snippets.depends = location
-# SUBDIRS += location_doc_snippets
+ contains(QT_CONFIG, private_tests) {
+ location_doc_snippets.subdir = location/doc/snippets
+ #plugin dependency required during static builds
+ location_doc_snippets.depends = location plugins
+
+ SUBDIRS += location_doc_snippets
+ }
}
qtHaveModule(quick) {
diff --git a/tests/auto/geotestplugin/geotestplugin.pro b/tests/auto/geotestplugin/geotestplugin.pro
index 2519b7d0..4b50989f 100644
--- a/tests/auto/geotestplugin/geotestplugin.pro
+++ b/tests/auto/geotestplugin/geotestplugin.pro
@@ -2,6 +2,8 @@ TARGET = qtgeoservices_qmltestplugin
QT += location-private positioning-private testlib
PLUGIN_TYPE = geoservices
+PLUGIN_CLASS_NAME = TestGeoServicePlugin
+PLUGIN_EXTENDS = -
load(qt_plugin)
HEADERS += qgeocodingmanagerengine_test.h \
diff --git a/tests/auto/placesplugin_unsupported/placesplugin_unsupported.pro b/tests/auto/placesplugin_unsupported/placesplugin_unsupported.pro
index 6e10c8c9..e5d04cb3 100644
--- a/tests/auto/placesplugin_unsupported/placesplugin_unsupported.pro
+++ b/tests/auto/placesplugin_unsupported/placesplugin_unsupported.pro
@@ -2,6 +2,8 @@ TARGET = qtgeoservices_placesplugin_unsupported
QT += location
PLUGIN_TYPE = geoservices
+PLUGIN_CLASS_NAME = UnsupportedPlacesGeoServicePlugin
+PLUGIN_EXTENDS = -
load(qt_plugin)
HEADERS += qgeoserviceproviderplugin_test.h
diff --git a/tests/auto/positionplugin/positionplugin.pro b/tests/auto/positionplugin/positionplugin.pro
index 768e6864..0575acbf 100644
--- a/tests/auto/positionplugin/positionplugin.pro
+++ b/tests/auto/positionplugin/positionplugin.pro
@@ -2,6 +2,8 @@ TARGET = qtposition_testplugin
QT += positioning
PLUGIN_TYPE = position
+PLUGIN_CLASS_NAME = TestPositionPlugin
+PLUGIN_EXTENDS = -
load(qt_plugin)
SOURCES += plugin.cpp
diff --git a/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp b/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp
index 2aa55f49..c0722114 100644
--- a/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp
+++ b/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp
@@ -77,7 +77,7 @@ class tst_QGeoCameraTiles : public QObject
private:
void row(const PositionTestInfo &pti, int xOffset, int yOffset, int tileX, int tileY, int tileW, int tileH)
{
- double step = 1 / (pow(2.0, 4.0) * 4);
+ double step = 1 / (std::pow(2.0, 4.0) * 4);
QString row = pti.xyString;
row += QLatin1String(" - ");
@@ -239,14 +239,14 @@ private slots:
ct.setMaximumZoomLevel(8);
ct.setTileSize(16);
ct.setCamera(camera);
- ct.setScreenSize(QSize(ceil(width), ceil(height)));
+ ct.setScreenSize(QSize(std::ceil(width), std::ceil(height)));
QSet<QGeoTileSpec> tiles;
QVERIFY2(tilesX.size() == tilesY.size(), "tilesX and tilesY have different size");
for (int i = 0; i < tilesX.size(); ++i)
- tiles.insert(QGeoTileSpec("", 0, static_cast<int>(floor(zoom)), tilesX.at(i), tilesY.at(i)));
+ tiles.insert(QGeoTileSpec("", 0, static_cast<int>(std::floor(zoom)), tilesX.at(i), tilesY.at(i)));
QCOMPARE(ct.tiles(), tiles);
}
@@ -556,8 +556,8 @@ private slots:
pti.zoom = 4.5;
pti.zoomString = QLatin1String("frac zoom");
- pti.w = pti.w * pow(2.0, 0.5);
- pti.h = pti.h * pow(2.0, 0.5);
+ pti.w = pti.w * std::pow(2.0, 0.5);
+ pti.h = pti.h * std::pow(2.0, 0.5);
pti.x = 0.5;
pti.y = 0.5;
@@ -800,8 +800,8 @@ private slots:
pti.zoom = 4.5;
pti.zoomString = QLatin1String("frac zoom");
- pti.w = pti.w * pow(2.0, 0.5);
- pti.h = pti.h * pow(2.0, 0.5);
+ pti.w = pti.w * std::pow(2.0, 0.5);
+ pti.h = pti.h * std::pow(2.0, 0.5);
pti.x = 0.5;
pti.y = 0.5;
@@ -1044,8 +1044,8 @@ private slots:
pti.zoom = 4.5;
pti.zoomString = QLatin1String("frac zoom");
- pti.w = pti.w * pow(2.0, 0.5);
- pti.h = pti.h * pow(2.0, 0.5);
+ pti.w = pti.w * std::pow(2.0, 0.5);
+ pti.h = pti.h * std::pow(2.0, 0.5);
pti.x = 0.5;
pti.y = 0.5;
@@ -1287,8 +1287,8 @@ private slots:
pti.zoom = 4.5;
pti.zoomString = QLatin1String("frac zoom");
- pti.w = pti.w * pow(2.0, 0.5);
- pti.h = pti.h * pow(2.0, 0.5);
+ pti.w = pti.w * std::pow(2.0, 0.5);
+ pti.h = pti.h * std::pow(2.0, 0.5);
pti.x = 0.5;
pti.y = 0.5;
@@ -1532,8 +1532,8 @@ private slots:
pti.zoom = 4.5;
pti.zoomString = QLatin1String("frac zoom");
- pti.w = pti.w * pow(2.0, 0.5);
- pti.h = pti.h * pow(2.0, 0.5);
+ pti.w = pti.w * std::pow(2.0, 0.5);
+ pti.h = pti.h * std::pow(2.0, 0.5);
pti.x = 0.5;
pti.y = 0.5;
@@ -1776,8 +1776,8 @@ private slots:
pti.zoom = 4.5;
pti.zoomString = QLatin1String("frac zoom");
- pti.w = pti.w * pow(2.0, 0.5);
- pti.h = pti.h * pow(2.0, 0.5);
+ pti.w = pti.w * std::pow(2.0, 0.5);
+ pti.h = pti.h * std::pow(2.0, 0.5);
pti.x = 0.5;
pti.y = 0.5;
diff --git a/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerplugins.pro b/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerplugins.pro
index d0e0854a..8f34477e 100644
--- a/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerplugins.pro
+++ b/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerplugins.pro
@@ -2,6 +2,8 @@ TARGET = qtgeoservices_geocodingplugin
QT += location
PLUGIN_TYPE = geoservices
+PLUGIN_CLASS_NAME = GeocodingTestGeoServicePlugin
+PLUGIN_EXTENDS = -
load(qt_plugin)
HEADERS += qgeocodingmanagerengine_test.h \
diff --git a/tests/auto/qgeomapscene/tst_qgeomapscene.cpp b/tests/auto/qgeomapscene/tst_qgeomapscene.cpp
index 4303dd0f..a3b992dd 100644
--- a/tests/auto/qgeomapscene/tst_qgeomapscene.cpp
+++ b/tests/auto/qgeomapscene/tst_qgeomapscene.cpp
@@ -94,7 +94,7 @@ class tst_QGeoMapScene : public QObject
double mercatorX;
double mercatorY;
- double halfLength = 1 / (pow(2.0, zoom) * 2);
+ double halfLength = 1 / (std::pow(2.0, zoom) * 2);
double scaleX = screenWidth / tileSize;
double scaleY = screenHeight / tileSize;
double scaledHalfLengthX = halfLength * scaleX;
diff --git a/tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerplugins.pro b/tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerplugins.pro
index cb17bcc6..08913d88 100644
--- a/tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerplugins.pro
+++ b/tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerplugins.pro
@@ -2,6 +2,8 @@ TARGET = qtgeoservices_routingplugin
QT += location
PLUGIN_TYPE = geoservices
+PLUGIN_CLASS_NAME = RoutingTestGeoServicePlugin
+PLUGIN_EXTENDS = -
load(qt_plugin)
HEADERS += qgeoroutingmanagerengine_test.h \