Skip to content

Commit

Permalink
[nemo-qml-plugin-calendar] Emit updated() on AgendaModel refresh
Browse files Browse the repository at this point in the history
The updated() signal is emitted when AgendaModel model data has
been updated either as a response to changes in startDate and/or
endDate, or changes in the data base.

The updated() signal does not imply that the AgendaModel has been
changed, only that the contents of the model are up to date.
  • Loading branch information
Petri M. Gerdt committed May 20, 2014
1 parent 2716cc1 commit 87a4feb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/calendaragendamodel.cpp
Expand Up @@ -187,6 +187,8 @@ void NemoCalendarAgendaModel::doRefresh(QList<NemoCalendarEventOccurrence *> new

if (oldEventCount != mEvents.count())
emit countChanged();

emit updated();
}

int NemoCalendarAgendaModel::count() const
Expand Down
1 change: 1 addition & 0 deletions src/calendaragendamodel.h
Expand Up @@ -78,6 +78,7 @@ class NemoCalendarAgendaModel : public QAbstractListModel, public QQmlParserStat
void countChanged();
void startDateChanged();
void endDateChanged();
void updated();

protected:
virtual QHash<int, QByteArray> roleNames() const;
Expand Down

0 comments on commit 87a4feb

Please sign in to comment.