From: "Lubomir I. Ivanov" <[email protected]>

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 <[email protected]>
---
 qt-mobile/gpslocation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-mobile/gpslocation.cpp b/qt-mobile/gpslocation.cpp
index e34ae39..b335486 100644
--- a/qt-mobile/gpslocation.cpp
+++ b/qt-mobile/gpslocation.cpp
@@ -58,7 +58,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());
-- 
1.7.11.msysgit.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to