From f437c387a2bb31e4bf79869dfe40a541cda4f6c6 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Sat, 22 Feb 2014 16:34:22 +0000
Subject: Clean up recent patch a little

Change-Id: Ic982cc6d1716c0c4d1ef25555706c66792bd97dd

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));
 }
 
-- 
cgit v0.10.2-6-g49f6