diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-10 10:54:53 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-10 10:55:33 (GMT) |
commit | 8179a9e2cd52b24c70b194106dd170ed1bb677e4 (patch) | |
tree | 7284c59d7a89ab54612a4bc098a8929050c3e184 /src/gui/itemviews/qstandarditemmodel.cpp | |
parent | f2c4d2fe8a846cfce457512ef1806a7276745590 (diff) | |
download | Qt-8179a9e2cd52b24c70b194106dd170ed1bb677e4.zip Qt-8179a9e2cd52b24c70b194106dd170ed1bb677e4.tar.gz Qt-8179a9e2cd52b24c70b194106dd170ed1bb677e4.tar.bz2 |
small code cleanup that improves some loops
it uses les foreach
Diffstat (limited to 'src/gui/itemviews/qstandarditemmodel.cpp')
-rw-r--r-- | src/gui/itemviews/qstandarditemmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/itemviews/qstandarditemmodel.cpp b/src/gui/itemviews/qstandarditemmodel.cpp index d8adbd2..9d0f796 100644 --- a/src/gui/itemviews/qstandarditemmodel.cpp +++ b/src/gui/itemviews/qstandarditemmodel.cpp @@ -2907,8 +2907,8 @@ QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const QStack<QStandardItem*> stack; itemsSet.reserve(indexes.count()); stack.reserve(indexes.count()); - foreach (const QModelIndex &index, indexes) { - QStandardItem *item = itemFromIndex(index); + for (int i = 0; i < indexes.count(); ++i) { + QStandardItem *item = itemFromIndex(indexes.at(i)); itemsSet << item; stack.push(item); } |