summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-10-02 17:51:05 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-10-02 17:51:05 (GMT)
commitb07fa48455c9187538d371ea87fbed9cf44f8089 (patch)
tree63c793bf1e498df0ff7b2a607954896d10d9fd5b
parent614448b69d9356a2c656f8ad031fb2560e4de851 (diff)
downloadswift-b07fa48455c9187538d371ea87fbed9cf44f8089.zip
swift-b07fa48455c9187538d371ea87fbed9cf44f8089.tar.bz2
Linkify status messages in chat dialog.
Release-Notes: System and Presence messages in chat windows are now linkified (as well as chat messages, which were previously). Resolves: #584
-rw-r--r--Swift/QtUI/QtChatWindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index a927988..a644b86 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -316,6 +316,7 @@ void QtChatWindow::addSystemMessage(const String& message) {
}
QString messageHTML(Qt::escape(P2QSTRING(message)));
+ messageHTML = P2QSTRING(Linkify::linkify(Q2PSTRING(messageHTML)));
messageHTML.replace("\n","<br/>");
messageLog_->addMessage(boost::shared_ptr<ChatSnippet>(new SystemMessageSnippet(messageHTML, QDateTime::currentDateTime(), false, theme_)));
@@ -330,6 +331,7 @@ void QtChatWindow::addPresenceMessage(const String& message) {
}
QString messageHTML(Qt::escape(P2QSTRING(message)));
+ messageHTML = P2QSTRING(Linkify::linkify(Q2PSTRING(messageHTML)));
messageHTML.replace("\n","<br/>");
messageLog_->addMessage(boost::shared_ptr<ChatSnippet>(new SystemMessageSnippet(messageHTML, QDateTime::currentDateTime(), false, theme_)));