diff options
author | Tobias Markmann <tm@ayena.de> | 2015-01-16 20:50:59 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2015-02-09 21:43:54 (GMT) |
commit | 672e56cd731d1cbc08941bf98d76699cd9fc4514 (patch) | |
tree | 8b8464d2a036ba7b398152e12a00f35eb173f5f8 /Swift/QtUI/EventViewer/EventModel.h | |
parent | 4fa1338b324c5e11218cea29c474da42b9142651 (diff) | |
download | swift-672e56cd731d1cbc08941bf98d76699cd9fc4514.zip swift-672e56cd731d1cbc08941bf98d76699cd9fc4514.tar.bz2 |
Fix UI update issue and enabled state of "Display Notice" in Notices view
EventModel was missing calls to endResetModel() in two return-paths.
In addition the limit for inactiveEvents was out-of-sync in different places.
The "Display Notice" button is now disabled if there is no notice left
to display.
Test-Information:
Tested on Mac OS X 10.9.5.
Change-Id: I2b74b942f58e80a9c1a46f434ffcebf8e1ce64bf
Diffstat (limited to 'Swift/QtUI/EventViewer/EventModel.h')
-rw-r--r-- | Swift/QtUI/EventViewer/EventModel.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/QtUI/EventViewer/EventModel.h b/Swift/QtUI/EventViewer/EventModel.h index 50334da..cf259f2 100644 --- a/Swift/QtUI/EventViewer/EventModel.h +++ b/Swift/QtUI/EventViewer/EventModel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -20,7 +20,7 @@ class EventModel : public QAbstractListModel { Q_OBJECT public: EventModel(); - ~EventModel(); + virtual ~EventModel(); void addEvent(boost::shared_ptr<StanzaEvent> event, bool active); void removeEvent(boost::shared_ptr<StanzaEvent> event); QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; @@ -28,7 +28,7 @@ class EventModel : public QAbstractListModel { QtEvent* getItem(int row) const; int getNewEventCount(); protected: - QModelIndex index ( int row, int column = 0, const QModelIndex & parent = QModelIndex() ) const; + QModelIndex index(int row, int column = 0, const QModelIndex & parent = QModelIndex()) const; private: QList<QtEvent*> activeEvents_; QList<QtEvent*> inactiveEvents_; |