From bf2618d7cfb0bdadf28658a75654d4b7976c9924 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sun, 28 Jul 2013 23:36:43 +0200 Subject: [PATCH] Do not convert a KUrl to a QString and back again This small change saves a lot of CPU cycles when the items are resorted. REVIEW: 111700 --- dolphin/src/kitemviews/kfileitemmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphin/src/kitemviews/kfileitemmodel.cpp b/dolphin/src/kitemviews/kfileitemmodel.cpp index d174cf67fd..1b4911dece 100644 --- a/dolphin/src/kitemviews/kfileitemmodel.cpp +++ b/dolphin/src/kitemviews/kfileitemmodel.cpp @@ -702,7 +702,7 @@ void KFileItemModel::resortAllItems() QList 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); }