diff options
Diffstat (limited to 'src/location/places/qplaceratings.cpp')
-rw-r--r-- | src/location/places/qplaceratings.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/location/places/qplaceratings.cpp b/src/location/places/qplaceratings.cpp index 30311370..9fc791ac 100644 --- a/src/location/places/qplaceratings.cpp +++ b/src/location/places/qplaceratings.cpp @@ -63,6 +63,11 @@ bool QPlaceRatingsPrivate::operator==(const QPlaceRatingsPrivate &other) const return average == other.average && maximum == other.maximum && count == other.count; } +bool QPlaceRatingsPrivate::isEmpty() const +{ + return count == 0 && average == 0 && maximum == 0; +} + /*! \class QPlaceRatings \inmodule QtLocation @@ -176,3 +181,11 @@ void QPlaceRatings::setCount(int count) { d->count = count; } + +/*! + Returns true if all fields of the place ratings are 0; otherwise returns false. +*/ +bool QPlaceRatings::isEmpty() const +{ + return d->isEmpty(); +} |