summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-01-22 14:43:25 (GMT)
committerRichard Maudsley <richard.maudsley@isode.com>2014-01-22 14:43:25 (GMT)
commitff6103b78e16383cd4d0191ae39097496be6a65c (patch)
tree8f35bac6c2effec15f2df0fc3ae5b05468a92e2c /Swift/QtUI
parent90d05f4fc34d5ee81593ffacd6333a3ee3787072 (diff)
downloadswift-ff6103b78e16383cd4d0191ae39097496be6a65c.zip
swift-ff6103b78e16383cd4d0191ae39097496be6a65c.tar.bz2
Testing highlight keywords.
Change-Id: I808a4cf454198c41095adf294cb1d19860ed5df5
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtWebKitChatView.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp
index d1e250c..5d85913 100644
--- a/Swift/QtUI/QtWebKitChatView.cpp
+++ b/Swift/QtUI/QtWebKitChatView.cpp
@@ -557,7 +557,16 @@ QString QtWebKitChatView::chatMessageToHTML(const ChatWindow::ChatMessage& messa
continue;
}
if ((highlightPart = boost::dynamic_pointer_cast<ChatWindow::ChatHighlightingMessagePart>(part))) {
- //FIXME: Maybe do something here. Anything, really.
+
+ //class ChatHighlightingMessagePart : public ChatMessagePart {
+ //public:
+ //std::string foregroundColor;
+ //std::string backgroundColor;
+ //std::string text;
+ //};
+
+ /* TODO: this is just temporary for testing. it should take the color into account... */
+ result += "<b>!" + QtUtilities::htmlEscape(P2QSTRING(highlightPart->text)) + "!</b>";
continue;
}
@@ -565,7 +574,6 @@ QString QtWebKitChatView::chatMessageToHTML(const ChatWindow::ChatMessage& messa
return result;
}
-
QString QtWebKitChatView::getHighlightSpanStart(const HighlightAction& highlight) {
QString color = QtUtilities::htmlEscape(P2QSTRING(highlight.getTextColor()));
QString background = QtUtilities::htmlEscape(P2QSTRING(highlight.getTextBackground()));