diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-12-11 14:57:11 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-01-15 09:06:27 +0000 |
commit | 2b6020a59ef503eeadabc532782f5e9e795fcf3f (patch) | |
tree | 2163c77dd21fef3ad21c650c3e68da1a3dea4a7e /src/location/maps/qgeomap.cpp | |
parent | 7b8ab37beaafbe27c258a6d80d1914f982dcc9e1 (diff) | |
download | qtlocation-2b6020a59ef503eeadabc532782f5e9e795fcf3f.tar.gz |
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 <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeomap.cpp')
-rw-r--r-- | src/location/maps/qgeomap.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp index 0c6ce0a7..46a88003 100644 --- a/src/location/maps/qgeomap.cpp +++ b/src/location/maps/qgeomap.cpp @@ -230,6 +230,15 @@ QString QGeoMap::copyrightsStyleSheet() const return QStringLiteral("#copyright-root { background: rgba(255, 255, 255, 128) }"); } +void QGeoMap::setCopyrightVisible(bool visible) +{ + Q_D(QGeoMap); + if (d->m_copyrightVisible == visible) + return; + + d->m_copyrightVisible = visible; +} + QGeoMapPrivate::QGeoMapPrivate(QGeoMappingManagerEngine *engine, QGeoProjection *geoProjection) : QObjectPrivate(), m_geoProjection(geoProjection), @@ -287,4 +296,14 @@ void QGeoMapPrivate::removeMapItem(QDeclarativeGeoMapItemBase *item) Q_UNUSED(item) } +void QGeoMapPrivate::setCopyrightVisible(bool visible) +{ + m_copyrightVisible = visible; +} + +bool QGeoMapPrivate::copyrightVisible() const +{ + return m_copyrightVisible; +} + QT_END_NAMESPACE |