diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-06-01 08:26:46 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2013-08-01 09:22:45 (GMT) |
commit | db698bbb6d8c7e878e2cb997e18e572f3646e11d (patch) | |
tree | 61aa3ff72c64dd8f309a2fe4b31b5b2d3f22f04b /Swift/QtUI/QtChatView.cpp | |
parent | b45602bcd36fb9d2e7a22998434e31014f072d33 (diff) | |
download | swift-contrib-db698bbb6d8c7e878e2cb997e18e572f3646e11d.zip swift-contrib-db698bbb6d8c7e878e2cb997e18e572f3646e11d.tar.bz2 |
Refactor chat messages so parsing of links/emoticons happens in controllers.
Change-Id: I07256f23ffbb6520f5063bdfbed9111946c46746
Diffstat (limited to 'Swift/QtUI/QtChatView.cpp')
-rw-r--r-- | Swift/QtUI/QtChatView.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp index 18c6e91..2536d39 100644 --- a/Swift/QtUI/QtChatView.cpp +++ b/Swift/QtUI/QtChatView.cpp @@ -129,5 +129,5 @@ void QtChatView::addMessageTop(boost::shared_ptr<ChatSnippet> snippet) { QString sizeString(QString().setNum(size, 'g', 3) + "em"); const QWebElementCollection spans = firstElement_.findAll("span.swift_resizable"); - foreach (QWebElement span, spans) { + Q_FOREACH (QWebElement span, spans) { span.setStyleProperty("font-size", sizeString); } @@ -162,5 +162,5 @@ void QtChatView::addToDOM(boost::shared_ptr<ChatSnippet> snippet) { QString sizeString(QString().setNum(size, 'g', 3) + "em"); const QWebElementCollection spans = lastElement_.findAll("span.swift_resizable"); - foreach (QWebElement span, spans) { + Q_FOREACH (QWebElement span, spans) { span.setStyleProperty("font-size", sizeString); } @@ -230,5 +230,5 @@ void QtChatView::showEmoticons(bool show) { { const QWebElementCollection spans = document_.findAll("span.swift_emoticon_image"); - foreach (QWebElement span, spans) { + Q_FOREACH (QWebElement span, spans) { span.setStyleProperty("display", show ? "inline" : "none"); } @@ -236,5 +236,5 @@ void QtChatView::showEmoticons(bool show) { { const QWebElementCollection spans = document_.findAll("span.swift_emoticon_text"); - foreach (QWebElement span, spans) { + Q_FOREACH (QWebElement span, spans) { span.setStyleProperty("display", show ? "none" : "inline"); } @@ -325,5 +325,5 @@ void QtChatView::resizeFont(int fontSizeSteps) { //qDebug() << "Setting to " << sizeString; const QWebElementCollection spans = document_.findAll("span.swift_resizable"); - foreach (QWebElement span, spans) { + Q_FOREACH (QWebElement span, spans) { span.setStyleProperty("font-size", sizeString); } @@ -371,5 +371,5 @@ void QtChatView::resetView() { static QWebElement findElementWithID(QWebElement document, QString elementName, QString id) { QWebElementCollection elements = document.findAll(elementName); - foreach(QWebElement element, elements) { + Q_FOREACH(QWebElement element, elements) { if (element.attribute("id") == id) { return element; |