diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-25 08:57:57 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-29 09:01:44 +0100 |
commit | 17135310cf49b3523effed4e7f56af09661b5067 (patch) | |
tree | 0833a8d8b682b7cfd9467735688e3fd90c30f71f /src/location/places/qplacesearchrequest.cpp | |
parent | 869d49025720aa2e48bd5b6ff90d2c3d6be7dd28 (diff) | |
download | qtlocation-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.cpp | 24 |
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; } |