--- a/qtmobility/src/location/qgeopositioninfo.cpp Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/src/location/qgeopositioninfo.cpp Mon May 03 13:18:40 2010 +0300
@@ -49,7 +49,7 @@
class QGeoPositionInfoPrivate
{
public:
- QDateTime dateTime;
+ QDateTime timestamp;
QGeoCoordinate coord;
QHash<int, qreal> doubleAttribs;
};
@@ -89,12 +89,12 @@
}
/*!
- Creates a QGeoPositionInfo for the given \a coordinate and \a dateTime.
+ Creates a QGeoPositionInfo for the given \a coordinate and \a timestamp.
*/
-QGeoPositionInfo::QGeoPositionInfo(const QGeoCoordinate &coordinate, const QDateTime &dateTime)
+QGeoPositionInfo::QGeoPositionInfo(const QGeoCoordinate &coordinate, const QDateTime ×tamp)
: d(new QGeoPositionInfoPrivate)
{
- d->dateTime = dateTime;
+ d->timestamp = timestamp;
d->coord = coordinate;
}
@@ -123,7 +123,7 @@
if (this == &other)
return *this;
- d->dateTime = other.d->dateTime;
+ d->timestamp = other.d->timestamp;
d->coord = other.d->coord;
d->doubleAttribs = other.d->doubleAttribs;
@@ -136,7 +136,7 @@
*/
bool QGeoPositionInfo::operator==(const QGeoPositionInfo &other) const
{
- return d->dateTime == other.d->dateTime
+ return d->timestamp == other.d->timestamp
&& d->coord == other.d->coord
&& d->doubleAttribs == other.d->doubleAttribs;
}
@@ -149,25 +149,25 @@
*/
/*!
- Returns true if the dateTime() and coordinate() values are both valid.
+ Returns true if the timestamp() and coordinate() values are both valid.
\sa QGeoCoordinate::isValid(), QDateTime::isValid()
*/
bool QGeoPositionInfo::isValid() const
{
- return d->dateTime.isValid() && d->coord.isValid();
+ return d->timestamp.isValid() && d->coord.isValid();
}
/*!
- Sets the date and time at which this position was reported to \a dateTime.
+ Sets the date and time at which this position was reported to \a timestamp.
- The \a dateTime must be in UTC time.
+ The \a timestamp must be in UTC time.
- \sa dateTime()
+ \sa timestamp()
*/
-void QGeoPositionInfo::setDateTime(const QDateTime &dateTime)
+void QGeoPositionInfo::setTimestamp(const QDateTime ×tamp)
{
- d->dateTime = dateTime;
+ d->timestamp = timestamp;
}
/*!
@@ -175,11 +175,11 @@
Returns an invalid QDateTime if no date/time value has been set.
- \sa setDateTime()
+ \sa setTimestamp()
*/
-QDateTime QGeoPositionInfo::dateTime() const
+QDateTime QGeoPositionInfo::timestamp() const
{
- return d->dateTime;
+ return d->timestamp;
}
/*!
@@ -217,7 +217,11 @@
/*!
Returns the value of the specified \a attribute as a qreal value.
- Returns -1 if the value has not been set.
+ Returns -1 if the value has not been set, although this may also
+ be a legitimate value for some attributes.
+
+ The function hasAttribute() should be used to determine whether or
+ not a value has been set for an attribute.
\sa hasAttribute(), setAttribute()
*/
@@ -246,13 +250,13 @@
}
#ifndef QT_NO_DEBUG_STREAM
-QDebug operator<<(QDebug dbg, const QGeoPositionInfo &update)
+QDebug operator<<(QDebug dbg, const QGeoPositionInfo &info)
{
- dbg.nospace() << "QGeoPositionInfo(" << update.d->dateTime;
+ dbg.nospace() << "QGeoPositionInfo(" << info.d->timestamp;
dbg.nospace() << ", ";
- dbg.nospace() << update.d->coord;
+ dbg.nospace() << info.d->coord;
- QList<int> attribs = update.d->doubleAttribs.keys();
+ QList<int> attribs = info.d->doubleAttribs.keys();
for (int i = 0; i < attribs.count(); i++) {
dbg.nospace() << ", ";
switch (attribs[i]) {
@@ -275,7 +279,7 @@
dbg.nospace() << "VerticalAccuracy=";
break;
}
- dbg.nospace() << update.d->doubleAttribs[attribs[i]];
+ dbg.nospace() << info.d->doubleAttribs[attribs[i]];
}
dbg.nospace() << ')';
return dbg;
@@ -294,7 +298,7 @@
QDataStream &operator<<(QDataStream &stream, const QGeoPositionInfo &info)
{
- stream << info.d->dateTime;
+ stream << info.d->timestamp;
stream << info.d->coord;
stream << info.d->doubleAttribs;
return stream;
@@ -314,7 +318,7 @@
QDataStream &operator>>(QDataStream &stream, QGeoPositionInfo &info)
{
- stream >> info.d->dateTime;
+ stream >> info.d->timestamp;
stream >> info.d->coord;
stream >> info.d->doubleAttribs;
return stream;