summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-04-16 11:24:19 +0200
committerJędrzej Nowacki <jedrzej.nowacki@qt.io>2018-04-17 06:48:30 +0000
commited272aade6e1734892cc25aa354394502069dc6f (patch)
tree0c63241b97f315eaa8bb55f97ff526f0df70f2a3
parentb21c33a3278260df469175a3ce08447b7a3dc47c (diff)
downloadqtlocation-ed272aade6e1734892cc25aa354394502069dc6f.tar.gz
API Fix: remove QGeoCoordinate <-> QGeoCoordinateObject
This was some code needed for supporting something that eventually did not get in. So we can as well remove it altogether from the API. Change-Id: Ibbfc50fb950c316308ce1d666e39da33527faa9e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel.cpp2
-rw-r--r--src/positioning/qgeocoordinate.cpp46
-rw-r--r--src/positioning/qgeocoordinate.h13
3 files changed, 1 insertions, 60 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
index 10d8eb7f..0f0bb253 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
@@ -1669,7 +1669,7 @@ void QDeclarativeGeoRouteQuery::doCoordinateChanged()
static QGeoCoordinate convertWaypointToCoordinate(const QDeclarativeGeoWaypoint *value)
{
- return QGeoCoordinate(value);
+ return value->coordinate();
}
struct WaypointVariantConversions
diff --git a/src/positioning/qgeocoordinate.cpp b/src/positioning/qgeocoordinate.cpp
index 4353d214..80904d7c 100644
--- a/src/positioning/qgeocoordinate.cpp
+++ b/src/positioning/qgeocoordinate.cpp
@@ -39,7 +39,6 @@
#include "qgeocoordinate.h"
#include "qgeocoordinate_p.h"
#include "qlocationutils_p.h"
-#include "qgeocoordinateobject_p.h"
#include <QDateTime>
#include <QHash>
@@ -251,16 +250,6 @@ QGeoCoordinate::QGeoCoordinate(const QGeoCoordinate &other)
: d(other.d)
{}
-QGeoCoordinate::QGeoCoordinate(const QGeoCoordinateObject &coordinateoObject) : d(coordinateoObject.coordinate().d)
-{
-}
-
-QGeoCoordinate::QGeoCoordinate(const QGeoCoordinateObject *coordinateObject) : d(new QGeoCoordinatePrivate)
-{
- if (coordinateObject)
- d = coordinateObject->coordinate().d;
-}
-
/*!
Assigns \a other to this coordinate and returns a reference to this coordinate.
*/
@@ -274,24 +263,6 @@ QGeoCoordinate &QGeoCoordinate::operator=(const QGeoCoordinate &other)
}
/*!
- \fn QGeoCoordinate &QGeoCoordinate::operator=(const QGeoCoordinateObject &coordinateoObject)
- \fn QGeoCoordinate &QGeoCoordinate::operator=(const QGeoCoordinateObject *coordinateoObject)
-
- Assigns \a coordinateoObject to this coordinate and returns a reference to this coordinate.
-*/
-QGeoCoordinate &QGeoCoordinate::operator=(const QGeoCoordinateObject &coordinateoObject)
-{
- d = coordinateoObject.coordinate().d;
- return (*this);
-}
-
-QGeoCoordinate &QGeoCoordinate::operator=(const QGeoCoordinateObject *coordinateoObject)
-{
- d = coordinateoObject->coordinate().d;
- return (*this);
-}
-
-/*!
Destroys the coordinate object.
*/
QGeoCoordinate::~QGeoCoordinate()
@@ -320,23 +291,6 @@ bool QGeoCoordinate::operator==(const QGeoCoordinate &other) const
}
/*!
- \fn bool QGeoCoordinate::operator==(const QGeoCoordinateObject &other) const
- \fn bool QGeoCoordinate::operator==(const QGeoCoordinateObject *other) const
-
- Returns \c true if latitude, longitude, and altitude of this
- coordinate are identical to \a other.
-*/
-bool QGeoCoordinate::operator==(const QGeoCoordinateObject &other) const
-{
- return (*this == other.coordinate());
-}
-
-bool QGeoCoordinate::operator==(const QGeoCoordinateObject *other) const
-{
- return (*this == other->coordinate());
-}
-
-/*!
\fn bool QGeoCoordinate::operator!=(const QGeoCoordinate &other) const
\fn bool QGeoCoordinate::operator!=(const QGeoCoordinateObject &other) const
\fn bool QGeoCoordinate::operator!=(const QGeoCoordinateObject *other) const
diff --git a/src/positioning/qgeocoordinate.h b/src/positioning/qgeocoordinate.h
index c5497dae..ddb6274e 100644
--- a/src/positioning/qgeocoordinate.h
+++ b/src/positioning/qgeocoordinate.h
@@ -51,7 +51,6 @@ class QDebug;
class QDataStream;
class QGeoCoordinatePrivate;
-class QGeoCoordinateObject;
class Q_POSITIONING_EXPORT QGeoCoordinate
{
Q_GADGET
@@ -82,26 +81,14 @@ public:
QGeoCoordinate(double latitude, double longitude);
QGeoCoordinate(double latitude, double longitude, double altitude);
QGeoCoordinate(const QGeoCoordinate &other);
- QGeoCoordinate(const QGeoCoordinateObject &coordinateoObject);
- QGeoCoordinate(const QGeoCoordinateObject *coordinateObject);
~QGeoCoordinate();
QGeoCoordinate &operator=(const QGeoCoordinate &other);
- QGeoCoordinate &operator=(const QGeoCoordinateObject &coordinateObject);
- QGeoCoordinate &operator=(const QGeoCoordinateObject *coordinateoObject);
bool operator==(const QGeoCoordinate &other) const;
- bool operator==(const QGeoCoordinateObject &other) const;
- bool operator==(const QGeoCoordinateObject *other) const;
inline bool operator!=(const QGeoCoordinate &other) const {
return !operator==(other);
}
- inline bool operator!=(const QGeoCoordinateObject &other) const {
- return !operator==(other);
- }
- inline bool operator!=(const QGeoCoordinateObject *other) const {
- return !operator==(*other);
- }
bool isValid() const;
CoordinateType type() const;