diff options
Diffstat (limited to 'Swift/QtUI')
| -rw-r--r-- | Swift/QtUI/ChatList/QtChatListWindow.cpp | 2 | ||||
| -rw-r--r-- | Swift/QtUI/ChatList/QtChatListWindow.h | 4 | ||||
| -rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 4 | ||||
| -rw-r--r-- | Swift/QtUI/QtChatWindow.h | 6 | ||||
| -rw-r--r-- | Swift/QtUI/QtTabbable.h | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/Swift/QtUI/ChatList/QtChatListWindow.cpp b/Swift/QtUI/ChatList/QtChatListWindow.cpp index e92ba0d..2fd05c4 100644 --- a/Swift/QtUI/ChatList/QtChatListWindow.cpp +++ b/Swift/QtUI/ChatList/QtChatListWindow.cpp @@ -124,19 +124,19 @@ void QtChatListWindow::addWhiteboardSession(const ChatListWindow::Chat& chat) { void QtChatListWindow::removeWhiteboardSession(const JID& jid) { model_->removeWhiteboardSession(jid); } void QtChatListWindow::setRecents(const std::list<ChatListWindow::Chat>& recents) { model_->setRecents(recents); } -void QtChatListWindow::setUnreadCount(int unread) { +void QtChatListWindow::setUnreadCount(size_t unread) { emit onCountUpdated(unread); } void QtChatListWindow::setOnline(bool isOnline) { isOnline_ = isOnline; } void QtChatListWindow::handleRemoveBookmark() { const ChatListMUCItem* mucItem = dynamic_cast<const ChatListMUCItem*>(contextMenuItem_); diff --git a/Swift/QtUI/ChatList/QtChatListWindow.h b/Swift/QtUI/ChatList/QtChatListWindow.h index 001650c..3322001 100644 --- a/Swift/QtUI/ChatList/QtChatListWindow.h +++ b/Swift/QtUI/ChatList/QtChatListWindow.h @@ -21,24 +21,24 @@ namespace Swift { public: QtChatListWindow(UIEventStream *uiEventStream, SettingsProvider* settings, QWidget* parent = nullptr); virtual ~QtChatListWindow(); void addMUCBookmark(const MUCBookmark& bookmark); void removeMUCBookmark(const MUCBookmark& bookmark); void addWhiteboardSession(const ChatListWindow::Chat& chat); void removeWhiteboardSession(const JID& jid); void setBookmarksEnabled(bool enabled); void setRecents(const std::list<ChatListWindow::Chat>& recents); - void setUnreadCount(int unread); + void setUnreadCount(size_t unread); void clearBookmarks(); virtual void setOnline(bool isOnline); signals: - void onCountUpdated(int count); + void onCountUpdated(size_t count); private slots: void handleItemActivated(const QModelIndex&); void handleEditBookmark(); void handleRemoveBookmark(); void handleClicked(const QModelIndex& index); void handleSettingChanged(const std::string& setting); void handleClearRecentsRequested(); protected: 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 @@ -499,19 +499,19 @@ void QtChatWindow::setOnline(bool online) { } } } void QtChatWindow::showEvent(QShowEvent* event) { emit windowOpening(); QWidget::showEvent(event); } -void QtChatWindow::setUnreadMessageCount(int count) { +void QtChatWindow::setUnreadMessageCount(size_t count) { if (unreadCount_ != count) { unreadCount_ = count; updateTitleWithUnreadCount(); emit countUpdated(); } } void QtChatWindow::setContactChatState(ChatState::ChatStateType state) { contactIsTyping_ = (state == ChatState::Composing); @@ -541,19 +541,19 @@ void QtChatWindow::updateTitleWithUnreadCount() { setWindowTitle(contact_); } emit titleUpdated(); } void QtChatWindow::flash() { emit requestFlash(); } -int QtChatWindow::getCount() { +size_t QtChatWindow::getCount() { return unreadCount_; } void QtChatWindow::replaceSystemMessage(const ChatWindow::ChatMessage& message, const std::string& id, const ChatWindow::TimestampBehaviour timestampBehaviour) { messageLog_->replaceSystemMessage(message, id, timestampBehaviour); } void QtChatWindow::returnPressed() { if (!isOnline_ || (blockingState_ == IsBlocked)) { 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 @@ -100,32 +100,32 @@ namespace Swift { void setFileTransferProgress(std::string id, const int percentageDone); void setFileTransferStatus(std::string id, const FileTransferState state, const std::string& msg); std::string addWhiteboardRequest(bool senderIsSelf); void setWhiteboardSessionStatus(std::string id, const ChatWindow::WhiteboardSessionState state); 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); void setSecurityLabelsEnabled(bool enabled); void setSecurityLabelsError(); SecurityLabelsCatalog::Item getSelectedSecurityLabel(); void setName(const std::string& name); void setOnline(bool online); QtTabbable::AlertType getWidgetAlertState(); 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); // message receipts void setMessageReceiptState(const std::string& id, ChatWindow::ReceiptState state); void flash(); QByteArray getSplitterState(); @@ -195,19 +195,19 @@ namespace Swift { static std::vector<JID> jidListFromQByteArray(const QByteArray& dataBytes); void resetDayChangeTimer(); void setChatSecurityMarking(const std::string& markingValue, const std::string& markingForegroundColorValue, const std::string& markingBackgroundColorValue); void removeChatSecurityMarking(); void handleFocusTimerTick(); private: - int unreadCount_; + size_t unreadCount_; bool contactIsTyping_; LastLineTracker lastLineTracker_; std::string id_; QString contact_; QString lastSentMessage_; QTextCursor tabCompleteCursor_; QtChatView* messageLog_; QtChatTheme* theme_; QtTextEdit* input_; diff --git a/Swift/QtUI/QtTabbable.h b/Swift/QtUI/QtTabbable.h index 5837702..63c60f4 100644 --- a/Swift/QtUI/QtTabbable.h +++ b/Swift/QtUI/QtTabbable.h @@ -13,19 +13,19 @@ namespace Swift { class QtTabbable : public QWidget { Q_OBJECT public: enum AlertType {NoActivity, WaitingActivity, ImpendingActivity}; virtual ~QtTabbable(); bool isWidgetSelected(); virtual AlertType getWidgetAlertState() {return NoActivity;} - virtual int getCount() {return 0;} + virtual size_t getCount() {return 0;} virtual std::string getID() const = 0; virtual void setEmphasiseFocus(bool /*emphasise*/) {} protected: QtTabbable(); virtual bool event(QEvent* event); virtual void closeEvent(QCloseEvent* event); signals: |
Swift