summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-15 13:03:05 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-15 13:33:17 (GMT)
commitbd4e48adb3f23f80abc8441bf359166fbe9b621c (patch)
tree9141e6e7c68e28e14961491459d5996a1d957067 /Swift/QtUI/QtChatWindow.cpp
parent22973faaced00f3307efbb8b8fc4e914de7023e8 (diff)
downloadswift-bd4e48adb3f23f80abc8441bf359166fbe9b621c.zip
swift-bd4e48adb3f23f80abc8441bf359166fbe9b621c.tar.bz2
Linkify URLs.
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-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 fc8dc1e..bebebe8 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -2,6 +2,7 @@
#include "QtSwiftUtil.h"
#include "Roster/QtTreeWidget.h"
#include "Roster/QtTreeWidgetFactory.h"
+#include "SwifTools/Linkify.h"
#include "QtChatView.h"
#include "MessageSnippet.h"
#include "SystemMessageSnippet.h"
@@ -155,6 +156,7 @@ void QtChatWindow::addMessage(const String &message, const String &senderName, b
}
QString messageHTML(Qt::escape(P2QSTRING(message)));
messageHTML.replace("\n","<br/>");
+ messageHTML = P2QSTRING(Linkify::linkify(Q2PSTRING(messageHTML)));
htmlString += messageHTML;
bool appendToPrevious = !previousMessageWasSystem_ && ((senderIsSelf && previousMessageWasSelf_) || (!senderIsSelf && !previousMessageWasSelf_ && previousSenderName_ == P2QSTRING(senderName)));