diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-06-06 11:41:47 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-06-08 09:22:25 +0000 |
commit | 7e81408cfe615e0cf5fdd7f258749131c9cad2c3 (patch) | |
tree | cbabd1159a2533d02ce9b6e349674d60038c5522 /src/location/maps | |
parent | e45ded979d7838847b7fe057f0a2d6c15b517de2 (diff) | |
download | qtlocation-7e81408cfe615e0cf5fdd7f258749131c9cad2c3.tar.gz |
Fix QGeoRouteRequest::operator==
Perform deep comparison using the already implemented
QGeoRouteRequestPrivate::operator== if pointers aren't the same.
Change-Id: I03260596753677054283d8381108a67ed8999ff4
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps')
-rw-r--r-- | src/location/maps/qgeorouterequest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/location/maps/qgeorouterequest.cpp b/src/location/maps/qgeorouterequest.cpp index a252b101..57fbe207 100644 --- a/src/location/maps/qgeorouterequest.cpp +++ b/src/location/maps/qgeorouterequest.cpp @@ -263,7 +263,8 @@ QGeoRouteRequest &QGeoRouteRequest::operator= (const QGeoRouteRequest & other) */ bool QGeoRouteRequest::operator ==(const QGeoRouteRequest &other) const { - return (d_ptr.constData() == other.d_ptr.constData()); + return ( (d_ptr.constData() == other.d_ptr.constData()) + || (*d_ptr) == (*other.d_ptr)); } /*! @@ -271,7 +272,7 @@ bool QGeoRouteRequest::operator ==(const QGeoRouteRequest &other) const */ bool QGeoRouteRequest::operator !=(const QGeoRouteRequest &other) const { - return (d_ptr.constData() != other.d_ptr.constData()); + return !(operator==(other)); } /*! |