Changeset 846 for trunk/src/gui/itemviews/qabstractproxymodel.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/itemviews/qabstractproxymodel.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 188 188 QModelIndexList proxyIndexes = proxySelection.indexes(); 189 189 QItemSelection sourceSelection; 190 for (int i = 0; i < proxyIndexes.size(); ++i) 191 sourceSelection << QItemSelectionRange(mapToSource(proxyIndexes.at(i))); 190 for (int i = 0; i < proxyIndexes.size(); ++i) { 191 const QModelIndex proxyIdx = mapToSource(proxyIndexes.at(i)); 192 if (!proxyIdx.isValid()) 193 continue; 194 sourceSelection << QItemSelectionRange(proxyIdx); 195 } 192 196 return sourceSelection; 193 197 } … … 202 206 QModelIndexList sourceIndexes = sourceSelection.indexes(); 203 207 QItemSelection proxySelection; 204 for (int i = 0; i < sourceIndexes.size(); ++i) 205 proxySelection << QItemSelectionRange(mapFromSource(sourceIndexes.at(i))); 208 for (int i = 0; i < sourceIndexes.size(); ++i) { 209 const QModelIndex srcIdx = mapFromSource(sourceIndexes.at(i)); 210 if (!srcIdx.isValid()) 211 continue; 212 proxySelection << QItemSelectionRange(srcIdx); 213 } 206 214 return proxySelection; 207 215 }
Note:
See TracChangeset
for help on using the changeset viewer.