diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-15 13:03:05 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-15 13:33:17 (GMT) |
commit | bd4e48adb3f23f80abc8441bf359166fbe9b621c (patch) | |
tree | 9141e6e7c68e28e14961491459d5996a1d957067 /Swift/QtUI/QtChatWindow.cpp | |
parent | 22973faaced00f3307efbb8b8fc4e914de7023e8 (diff) | |
download | swift-contrib-bd4e48adb3f23f80abc8441bf359166fbe9b621c.zip swift-contrib-bd4e48adb3f23f80abc8441bf359166fbe9b621c.tar.bz2 |
Linkify URLs.
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 2 |
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))); |