From 571126c3d63f899a67b896886aaec8cf4f0acb1c Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Thu, 16 Aug 2018 17:52:11 +1000 Subject: 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 Reviewed-by: Alex Blasche --- .../position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp | 4 ++-- 1 file 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() -- cgit v1.2.1