mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 02:33:23 +00:00
gpslocation.cpp: fix signed vs unsinged int comparison warning
QDateTime::toTime_t() is misleading as it does not return a C time_t type, but a 'unsigned int' or rather the Qt 'uint' typedef. To prevent the warning we cast it to 'time_t' and to comply with the 'lastTime' variable. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
418a345287
commit
ebdcc7fd54
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ void GpsLocation::newPosition(QGeoPositionInfo pos)
|
|||
// if we have no record stored or if at least the configured minimum
|
||||
// time has passed or we moved at least the configured minimum distance
|
||||
if (!nr ||
|
||||
pos.timestamp().toTime_t() > lastTime + prefs.time_threshold ||
|
||||
(time_t)pos.timestamp().toTime_t() > lastTime + prefs.time_threshold ||
|
||||
lastCoord.distanceTo(pos.coordinate()) > prefs.distance_threshold) {
|
||||
geoSettings->setValue("count", nr + 1);
|
||||
geoSettings->setValue(QString("gpsFix%1_time").arg(nr), pos.timestamp().toTime_t());
|
||||
|
|
Loading…
Add table
Reference in a new issue