From 2b6020a59ef503eeadabc532782f5e9e795fcf3f Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Mon, 11 Dec 2017 14:57:11 +0100 Subject: Fix performance issue with copyright notice Skip evaluating copyrights when the notice is not visible. The implication of this patch is that copyright information won't be up to date or even available unless there is an "attached" copyright notice that has the visible property set to true. Task-number: QTBUG-64880 Change-Id: I3750b61913becb0cbf31273ad9a76ae1a2b6a393 Reviewed-by: Alex Blasche --- src/location/declarativemaps/qdeclarativegeomap_p.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/location/declarativemaps/qdeclarativegeomap_p.h') diff --git a/src/location/declarativemaps/qdeclarativegeomap_p.h b/src/location/declarativemaps/qdeclarativegeomap_p.h index e8ff3265..6b765269 100644 --- a/src/location/declarativemaps/qdeclarativegeomap_p.h +++ b/src/location/declarativemaps/qdeclarativegeomap_p.h @@ -236,6 +236,7 @@ private Q_SLOTS: void onMapChildrenChanged(); void onSupportedMapTypesChanged(); void onCameraCapabilitiesChanged(const QGeoCameraCapabilities &oldCameraCapabilities); + void onAttachedCopyrightNoticeVisibilityChanged(); private: void setupMapView(QDeclarativeGeoMapItemView *view); @@ -244,6 +245,8 @@ private: void fitViewportToMapItemsRefine(bool refine, bool onlyVisible); void fitViewportToGeoShape(); bool isInteractive(); + void attachCopyrightNotice(bool initialVisibility); + void detachCopyrightNotice(bool currentVisibility); private: QDeclarativeGeoServiceProvider *m_plugin; @@ -281,6 +284,8 @@ private: qreal m_userMinimumFieldOfView; qreal m_userMaximumFieldOfView; + int m_copyNoticesVisible = 0; + friend class QDeclarativeGeoMapItem; friend class QDeclarativeGeoMapItemView; friend class QQuickGeoMapGestureArea; -- cgit v1.2.1