diff options
author | abcd <qt-info@nokia.com> | 2011-06-27 16:57:19 +1000 |
---|---|---|
committer | abcd <qt-info@nokia.com> | 2011-06-27 16:57:19 +1000 |
commit | 818398b335420d09f7c4687b51c3e460595a4f95 (patch) | |
tree | 4faa2983bd9072dc2ea6d98bae22fc8554515c7e /src/location | |
parent | dd8762ec1cfe21d86ee1b0be1b235c57fb6858c7 (diff) | |
download | qtlocation-818398b335420d09f7c4687b51c3e460595a4f95.tar.gz |
Remove isEmpty() function from QPlaceCategory
There is no need for an isEmpty() function, not to mention
that it is ambiguous as to what empty means.
.e.g does having an id filled in but the rest of the data fields
blank mean a category is empty? Or does empty mean every single
data field is blank.
Diffstat (limited to 'src/location')
-rw-r--r-- | src/location/places/qplacecategory.cpp | 8 | ||||
-rw-r--r-- | src/location/places/qplacecategory.h | 1 | ||||
-rw-r--r-- | src/location/places/qplacesearchquery.cpp | 3 |
3 files changed, 1 insertions, 11 deletions
diff --git a/src/location/places/qplacecategory.cpp b/src/location/places/qplacecategory.cpp index 504de616..6ffcb4bd 100644 --- a/src/location/places/qplacecategory.cpp +++ b/src/location/places/qplacecategory.cpp @@ -188,11 +188,3 @@ void QPlaceCategory::setName(const QString &name) { d->name = name; } - -/*! - Returns true if category is empty. -*/ -bool QPlaceCategory::isEmpty() const -{ - return d->categoryId.isEmpty(); -} diff --git a/src/location/places/qplacecategory.h b/src/location/places/qplacecategory.h index e3ee321f..0059d61a 100644 --- a/src/location/places/qplacecategory.h +++ b/src/location/places/qplacecategory.h @@ -77,7 +77,6 @@ public: QString name() const; void setName(const QString &name); - bool isEmpty() const; private: QSharedDataPointer<QPlaceCategoryPrivate> d; }; diff --git a/src/location/places/qplacesearchquery.cpp b/src/location/places/qplacesearchquery.cpp index cd8693da..bf4989e0 100644 --- a/src/location/places/qplacesearchquery.cpp +++ b/src/location/places/qplacesearchquery.cpp @@ -192,8 +192,7 @@ QList<QPlaceCategory> QPlaceSearchQuery::categories() const void QPlaceSearchQuery::setCategory(const QPlaceCategory &category) { d->categories.clear(); - if (!category.isEmpty()) - d->categories.append(category); + d->categories.append(category); } /*! |