From: Rodrigo Linfati Date: Sat, 22 Jan 2011 20:20:57 +0000 (+0100) Subject: be compatible with qt 4.6/4.5 X-Git-Url: http://git.maemo.org/git/?p=googlelatitude;a=commitdiff_plain;h=5a837906fe9cee9952da7c38e0987857b214d63d;hp=4fe4a04458ce7f275738bff27f00565dc500e4fc be compatible with qt 4.6/4.5 --- diff --git a/src/glatitude.cpp b/src/glatitude.cpp index 0573772..2f9dcac 100644 --- a/src/glatitude.cpp +++ b/src/glatitude.cpp @@ -41,10 +41,10 @@ void GoogleLatitude::set(double la, double lo, double ac) { accuracy = ac; qDebug() << "GoogleLatitude: set la = " << la << " lo = " << lo << " ac = " << ac; - qDebug() << "GoogleLatitude: set lastupdate = " << lastupdate << " current = " << QDateTime::currentMSecsSinceEpoch(); + qDebug() << "GoogleLatitude: set lastupdate = " << lastupdate << " current = " << QDateTime::currentDateTime().toUTC().toTime_t(); if (login_error) return; if (la*lo == 0) return; - if ( QDateTime::currentMSecsSinceEpoch() < lastupdate + interval*1000 ) return; + if ( QDateTime::currentDateTime().toUTC().toTime_t() < lastupdate + interval ) return; worker->get(QNetworkRequest(urllogin)); } @@ -82,8 +82,8 @@ void GoogleLatitude::finishedreply(QNetworkReply *r) { login_error = true; emit ERROR(); } else { - lastupdate = QDateTime::currentMSecsSinceEpoch(); - qDebug() << "GoogleLatitude: update ok " << " lastupdate = " << lastupdate; + lastupdate = QDateTime::currentDateTime().toUTC().toTime_t(); + qDebug() << "GoogleLatitude: update ok " << "lastupdate = " << lastupdate; emit OK(); } } else { diff --git a/src/glatitude.h b/src/glatitude.h index da1413a..498b454 100644 --- a/src/glatitude.h +++ b/src/glatitude.h @@ -36,7 +36,7 @@ private: QUrl urllogin; QUrl urldologin; QUrl urlupdate; - qint64 lastupdate; + unsigned int lastupdate; bool login_error; };