qtmobility/src/location/qnmeapositioninfosource.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
--- a/qtmobility/src/location/qnmeapositioninfosource.cpp	Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/src/location/qnmeapositioninfosource.cpp	Mon May 03 13:18:40 2010 +0300
@@ -44,7 +44,6 @@
 #include <QIODevice>
 #include <QBasicTimer>
 #include <QTimerEvent>
-#include <QDebug>
 #include <QTimer>
 
 QTM_BEGIN_NAMESPACE
@@ -119,7 +118,7 @@
         if (size <= 0)
             continue;
         bool ok = m_proxy->parsePosInfoFromNmeaData(buf, size, &update, &hasFix);
-        if (ok && update.dateTime().isValid()) {
+        if (ok && update.timestamp().isValid()) {
             QPendingGeoPositionInfo pending;
             pending.info = update;
             pending.hasFix = hasFix;
@@ -156,7 +155,7 @@
     int timeToNextUpdate = -1;
     QTime prevTime;
     if (m_pendingUpdates.size() > 0)
-        prevTime = m_pendingUpdates.head().info.dateTime().time();
+        prevTime = m_pendingUpdates.head().info.timestamp().time();
 
     // find the next update with a valid time (as long as the time is valid,
     // we can calculate when the update should be emitted)
@@ -166,7 +165,7 @@
         if (size <= 0)
             continue;
         if (m_proxy->parsePosInfoFromNmeaData(buf, size, &info, &hasFix)) {
-            QTime time = info.dateTime().time();
+            QTime time = info.timestamp().time();
             if (time.isValid()) {
                 if (!prevTime.isValid()) {
                     timeToNextUpdate = 0;
@@ -361,16 +360,17 @@
 
 void QNmeaPositionInfoSourcePrivate::notifyNewUpdate(QGeoPositionInfo *update, bool hasFix)
 {
-    //qDebug() << "QNmeaPositionInfoSourcePrivate::notifyNewUpdate()" << update->dateTime() << hasFix << m_invokedStart << (m_requestTimer && m_requestTimer->isActive());
+    // include <QDebug> before uncommenting
+    //qDebug() << "QNmeaPositionInfoSourcePrivate::notifyNewUpdate()" << update->timestamp() << hasFix << m_invokedStart << (m_requestTimer && m_requestTimer->isActive());
 
-    QDate date = update->dateTime().date();
+    QDate date = update->timestamp().date();
     if (date.isValid()) {
         m_currentDate = date;
     } else {
         // some sentence have time but no date
-        QTime time = update->dateTime().time();
+        QTime time = update->timestamp().time();
         if (time.isValid() && m_currentDate.isValid())
-            update->setDateTime(QDateTime(m_currentDate, time, Qt::UTC));
+            update->setTimestamp(QDateTime(m_currentDate, time, Qt::UTC));
     }
 
     if (hasFix && update->isValid()) {