┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/iconmanager.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <[email protected]>2008-09-06 22:52:30 +0000
committerAlbert Astals Cid <[email protected]>2008-09-06 22:52:30 +0000
commita4274374cb991b52fdf41cc583878a098665659b (patch)
tree69403f1c604d03b3b7dfe68f4d10a86e4c85b0ee /src/iconmanager.cpp
parent5babb62366a2f758de1d6253f8e09485b0d7fa0e (diff)
this code can be called quite a lot so call the non-detaching at() instead of the detaching []
svn path=/trunk/KDE/kdebase/apps/; revision=857914
Diffstat (limited to 'src/iconmanager.cpp')
-rw-r--r--src/iconmanager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp
index 5f9daf49d..ab854d738 100644
--- a/src/iconmanager.cpp
+++ b/src/iconmanager.cpp
@@ -556,7 +556,7 @@ void IconManager::orderItems(KFileItemList& items)
// check whether the item is part of the item list 'items'
int index = -1;
for (int i = 0; i < itemCount; ++i) {
- if (items[i].url() == url) {
+ if (items.at(i).url() == url) {
index = i;
break;
}
@@ -576,7 +576,7 @@ void IconManager::orderItems(KFileItemList& items)
// Algorithm 2: The number of items is <= 10 % of the row count. In this case iterate
// all items and receive the corresponding row from the item.
for (int i = 0; i < itemCount; ++i) {
- const QModelIndex dirIndex = m_dirModel->indexForItem(items[i]); // O(n) (n = number of rows)
+ const QModelIndex dirIndex = m_dirModel->indexForItem(items.at(i)); // O(n) (n = number of rows)
const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex);
const QRect itemRect = m_view->visualRect(proxyIndex);
@@ -584,7 +584,7 @@ void IconManager::orderItems(KFileItemList& items)
// The current item is (at least partly) visible. Move it
// to the front of the list, so that the preview is
// generated earlier.
- items.insert(insertPos, items[i]);
+ items.insert(insertPos, items.at(i));
items.removeAt(i + 1);
++insertPos;
++m_pendingVisiblePreviews;