summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Roster')
-rw-r--r--Swift/QtUI/Roster/QtTreeWidgetItem.cpp17
-rw-r--r--Swift/QtUI/Roster/QtTreeWidgetItem.h2
2 files changed, 5 insertions, 14 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidgetItem.cpp b/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
index 4ac2164..6ebeb7f 100644
--- a/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
+++ b/Swift/QtUI/Roster/QtTreeWidgetItem.cpp
@@ -10,7 +10,7 @@ QtTreeWidgetItem::QtTreeWidgetItem(QtTreeWidgetItem* parentItem) : QObject() {
}
void QtTreeWidgetItem::setText(const String& text) {
- setName(P2QSTRING(text));
+ displayName_ = P2QSTRING(text);
}
void QtTreeWidgetItem::setTextColor(unsigned long color) {
@@ -68,7 +68,7 @@ void QtTreeWidgetItem::addChild(QtTreeWidgetItem* child) {
}
int QtTreeWidgetItem::rowCount() {
- qDebug() << "Returning size of " << children_.size() << " for item " << name_;
+ qDebug() << "Returning size of " << children_.size() << " for item " << displayName_;
return children_.size();
}
@@ -81,7 +81,7 @@ int QtTreeWidgetItem::row() {
}
QtTreeWidgetItem* QtTreeWidgetItem::getItem(int row) {
- qDebug() << "Returning row " << row << " from item " << name_;
+ qDebug() << "Returning row " << row << " from item " << displayName_;
return children_[row];
}
@@ -89,14 +89,7 @@ QVariant QtTreeWidgetItem::data(int role) {
if (role != Qt::DisplayRole) {
return QVariant();
}
- qDebug() << "Returning name " << name_ << " for role " << role;
- return name_;
+ qDebug() << "Returning name " << displayName_ << " for role " << role;
+ return displayName_;
}
-
-void QtTreeWidgetItem::setName(QString name) {
- name_ = name;
- qDebug() << "Name changed to " << name;
- changed();
-}
-
} \ No newline at end of file
diff --git a/Swift/QtUI/Roster/QtTreeWidgetItem.h b/Swift/QtUI/Roster/QtTreeWidgetItem.h
index 202c44a..daffcc2 100644
--- a/Swift/QtUI/Roster/QtTreeWidgetItem.h
+++ b/Swift/QtUI/Roster/QtTreeWidgetItem.h
@@ -26,7 +26,6 @@ class QtTreeWidgetItem : public QObject, public TreeWidgetItem {
int row();
QtTreeWidgetItem* getItem(int row);
QVariant data(int role);
- void setName(QString name);
QtTreeWidgetItem(QtTreeWidgetItem* parentItem);
void setText(const String& text);
void setTextColor(unsigned long color);
@@ -43,7 +42,6 @@ class QtTreeWidgetItem : public QObject, public TreeWidgetItem {
private:
QList<QtTreeWidgetItem*> children_;
QtTreeWidgetItem* parent_;
- QString name_;
QString displayName_;
};