summaryrefslogtreecommitdiff
path: root/src/location/places/qplacesearchrequest.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-11-25 08:57:57 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-29 09:01:44 +0100
commit17135310cf49b3523effed4e7f56af09661b5067 (patch)
tree0833a8d8b682b7cfd9467735688e3fd90c30f71f /src/location/places/qplacesearchrequest.cpp
parent869d49025720aa2e48bd5b6ff90d2c3d6be7dd28 (diff)
downloadqtlocation-17135310cf49b3523effed4e7f56af09661b5067.tar.gz
Fix assignment in QPlaceSearchRequest.
Check for equality. Change-Id: I12b9d16d4b94235bbcb9eb70a3a8713b196280a1 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/places/qplacesearchrequest.cpp')
-rw-r--r--src/location/places/qplacesearchrequest.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/location/places/qplacesearchrequest.cpp b/src/location/places/qplacesearchrequest.cpp
index 1a708593..1cfcb589 100644
--- a/src/location/places/qplacesearchrequest.cpp
+++ b/src/location/places/qplacesearchrequest.cpp
@@ -102,17 +102,19 @@ QPlaceSearchRequestPrivate::~QPlaceSearchRequestPrivate()
QPlaceSearchRequestPrivate &QPlaceSearchRequestPrivate::operator=(const QPlaceSearchRequestPrivate &other)
{
- searchTerm = other.searchTerm;
- categories = other.categories;
- if (other.searchArea)
- searchArea = other.searchArea->clone();
- else
- searchArea = 0;
- dymNumber = other.dymNumber;
- visibilityScope = other.visibilityScope;
- relevanceHint = other.relevanceHint;
- limit = other.limit;
- offset = other.offset;
+ if (this != &other) {
+ searchTerm = other.searchTerm;
+ categories = other.categories;
+ if (other.searchArea)
+ searchArea = other.searchArea->clone();
+ else
+ searchArea = 0;
+ dymNumber = other.dymNumber;
+ visibilityScope = other.visibilityScope;
+ relevanceHint = other.relevanceHint;
+ limit = other.limit;
+ offset = other.offset;
+ }
return *this;
}