summaryrefslogtreecommitdiff
path: root/src/positioning/qgeolocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/positioning/qgeolocation.cpp')
-rw-r--r--src/positioning/qgeolocation.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/positioning/qgeolocation.cpp b/src/positioning/qgeolocation.cpp
index 62e1a6a3..dd34112f 100644
--- a/src/positioning/qgeolocation.cpp
+++ b/src/positioning/qgeolocation.cpp
@@ -53,6 +53,7 @@ QGeoLocationPrivate::QGeoLocationPrivate(const QGeoLocationPrivate &other)
this->address = other.address;
this->coordinate = other.coordinate;
this->viewport = other.viewport;
+ this->extendedAttributes = other.extendedAttributes;
}
QGeoLocationPrivate::~QGeoLocationPrivate()
@@ -63,7 +64,8 @@ bool QGeoLocationPrivate::operator==(const QGeoLocationPrivate &other) const
{
return (this->address == other.address
&& this->coordinate == other.coordinate
- && this->viewport == other.viewport);
+ && this->viewport == other.viewport
+ && this->extendedAttributes == other.extendedAttributes);
}
@@ -72,7 +74,7 @@ bool QGeoLocationPrivate::isEmpty() const
return (address.isEmpty()
&& !coordinate.isValid()
&& viewport.isEmpty()
- );
+ && extendedAttributes.isEmpty());
}
/*!
@@ -193,6 +195,27 @@ void QGeoLocation::setBoundingBox(const QGeoRectangle &boundingBox)
}
/*!
+ Returns the extended attributes associated to this location.
+ Extended attributes are backend-dependent and can be location-dependent.
+
+ \since 5.13
+*/
+QVariantMap QGeoLocation::extendedAttributes() const
+{
+ return d->extendedAttributes;
+}
+
+/*!
+ Sets the extended attributes of the location.
+
+ \since 5.13
+*/
+void QGeoLocation::setExtendedAttributes(const QVariantMap &data)
+{
+ d->extendedAttributes = data;
+}
+
+/*!
Returns true if all fields of the location are 0; otherwise returns false.
*/
bool QGeoLocation::isEmpty() const