From 68520449fe15682fe8fcd666860f6ae86493ebf5 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Thu, 9 Feb 2017 11:22:01 +0100 Subject: Remove dirty geo* flags from map items The recommended way for a plugin to get notification for when to update items is to connect to the item's signals. Therefore these introduced dirty flags that would have to be checked in a loop can be removed. Change-Id: I28c9b236b3a2e6296a89649b604381a2001a0b20 Reviewed-by: Alex Blasche --- src/location/declarativemaps/qdeclarativepolylinemapitem.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/location/declarativemaps/qdeclarativepolylinemapitem.cpp') diff --git a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp index 0c2fb0cf..cdc0175e 100644 --- a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp +++ b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp @@ -533,10 +533,6 @@ QDeclarativePolylineMapItem::QDeclarativePolylineMapItem(QQuickItem *parent) this, SLOT(updateAfterLinePropertiesChanged())); QObject::connect(&line_, SIGNAL(widthChanged(qreal)), this, SLOT(updateAfterLinePropertiesChanged())); - QObject::connect(&line_, SIGNAL(colorChanged(QColor)), - this, SLOT(markGeoMaterialDirty())); - QObject::connect(&line_, SIGNAL(widthChanged(qreal)), - this, SLOT(markGeoMaterialDirty())); } QDeclarativePolylineMapItem::~QDeclarativePolylineMapItem() @@ -653,7 +649,6 @@ void QDeclarativePolylineMapItem::addCoordinate(const QGeoCoordinate &coordinate geopath_.addCoordinate(coordinate); geometry_.setPreserveGeometry(true, geopath_.boundingGeoRectangle().topLeft()); - markGeoGeometryDirty(); markSourceDirtyAndUpdate(); emit pathChanged(); } @@ -697,7 +692,6 @@ void QDeclarativePolylineMapItem::replaceCoordinate(int index, const QGeoCoordin geopath_.replaceCoordinate(index, coordinate); geometry_.setPreserveGeometry(true, geopath_.boundingGeoRectangle().topLeft()); - markGeoGeometryDirty(); markSourceDirtyAndUpdate(); emit pathChanged(); } @@ -747,7 +741,6 @@ void QDeclarativePolylineMapItem::removeCoordinate(const QGeoCoordinate &coordin geopath_.removeCoordinate(coordinate); if (geopath_.path().length() == length) return; - markGeoGeometryDirty(); markSourceDirtyAndUpdate(); emit pathChanged(); } @@ -771,7 +764,6 @@ void QDeclarativePolylineMapItem::removeCoordinate(int index) geopath_.removeCoordinate(index); geometry_.setPreserveGeometry(true, geopath_.boundingGeoRectangle().topLeft()); - markGeoGeometryDirty(); markSourceDirtyAndUpdate(); emit pathChanged(); } @@ -816,7 +808,6 @@ void QDeclarativePolylineMapItem::geometryChanged(const QRectF &newGeometry, con geopath_.translate(offsetLati, offsetLongi); geometry_.setPreserveGeometry(true, geopath_.boundingGeoRectangle().topLeft()); - markGeoGeometryDirty(); markSourceDirtyAndUpdate(); emit pathChanged(); -- cgit v1.2.1