summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 18:57:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:32 (GMT)
commitcb05f5a908e20006c954ce38755c2e422ecc2388 (patch)
treea793551a5fe279a57d4330119560e8542f745484 /Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp')
-rw-r--r--Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp b/Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp
index 64baac9..c1045ee 100644
--- a/Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp
+++ b/Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp
@@ -9,6 +9,7 @@
#include <boost/bind.hpp>
#include <vector>
+#include "Swiften/Base/String.h"
#include "Swift/Controllers/Roster/GroupRosterItem.h"
namespace Swift {
@@ -29,7 +30,7 @@ void RosterGroupExpandinessPersister::handleGroupAdded(GroupRosterItem* group) {
void RosterGroupExpandinessPersister::handleExpandedChanged(GroupRosterItem* group, bool expanded) {
if (expanded) {
- String displayName = group->getDisplayName();
+ std::string displayName = group->getDisplayName();
//collapsed_.erase(std::remove(collapsed_.begin(), collapsed_.end(), displayName), collapsed_.end());
collapsed_.erase(displayName);
} else {
@@ -39,9 +40,9 @@ void RosterGroupExpandinessPersister::handleExpandedChanged(GroupRosterItem* gro
}
void RosterGroupExpandinessPersister::save() {
- String setting;
- foreach (const String& group, collapsed_) {
- if (!setting.isEmpty()) {
+ std::string setting;
+ foreach (const std::string& group, collapsed_) {
+ if (!setting.empty()) {
setting += "\n";
}
setting += group;
@@ -50,11 +51,11 @@ void RosterGroupExpandinessPersister::save() {
}
void RosterGroupExpandinessPersister::load() {
- String saved = settings_->getStringSetting(SettingPath);
- std::vector<String> collapsed = saved.split('\n');
+ std::string saved = settings_->getStringSetting(SettingPath);
+ std::vector<std::string> collapsed = String::split(saved, '\n');
collapsed_.insert(collapsed.begin(), collapsed.end());
}
-const String RosterGroupExpandinessPersister::SettingPath = "GroupExpandiness";
+const std::string RosterGroupExpandinessPersister::SettingPath = "GroupExpandiness";
}