summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Mons <edwin.mons@isode.com>2018-11-08 14:12:36 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2018-11-08 15:30:19 (GMT)
commit0b4e062a59613b2597b712c0106c3ed08b747637 (patch)
tree7b062a8123d37be7226d4eb36c553b04563255c6 /Swift/QtUI/QtChatWindow.cpp
parentcf3d517763a3d74a2ec9fd6f7bdee8cbaee3550f (diff)
downloadswift-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.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index a413b4d..82c65ce 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -505,7 +505,7 @@ void QtChatWindow::showEvent(QShowEvent* event) {
505 QWidget::showEvent(event); 505 QWidget::showEvent(event);
506} 506}
507 507
508void QtChatWindow::setUnreadMessageCount(int count) { 508void QtChatWindow::setUnreadMessageCount(size_t count) {
509 if (unreadCount_ != count) { 509 if (unreadCount_ != count) {
510 unreadCount_ = count; 510 unreadCount_ = count;
511 updateTitleWithUnreadCount(); 511 updateTitleWithUnreadCount();
@@ -547,7 +547,7 @@ void QtChatWindow::flash() {
547 emit requestFlash(); 547 emit requestFlash();
548} 548}
549 549
550int QtChatWindow::getCount() { 550size_t QtChatWindow::getCount() {
551 return unreadCount_; 551 return unreadCount_;
552} 552}
553 553