summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-04-17 13:51:33 +0200
committerMichal Klocek <michal.klocek@theqtcompany.com>2015-05-05 15:46:37 +0000
commitbabc72059985e5d2d70c4077b466d676e45ac05c (patch)
treee8a6d42f0f008bfc4c68a39dabbef5a6159c1dba
parentab4d5336fba82f65e7393f2227a4b9c94075b39f (diff)
Remove movementStopped from QDeclarativeGeoMapGestureArea
Change-Id: I8d8265dd51838bc61c3ea86c487cf5e6ff60a475 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r--src/imports/location/qdeclarativegeomapgesturearea.cpp8
-rw-r--r--src/imports/location/qdeclarativegeomapgesturearea_p.h1
-rw-r--r--src/location/maps/qgeomap.cpp5
-rw-r--r--src/location/maps/qgeomap_p.h2
-rw-r--r--src/location/maps/qgeotiledmap_p.h5
5 files changed, 12 insertions, 9 deletions
diff --git a/src/imports/location/qdeclarativegeomapgesturearea.cpp b/src/imports/location/qdeclarativegeomapgesturearea.cpp
index 09ea6ad8..07fd58e5 100644
--- a/src/imports/location/qdeclarativegeomapgesturearea.cpp
+++ b/src/imports/location/qdeclarativegeomapgesturearea.cpp
@@ -357,8 +357,6 @@ void QDeclarativeGeoMapGestureArea::setMap(QGeoMap *map)
pan_.animation_ = new QPropertyAnimation(map_->mapController(), "center", this);
pan_.animation_->setEasingCurve(QEasingCurve(QEasingCurve::OutQuad));
connect(pan_.animation_, SIGNAL(finished()), this, SLOT(endFlick()));
- connect(this, SIGNAL(movementStopped()),
- map_, SLOT(prefetchData()));
}
QDeclarativeGeoMapGestureArea::~QDeclarativeGeoMapGestureArea()
@@ -996,7 +994,7 @@ void QDeclarativeGeoMapGestureArea::panStateMachine()
// mark as inactive for use by camera
if (pinchState_ == pinchInactive) {
emit panFinished();
- emit movementStopped();
+ map_->prefetchData();
}
}
}
@@ -1136,7 +1134,7 @@ void QDeclarativeGeoMapGestureArea::stopPan()
panState_ = panInactive;
emit panFinished();
emit panActiveChanged();
- emit movementStopped();
+ map_->prefetchData();
}
}
@@ -1151,7 +1149,7 @@ void QDeclarativeGeoMapGestureArea::endFlick()
emit flickFinished();
panState_ = panInactive;
emit panActiveChanged();
- emit movementStopped();
+ map_->prefetchData();
}
diff --git a/src/imports/location/qdeclarativegeomapgesturearea_p.h b/src/imports/location/qdeclarativegeomapgesturearea_p.h
index a72dbbd3..d968cab6 100644
--- a/src/imports/location/qdeclarativegeomapgesturearea_p.h
+++ b/src/imports/location/qdeclarativegeomapgesturearea_p.h
@@ -187,7 +187,6 @@ Q_SIGNALS:
void panFinished();
void flickStarted();
void flickFinished();
- void movementStopped();
private:
void update();
diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp
index c1c88a3a..e633e46f 100644
--- a/src/location/maps/qgeomap.cpp
+++ b/src/location/maps/qgeomap.cpp
@@ -144,6 +144,11 @@ int QGeoMap::mapVersion()
return -1;
}
+void QGeoMap::prefetchData()
+{
+
+}
+
QGeoMapPrivate::QGeoMapPrivate(QGeoMappingManagerEngine *engine)
: QObjectPrivate(),
m_width(0),
diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h
index 8de467a5..f2996a20 100644
--- a/src/location/maps/qgeomap_p.h
+++ b/src/location/maps/qgeomap_p.h
@@ -84,6 +84,7 @@ public:
virtual QGeoCoordinate itemPositionToCoordinate(const QDoubleVector2D &pos, bool clipToViewport = true) const = 0;
virtual QDoubleVector2D coordinateToItemPosition(const QGeoCoordinate &coordinate, bool clipToViewport = true) const = 0;
virtual int mapVersion();
+ virtual void prefetchData();
QString pluginString();
QGeoCameraCapabilities cameraCapabilities();
@@ -96,7 +97,6 @@ protected:
public Q_SLOTS:
void update();
- virtual void prefetchData() {}
Q_SIGNALS:
void cameraDataChanged(const QGeoCameraData &cameraData);
diff --git a/src/location/maps/qgeotiledmap_p.h b/src/location/maps/qgeotiledmap_p.h
index c681a6b6..b8eac970 100644
--- a/src/location/maps/qgeotiledmap_p.h
+++ b/src/location/maps/qgeotiledmap_p.h
@@ -84,13 +84,14 @@ public:
QGeoCoordinate itemPositionToCoordinate(const QDoubleVector2D &pos, bool clipToViewport = true) const Q_DECL_OVERRIDE;
QDoubleVector2D coordinateToItemPosition(const QGeoCoordinate &coordinate, bool clipToViewport = true) const Q_DECL_OVERRIDE;
- QSGNode *updateSceneGraph(QSGNode *, QQuickWindow *window) Q_DECL_OVERRIDE;
+ void prefetchData() Q_DECL_OVERRIDE;
// Alternative to exposing this is to make tileFetched a slot, but then requestManager would
// need to be a QObject
QGeoTileRequestManager *getRequestManager();
+
protected:
- void prefetchData() Q_DECL_OVERRIDE;
+ QSGNode *updateSceneGraph(QSGNode *, QQuickWindow *window) Q_DECL_OVERRIDE;
protected Q_SLOTS:
virtual void evaluateCopyrights(const QSet<QGeoTileSpec> &visibleTiles);