Changeset 6129 for trunk/qt4-gui/src/views
- Timestamp:
- 04/05/08 20:08:59 (8 months ago)
- Files:
-
- 1 modified
-
trunk/qt4-gui/src/views/userview.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/views/userview.cpp
r6128 r6129 143 143 void UserView::setGroupSpanning() 144 144 { 145 int rows = model()->rowCount(rootIndex()); 146 147 if (rootIndex().isValid()) 145 QModelIndex root = rootIndex(); 146 int rows = model()->rowCount(root); 147 148 if (root.isValid()) 148 149 { 149 150 // Single group (non-threaded) view - bars are sorted with contacts 150 151 for (int i = 0; i < rows; ++i) 151 if (model()->data(model()->index(i, 0, rootIndex()), ContactListModel::ItemTypeRole).toUInt() == ContactListModel::BarItem) 152 setFirstColumnSpanned(i, rootIndex(), true); 152 if (model()->data(model()->index(i, 0, root), ContactListModel::ItemTypeRole).toUInt() == 153 ContactListModel::BarItem) 154 setFirstColumnSpanned(i, root, true); 153 155 } 154 156 else … … 156 158 // Full tree (threaded) view - all top level items are groups 157 159 for (int i = 0; i < rows; ++i) 158 setFirstColumnSpanned(i, root Index(), true);160 setFirstColumnSpanned(i, root, true); 159 161 } 160 162 }
