diff options
| author | Kevin Smith <git@kismith.co.uk> | 2011-04-27 20:42:11 (GMT) | 
|---|---|---|
| committer | Kevin Smith <git@kismith.co.uk> | 2011-04-27 20:58:17 (GMT) | 
| commit | f48dbee2fb5acf7c0abc9d7897d736233b1f0d2f (patch) | |
| tree | 512879020dc60ecb0b0b5e70219bf588c5a2f5af /Swift/QtUI/ChatList/ChatListGroupItem.h | |
| parent | 73c97d9222040b6160321a32e55a5a3913923e5e (diff) | |
| download | swift-contrib-f48dbee2fb5acf7c0abc9d7897d736233b1f0d2f.zip swift-contrib-f48dbee2fb5acf7c0abc9d7897d736233b1f0d2f.tar.bz2  | |
Start on recent chats list
Diffstat (limited to 'Swift/QtUI/ChatList/ChatListGroupItem.h')
| -rw-r--r-- | Swift/QtUI/ChatList/ChatListGroupItem.h | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/QtUI/ChatList/ChatListGroupItem.h b/Swift/QtUI/ChatList/ChatListGroupItem.h index cc4d4af..2fb2284 100644 --- a/Swift/QtUI/ChatList/ChatListGroupItem.h +++ b/Swift/QtUI/ChatList/ChatListGroupItem.h @@ -13,8 +13,8 @@  namespace Swift {  	class ChatListGroupItem : public ChatListItem {  		public: -			ChatListGroupItem(const QString& name, ChatListGroupItem* parent) : ChatListItem(parent), name_(name) {}; -			void addItem(ChatListItem* item) {items_.push_back(item); qStableSort(items_.begin(), items_.end(), pointerItemLessThan);}; +			ChatListGroupItem(const QString& name, ChatListGroupItem* parent, bool sorted = true) : ChatListItem(parent), name_(name), sorted_(sorted) {}; +			void addItem(ChatListItem* item) {items_.push_back(item); if (sorted_) {qStableSort(items_.begin(), items_.end(), pointerItemLessThan);}};  			void remove(int index) {items_.removeAt(index);};  			int rowCount() {return items_.size();};  			ChatListItem* item(int i) {return items_[i];}; @@ -30,5 +30,6 @@ namespace Swift {  			QString name_;  			QList<ChatListItem*> items_; +			bool sorted_;  	};  }  | 
 Swift