summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-01-09 15:56:26 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-01-15 14:26:14 +0100
commit8d8865a32fb2cdfdd548e8c1c62081f012d0f09a (patch)
tree1606d7822bcd5a13f17e5806540af4579c47adcf
parent01bc25e0d794a2f01104208d965fa45a4c38b945 (diff)
downloadqtlocation-8d8865a32fb2cdfdd548e8c1c62081f012d0f09a.tar.gz
Remove temporary operator< for QtPositioning value types
The operators were added by 8bf0a15bfc124fbb664592d4c3f29973fc23262e. They were required to enable QML comparison of those value types. This requirement was removed by the introduction of QMetaType::registerEqualsComparator() in Qt 5.5. Change-Id: I3950726c26144420157f12b59b9c15cc1f5ffc40 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@digia.com>
-rw-r--r--src/imports/positioning/positioning.cpp8
-rw-r--r--src/positioning/qgeocircle.h8
-rw-r--r--src/positioning/qgeocoordinate.h8
-rw-r--r--src/positioning/qgeorectangle.h8
-rw-r--r--src/positioning/qgeoshape.h8
-rw-r--r--tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp2
6 files changed, 5 insertions, 37 deletions
diff --git a/src/imports/positioning/positioning.cpp b/src/imports/positioning/positioning.cpp
index 3efe7a2b..13ad1c1c 100644
--- a/src/imports/positioning/positioning.cpp
+++ b/src/imports/positioning/positioning.cpp
@@ -83,15 +83,15 @@ public:
int minor = 0;
qRegisterMetaType<QGeoCoordinate>("QGeoCoordinate");
- QMetaType::registerComparators<QGeoCoordinate>();
+ QMetaType::registerEqualsComparator<QGeoCoordinate>();
qRegisterMetaType<QGeoAddress>("QGeoAddress");
qRegisterMetaType<QGeoRectangle>("QGeoRectangle");
- QMetaType::registerComparators<QGeoRectangle>();
+ QMetaType::registerEqualsComparator<QGeoRectangle>();
qRegisterMetaType<QGeoCircle>("QGeoCircle");
- QMetaType::registerComparators<QGeoCircle>();
+ QMetaType::registerEqualsComparator<QGeoCircle>();
qRegisterMetaType<QGeoLocation>("QGeoLocation");
qRegisterMetaType<QGeoShape>();
- QMetaType::registerComparators<QGeoShape>();
+ QMetaType::registerEqualsComparator<QGeoShape>();
qRegisterAnimationInterpolator<QGeoCoordinate>(geoCoordinateInterpolator);
diff --git a/src/positioning/qgeocircle.h b/src/positioning/qgeocircle.h
index 37715b16..2ff0c4f0 100644
--- a/src/positioning/qgeocircle.h
+++ b/src/positioning/qgeocircle.h
@@ -81,14 +81,6 @@ private:
Q_DECLARE_TYPEINFO(QGeoCircle, Q_MOVABLE_TYPE);
-// FIXME: Exists to satisfy QMetaType::registerComparators() which is required for
-// QML value type. Remove once QMetaType has been fixed.
-inline bool operator<(const QGeoCircle &/*lhs*/, const QGeoCircle &/*rhs*/)
-{
- qWarning("'<' operator not valid for QGeoCircle\n");
- return false;
-}
-
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QGeoCircle)
diff --git a/src/positioning/qgeocoordinate.h b/src/positioning/qgeocoordinate.h
index dc501b44..d80e0187 100644
--- a/src/positioning/qgeocoordinate.h
+++ b/src/positioning/qgeocoordinate.h
@@ -120,14 +120,6 @@ Q_POSITIONING_EXPORT QDataStream &operator<<(QDataStream &stream, const QGeoCoor
Q_POSITIONING_EXPORT QDataStream &operator>>(QDataStream &stream, QGeoCoordinate &coordinate);
#endif
-// FIXME: Exists to satisfy QMetaType::registerComparators() which is required for
-// QML value type. Remove once QMetaType has been fixed.
-inline bool operator<(const QGeoCoordinate &/*lhs*/, const QGeoCoordinate &/*rhs*/)
-{
- qWarning("'<' operator not valid for QGeoCoordinate\n");
- return false;
-}
-
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QGeoCoordinate)
diff --git a/src/positioning/qgeorectangle.h b/src/positioning/qgeorectangle.h
index 51fd94b7..b6e92b5b 100644
--- a/src/positioning/qgeorectangle.h
+++ b/src/positioning/qgeorectangle.h
@@ -116,14 +116,6 @@ inline QGeoRectangle QGeoRectangle::operator|(const QGeoRectangle &rectangle) co
return united(rectangle);
}
-// FIXME: Exists to satisfy QMetaType::registerComparators() which is required for
-// QML value type. Remove once QMetaType has been fixed.
-inline bool operator<(const QGeoRectangle &/*lhs*/, const QGeoRectangle &/*rhs*/)
-{
- qWarning("'<' operator not valid for QGeoRectangle\n");
- return false;
-}
-
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QGeoRectangle)
diff --git a/src/positioning/qgeoshape.h b/src/positioning/qgeoshape.h
index 1cf12ebe..3827f561 100644
--- a/src/positioning/qgeoshape.h
+++ b/src/positioning/qgeoshape.h
@@ -98,14 +98,6 @@ Q_POSITIONING_EXPORT QDataStream &operator<<(QDataStream &stream, const QGeoShap
Q_POSITIONING_EXPORT QDataStream &operator>>(QDataStream &stream, QGeoShape &shape);
#endif
-// FIXME: Exists to satisfy QMetaType::registerComparators() which is required for
-// QML value type. Remove once QMetaType has been fixed.
-inline bool operator<(const QGeoShape &/*lhs*/, const QGeoShape &/*rhs*/)
-{
- qWarning("'<' operator not valid for QGeoShape\n");
- return false;
-}
-
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QGeoShape)
diff --git a/tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp b/tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp
index a47a75d4..0c960c21 100644
--- a/tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp
+++ b/tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp
@@ -87,7 +87,7 @@ private slots:
void initTestcase()
{
qRegisterMetaType<QGeoCoordinate>();
- QMetaType::registerComparators<QGeoCoordinate>();
+ QMetaType::registerEqualsComparator<QGeoCoordinate>();
}
void constructor()