diff options
author | Chris Adams <chris.adams@qinetic.com.au> | 2018-08-16 17:52:11 +1000 |
---|---|---|
committer | Christopher Adams <chris.adams@jollamobile.com> | 2018-08-17 01:14:23 +0000 |
commit | 571126c3d63f899a67b896886aaec8cf4f0acb1c (patch) | |
tree | cc8a76d9b94c349af1a045e9cb10061c62a8d5ef | |
parent | a8c09973f8cc960b9047157ad7e6834032bea0b7 (diff) | |
download | qtlocation-571126c3d63f899a67b896886aaec8cf4f0acb1c.tar.gz |
Geoclue: respect minimum update interval for satellite info updates
If no update interval is specified for the Geoclue-backed satellite
info source, it should use the minimum update interval (which is
defined in the code as being one second) rather than zero, otherwise
the satellite information is reset immediately after receiving an
update from Geoclue.
Change-Id: Ib48b8dfd600722f23c8bafc50adabfb5df546eaa
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp b/src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp index 1f8294fd..b7524d84 100644 --- a/src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp +++ b/src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp @@ -96,7 +96,7 @@ void QGeoSatelliteInfoSourceGeoclueMaster::startUpdates() if (!m_master->hasMasterClient()) configureSatelliteSource(); - m_requestTimer.start(updateInterval()); + m_requestTimer.start(qMax(updateInterval(), minimumUpdateInterval())); } void QGeoSatelliteInfoSourceGeoclueMaster::stopUpdates() @@ -173,7 +173,7 @@ void QGeoSatelliteInfoSourceGeoclueMaster::updateSatelliteInfo(int timestamp, in m_inUse = inUse; emit satellitesInUseUpdated(m_inUse); - m_requestTimer.start(updateInterval()); + m_requestTimer.start(qMax(updateInterval(), minimumUpdateInterval())); } void QGeoSatelliteInfoSourceGeoclueMaster::requestUpdateTimeout() |