diff options
Diffstat (limited to 'src/location/places/qplacecategory.cpp')
-rw-r--r-- | src/location/places/qplacecategory.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/location/places/qplacecategory.cpp b/src/location/places/qplacecategory.cpp index 56224cb0..a33d5d68 100644 --- a/src/location/places/qplacecategory.cpp +++ b/src/location/places/qplacecategory.cpp @@ -67,6 +67,14 @@ QPlaceCategoryPrivate &QPlaceCategoryPrivate::operator=(const QPlaceCategoryPriv return *this; } +bool QPlaceCategoryPrivate::isEmpty() const +{ + return categoryId.isEmpty() + && name.isEmpty() + && icon.isEmpty() + && QtLocation::UnspecifiedVisibility == visibility; +} + /*! \class QPlaceCategory \inmodule QtLocation @@ -200,4 +208,12 @@ void QPlaceCategory::setIcon(const QPlaceIcon &icon) d->icon = icon; } +/*! + Returns a boolean indicating whether the all the fields of the place category are empty or not. +*/ +bool QPlaceCategory::isEmpty() const +{ + return d->isEmpty(); +} + QT_END_NAMESPACE |