From 7e81408cfe615e0cf5fdd7f258749131c9cad2c3 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 6 Jun 2018 11:41:47 +0200 Subject: 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 --- src/location/maps/qgeorouterequest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/location/maps/qgeorouterequest.cpp') 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)); } /*! -- cgit v1.2.3