summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSettingsProvider.cpp')
-rw-r--r--Swift/QtUI/QtSettingsProvider.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSettingsProvider.cpp b/Swift/QtUI/QtSettingsProvider.cpp
index ea0013a..4bddce3 100644
--- a/Swift/QtUI/QtSettingsProvider.cpp
+++ b/Swift/QtUI/QtSettingsProvider.cpp
@@ -60,6 +60,18 @@ void QtSettingsProvider::createProfile(const String& profile) {
settings_.setValue("profileList", stringList);
}
+void QtSettingsProvider::removeProfile(const String& profile) {
+ QString profileStart(P2QSTRING(profile) + ":");
+ foreach (QString key, settings_.allKeys()) {
+ if (key.startsWith(profileStart)) {
+ settings_.remove(key);
+ }
+ }
+ QStringList stringList = settings_.value("profileList").toStringList();
+ stringList.removeAll(P2QSTRING(profile));
+ settings_.setValue("profileList", stringList);
+}
+
QSettings* QtSettingsProvider::getQSettings() {
return &settings_;
}