summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2014-02-22 16:34:22 (GMT)
committerKevin Smith <git@kismith.co.uk>2014-02-22 16:34:31 (GMT)
commitf437c387a2bb31e4bf79869dfe40a541cda4f6c6 (patch)
tree1a343696f59389aca0c55e8b6e069d476748e506
parent0bd2db205035d4da9a93eb41dee126bf502eb44d (diff)
downloadswift-f437c387a2bb31e4bf79869dfe40a541cda4f6c6.zip
swift-f437c387a2bb31e4bf79869dfe40a541cda4f6c6.tar.bz2
Clean up recent patch a little
Change-Id: Ic982cc6d1716c0c4d1ef25555706c66792bd97dd
-rw-r--r--Swift/QtUI/QtXMLConsoleWidget.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/Swift/QtUI/QtXMLConsoleWidget.cpp b/Swift/QtUI/QtXMLConsoleWidget.cpp
index 609c6a2..f8ab28e 100644
--- a/Swift/QtUI/QtXMLConsoleWidget.cpp
+++ b/Swift/QtUI/QtXMLConsoleWidget.cpp
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2013 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include "QtXMLConsoleWidget.h"
-#include <Swiften/Base/format.h>
+#include <string>
#include <QCloseEvent>
#include <QTextEdit>
@@ -15,8 +15,9 @@
#include <QScrollBar>
#include <QCheckBox>
-#include "QtSwiftUtil.h"
-#include <string>
+#include <Swiften/Base/format.h>
+
+#include <Swift/QtUI/QtSwiftUtil.h>
namespace Swift {
@@ -78,13 +79,13 @@ void QtXMLConsoleWidget::closeEvent(QCloseEvent* event) {
void QtXMLConsoleWidget::handleDataRead(const SafeByteArray& data) {
boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
- std::string tag = str(format(std::string(QT_TRANSLATE_NOOP("", "<!-- IN %1% -->"))) % std::string(boost::posix_time::to_iso_extended_string(now)));
+ std::string tag = Q2PSTRING(tr("<!-- IN %1 -->").arg(P2QSTRING(boost::posix_time::to_iso_extended_string(now))));
appendTextIfEnabled(tag + "\n" + safeByteArrayToString(data) + "\n", QColor(33,98,33));
}
void QtXMLConsoleWidget::handleDataWritten(const SafeByteArray& data) {
boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
- std::string tag = str(format(std::string(QT_TRANSLATE_NOOP("", "<!-- OUT %1% -->"))) % std::string(boost::posix_time::to_iso_extended_string(now)));
+ std::string tag = Q2PSTRING(tr("<!-- OUT %1 -->").arg(P2QSTRING(boost::posix_time::to_iso_extended_string(now))));
appendTextIfEnabled(tag + "\n" + safeByteArrayToString(data) + "\n", QColor(155,1,0));
}