summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtSwift.cpp3
-rw-r--r--Swift/QtUI/QtSwiftUtil.h5
2 files changed, 4 insertions, 4 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index d4c306f..bb40da8 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -8,6 +8,7 @@
#include <string>
#include <QSplitter>
+#include <QTextCodec>
#include <boost/bind.hpp>
#include "QtLoginWindow.h"
@@ -71,6 +72,8 @@ po::options_description QtSwift::getOptionsDescription() {
QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMainThreadCaller_), autoUpdater_(NULL) {
+ QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+
if (options.count("netbook-mode")) {
splitter_ = new QSplitter();
} else {
diff --git a/Swift/QtUI/QtSwiftUtil.h b/Swift/QtUI/QtSwiftUtil.h
index 60a9f18..2d0f970 100644
--- a/Swift/QtUI/QtSwiftUtil.h
+++ b/Swift/QtUI/QtSwiftUtil.h
@@ -4,12 +4,9 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFT_QtSwiftUtil_H
-#define SWIFT_QtSwiftUtil_H
+#pragma once
#define P2QSTRING(a) QString::fromUtf8(a.c_str())
#define Q2PSTRING(a) std::string(a.toUtf8())
#define B2QDATE(a) QDateTime::fromTime_t((a - boost::posix_time::from_time_t(0)).total_seconds())
-
-#endif