]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Do not convert a KUrl to a QString and back again
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 28 Jul 2013 21:36:43 +0000 (23:36 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 28 Jul 2013 21:36:43 +0000 (23:36 +0200)
This small change saves a lot of CPU cycles when the items are resorted.

REVIEW: 111700

src/kitemviews/kfileitemmodel.cpp

index d174cf67fd5ab8e72fd86cf35e296c43a9afd024..1b4911deceb6c1614d52592d4e39e11b333d3668 100644 (file)
@@ -702,7 +702,7 @@ void KFileItemModel::resortAllItems()
     QList<int> movedToIndexes;
     movedToIndexes.reserve(itemCount);
     for (int i = 0; i < itemCount; i++) {
-        const int newIndex = m_items.value(oldUrls.at(i).url());
+        const int newIndex = m_items.value(oldUrls.at(i));
         movedToIndexes.append(newIndex);
     }