diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-10 12:09:26 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-07-10 12:09:26 (GMT) |
commit | 72cd949dd179f0781c156544b87cb6d1d5c34862 (patch) | |
tree | 2a30af0bbef092638d62e4f9163cf26a351fc5ac /Swift/QtUI/ChatList | |
parent | 8cd2cc3660a4af19ae74b7271571e7e2c3a3e35c (diff) | |
download | swift-contrib-72cd949dd179f0781c156544b87cb6d1d5c34862.zip swift-contrib-72cd949dd179f0781c156544b87cb6d1d5c34862.tar.bz2 |
Update the Chats tab for unread messages
Diffstat (limited to 'Swift/QtUI/ChatList')
-rw-r--r-- | Swift/QtUI/ChatList/QtChatListWindow.cpp | 4 | ||||
-rw-r--r-- | Swift/QtUI/ChatList/QtChatListWindow.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Swift/QtUI/ChatList/QtChatListWindow.cpp b/Swift/QtUI/ChatList/QtChatListWindow.cpp index fab6374..9beb9dc 100644 --- a/Swift/QtUI/ChatList/QtChatListWindow.cpp +++ b/Swift/QtUI/ChatList/QtChatListWindow.cpp @@ -99,8 +99,8 @@ void QtChatListWindow::setRecents(const std::list<ChatListWindow::Chat>& recents model_->setRecents(recents); } -void QtChatListWindow::setUnreadCount(int /*unread*/) { - +void QtChatListWindow::setUnreadCount(int unread) { + emit onCountUpdated(unread); } void QtChatListWindow::handleRemoveBookmark() { diff --git a/Swift/QtUI/ChatList/QtChatListWindow.h b/Swift/QtUI/ChatList/QtChatListWindow.h index 67f2c41..8775c3e 100644 --- a/Swift/QtUI/ChatList/QtChatListWindow.h +++ b/Swift/QtUI/ChatList/QtChatListWindow.h @@ -26,6 +26,9 @@ namespace Swift { void setRecents(const std::list<ChatListWindow::Chat>& recents); void setUnreadCount(int unread); void clearBookmarks(); + + signals: + void onCountUpdated(int count); private slots: void handleItemActivated(const QModelIndex&); void handleAddBookmark(); |