diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-07-26 18:18:23 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-07-26 18:18:23 (GMT) |
commit | ce74ccc7c8d2ce4c032a90b1ebc0ebd30b4ea4c8 (patch) | |
tree | 9b82bfcfa072546c7c74fee5f05c53ceb5e9edb7 /Swift/QtUI/Roster | |
parent | aeab97f48ee6c260a3e2a21bca7a291ed1af8063 (diff) | |
download | swift-ce74ccc7c8d2ce4c032a90b1ebc0ebd30b4ea4c8.zip swift-ce74ccc7c8d2ce4c032a90b1ebc0ebd30b4ea4c8.tar.bz2 |
Clear down some of the cruft from RosterItem.
Diffstat (limited to 'Swift/QtUI/Roster')
-rw-r--r-- | Swift/QtUI/Roster/QtTreeWidgetItem.cpp | 17 | ||||
-rw-r--r-- | Swift/QtUI/Roster/QtTreeWidgetItem.h | 2 |
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_; }; |