From 7a888846753b7f5059b4bc5f872dac45a92318a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Tue, 15 Feb 2011 21:06:54 +0100
Subject: Removed some uses of P2QSTRING and Q2PSTRING.


diff --git a/Swift/QtUI/QtSettingsProvider.cpp b/Swift/QtUI/QtSettingsProvider.cpp
index 4a8a868..e8479a4 100644
--- a/Swift/QtUI/QtSettingsProvider.cpp
+++ b/Swift/QtUI/QtSettingsProvider.cpp
@@ -5,7 +5,6 @@
  */
 
 #include "QtSettingsProvider.h"
-#include "QtSwiftUtil.h"
 
 #include <QStringList>
 
@@ -19,30 +18,30 @@ QtSettingsProvider::~QtSettingsProvider() {
 }
 
 std::string QtSettingsProvider::getStringSetting(const std::string &settingPath) {
-	QVariant setting = settings_.value(P2QSTRING(settingPath));
-	return setting.isNull() ? "" : Q2PSTRING(setting.toString());
+	QVariant setting = settings_.value(settingPath.c_str());
+	return setting.isNull() ? "" : std::string(setting.toString().toUtf8());
 }
 
 void QtSettingsProvider::storeString(const std::string &settingPath, const std::string &settingValue) {
-	settings_.setValue(P2QSTRING(settingPath), P2QSTRING(settingValue));
+	settings_.setValue(settingPath.c_str(), settingValue.c_str());
 }
 
 bool QtSettingsProvider::getBoolSetting(const std::string &settingPath, bool defaultValue) {
-	QVariant setting = settings_.value(P2QSTRING(settingPath));
+	QVariant setting = settings_.value(settingPath.c_str());
 	return setting.isNull() ? defaultValue : setting.toBool();
 }
 
 void QtSettingsProvider::storeBool(const std::string &settingPath, bool settingValue) {
-	settings_.setValue(P2QSTRING(settingPath), settingValue);
+	settings_.setValue(settingPath.c_str(), settingValue);
 }
 
 int QtSettingsProvider::getIntSetting(const std::string &settingPath, int defaultValue) {
-	QVariant setting = settings_.value(P2QSTRING(settingPath));
+	QVariant setting = settings_.value(settingPath.c_str());
 	return setting.isNull() ? defaultValue : setting.toInt();
 }
 
 void QtSettingsProvider::storeInt(const std::string &settingPath, int settingValue) {
-	settings_.setValue(P2QSTRING(settingPath), settingValue);
+	settings_.setValue(settingPath.c_str(), settingValue);
 }
 
 std::vector<std::string> QtSettingsProvider::getAvailableProfiles() {
@@ -56,19 +55,19 @@ std::vector<std::string> QtSettingsProvider::getAvailableProfiles() {
 
 void QtSettingsProvider::createProfile(const std::string& profile) {
 	QStringList stringList = settings_.value("profileList").toStringList();
-	stringList.append(P2QSTRING(profile));
+	stringList.append(profile.c_str());
 	settings_.setValue("profileList", stringList);
 }
 
 void QtSettingsProvider::removeProfile(const std::string& profile) {
-	QString profileStart(P2QSTRING(profile) + ":");
+	QString profileStart(QString(profile.c_str()) + ":");
 	foreach (QString key, settings_.allKeys()) {
 		if (key.startsWith(profileStart)) {
 			settings_.remove(key);
 		}
 	}
 	QStringList stringList = settings_.value("profileList").toStringList();
-	stringList.removeAll(P2QSTRING(profile));
+	stringList.removeAll(profile.c_str());
 	settings_.setValue("profileList", stringList);
 }
 
-- 
cgit v0.10.2-6-g49f6