diff options
author | Edwin Mons <edwin.mons@isode.com> | 2018-11-08 14:12:36 (GMT) |
---|---|---|
committer | Edwin Mons <edwin.mons@isode.com> | 2018-11-08 15:30:19 (GMT) |
commit | 0b4e062a59613b2597b712c0106c3ed08b747637 (patch) | |
tree | 7b062a8123d37be7226d4eb36c553b04563255c6 /Swift/QtUI/QtChatWindow.h | |
parent | cf3d517763a3d74a2ec9fd6f7bdee8cbaee3550f (diff) | |
download | swift-0b4e062a59613b2597b712c0106c3ed08b747637.zip swift-0b4e062a59613b2597b712c0106c3ed08b747637.tar.bz2 |
Change unread counters to size_t
Since the counters cannot be negative, changing the type used for unread
counters to size_t seems a better fit, and it avoids the need for
numeric_casts.
Test-Information:
Unit tests pass on macOS 10.13
Change-Id: I61badcfc410f0cce7f922da90b50ef5a809c6521
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r-- | Swift/QtUI/QtChatWindow.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h index 8cc3283..b876d1e 100644 --- a/Swift/QtUI/QtChatWindow.h +++ b/Swift/QtUI/QtChatWindow.h @@ -106,7 +106,7 @@ namespace Swift { void show(); bool isVisible() const; void activate(); - void setUnreadMessageCount(int count); + void setUnreadMessageCount(size_t count); void convertToMUC(MUCType mucType); // TreeWidget *getTreeWidget(); void setAvailableSecurityLabels(const std::vector<SecurityLabelsCatalog::Item>& labels); @@ -119,7 +119,7 @@ namespace Swift { void setContactChatState(ChatState::ChatStateType state); void setRosterModel(Roster* roster); void setTabComplete(TabComplete* completer); - int getCount(); + size_t getCount(); virtual void replaceSystemMessage(const ChatMessage& message, const std::string& id, const TimestampBehaviour timestampBehaviour); void replaceLastMessage(const ChatMessage& message, const TimestampBehaviour timestampBehaviour); void setAckState(const std::string& id, AckState state); @@ -201,7 +201,7 @@ namespace Swift { void handleFocusTimerTick(); private: - int unreadCount_; + size_t unreadCount_; bool contactIsTyping_; LastLineTracker lastLineTracker_; std::string id_; |