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/RosterItem.cpp
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swift/Controllers/Roster/RosterItem.cpp')
-rw-r--r--Swift/Controllers/Roster/RosterItem.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Swift/Controllers/Roster/RosterItem.cpp b/Swift/Controllers/Roster/RosterItem.cpp
index 61c5aea..3f130bb 100644
--- a/Swift/Controllers/Roster/RosterItem.cpp
+++ b/Swift/Controllers/Roster/RosterItem.cpp
@@ -6,11 +6,13 @@
#include "Swift/Controllers/Roster/RosterItem.h"
+#include <boost/algorithm/string.hpp>
+
#include "Swift/Controllers/Roster/GroupRosterItem.h"
namespace Swift {
-RosterItem::RosterItem(const String& name, GroupRosterItem* parent) : name_(name), sortableDisplayName_(name_.getLowerCase()), parent_(parent) {
+RosterItem::RosterItem(const std::string& name, GroupRosterItem* parent) : name_(name), sortableDisplayName_(boost::to_lower_copy(name_)), parent_(parent) {
/* The following would be good, but because of C++'s inheritance not working in constructors, it's not going to work. */
//if (parent) {
// parent_->addChild(this);
@@ -25,17 +27,17 @@ GroupRosterItem* RosterItem::getParent() const {
return parent_;
}
-void RosterItem::setDisplayName(const String& name) {
+void RosterItem::setDisplayName(const std::string& name) {
name_ = name;
- sortableDisplayName_ = name_.getLowerCase();
+ sortableDisplayName_ = boost::to_lower_copy(name_);
onDataChanged();
}
-String RosterItem::getDisplayName() const {
+std::string RosterItem::getDisplayName() const {
return name_;
}
-String RosterItem::getSortableDisplayName() const {
+std::string RosterItem::getSortableDisplayName() const {
return sortableDisplayName_;
}