summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtPlainChatView.cpp')
-rw-r--r--Swift/QtUI/QtPlainChatView.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Swift/QtUI/QtPlainChatView.cpp b/Swift/QtUI/QtPlainChatView.cpp
index 1483205..031a41d 100644
--- a/Swift/QtUI/QtPlainChatView.cpp
+++ b/Swift/QtUI/QtPlainChatView.cpp
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 2013-2014 Isode Limited.
+ * Copyright (c) 2013-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swift/QtUI/QtPlainChatView.h>
@@ -101,18 +101,19 @@ std::string QtPlainChatView::addAction(const ChatWindow::ChatMessage& message, c
log_->append(text);
const std::string idx = senderIsSelf ? "" : senderName;
lastMessageLabel_[idx] = label;
return idx;
}
-void QtPlainChatView::addSystemMessage(const ChatWindow::ChatMessage& message, ChatWindow::Direction /*direction*/)
+std::string QtPlainChatView::addSystemMessage(const ChatWindow::ChatMessage& message, ChatWindow::Direction /*direction*/)
{
QString text = "<p><i>";
text += chatMessageToString(message);
text += "</i></p>";
log_->append(text);
+ return "";
}
void QtPlainChatView::addPresenceMessage(const ChatWindow::ChatMessage& message, ChatWindow::Direction /*direction*/)
{
QString text = "<p><i>";
text += chatMessageToString(message);
@@ -159,12 +160,19 @@ void QtPlainChatView::replaceLastMessage(const ChatWindow::ChatMessage& message,
QString text = "<p>The last message was corrected to:<br/>";
text += chatMessageToString(message);
text += "</p>";
log_->append(text);
}
+void QtPlainChatView::replaceSystemMessage(const ChatWindow::ChatMessage& message, const std::string& id, const ChatWindow::TimestampBehaviour timestampBehaviour) {
+ QString text = "<p><i>";
+ text += chatMessageToString(message);
+ text += "</i></p>";
+ log_->append(text);
+}
+
void QtPlainChatView::setAckState(const std::string& /*id*/, ChatWindow::AckState state)
{
if (state == ChatWindow::Failed) {
addSystemMessage(ChatWindow::ChatMessage("Message delivery failed due to disconnection from server."), ChatWindow::DefaultDirection);
}
}