summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSettingsProvider.cpp')
-rw-r--r--Swift/QtUI/QtSettingsProvider.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Swift/QtUI/QtSettingsProvider.cpp b/Swift/QtUI/QtSettingsProvider.cpp
index 4bddce3..4a8a868 100644
--- a/Swift/QtUI/QtSettingsProvider.cpp
+++ b/Swift/QtUI/QtSettingsProvider.cpp
@@ -18,35 +18,35 @@ QtSettingsProvider::~QtSettingsProvider() {
}
-String QtSettingsProvider::getStringSetting(const String &settingPath) {
+std::string QtSettingsProvider::getStringSetting(const std::string &settingPath) {
QVariant setting = settings_.value(P2QSTRING(settingPath));
return setting.isNull() ? "" : Q2PSTRING(setting.toString());
}
-void QtSettingsProvider::storeString(const String &settingPath, const String &settingValue) {
+void QtSettingsProvider::storeString(const std::string &settingPath, const std::string &settingValue) {
settings_.setValue(P2QSTRING(settingPath), P2QSTRING(settingValue));
}
-bool QtSettingsProvider::getBoolSetting(const String &settingPath, bool defaultValue) {
+bool QtSettingsProvider::getBoolSetting(const std::string &settingPath, bool defaultValue) {
QVariant setting = settings_.value(P2QSTRING(settingPath));
return setting.isNull() ? defaultValue : setting.toBool();
}
-void QtSettingsProvider::storeBool(const String &settingPath, bool settingValue) {
+void QtSettingsProvider::storeBool(const std::string &settingPath, bool settingValue) {
settings_.setValue(P2QSTRING(settingPath), settingValue);
}
-int QtSettingsProvider::getIntSetting(const String &settingPath, int defaultValue) {
+int QtSettingsProvider::getIntSetting(const std::string &settingPath, int defaultValue) {
QVariant setting = settings_.value(P2QSTRING(settingPath));
return setting.isNull() ? defaultValue : setting.toInt();
}
-void QtSettingsProvider::storeInt(const String &settingPath, int settingValue) {
+void QtSettingsProvider::storeInt(const std::string &settingPath, int settingValue) {
settings_.setValue(P2QSTRING(settingPath), settingValue);
}
-std::vector<String> QtSettingsProvider::getAvailableProfiles() {
- std::vector<String> profiles;
+std::vector<std::string> QtSettingsProvider::getAvailableProfiles() {
+ std::vector<std::string> profiles;
QVariant profilesVariant = settings_.value("profileList");
foreach(QString profileQString, profilesVariant.toStringList()) {
profiles.push_back(Q2PSTRING(profileQString));
@@ -54,13 +54,13 @@ std::vector<String> QtSettingsProvider::getAvailableProfiles() {
return profiles;
}
-void QtSettingsProvider::createProfile(const String& profile) {
+void QtSettingsProvider::createProfile(const std::string& profile) {
QStringList stringList = settings_.value("profileList").toStringList();
stringList.append(P2QSTRING(profile));
settings_.setValue("profileList", stringList);
}
-void QtSettingsProvider::removeProfile(const String& profile) {
+void QtSettingsProvider::removeProfile(const std::string& profile) {
QString profileStart(P2QSTRING(profile) + ":");
foreach (QString key, settings_.allKeys()) {
if (key.startsWith(profileStart)) {