From: Frank Reininghaus Date: Sun, 28 Jul 2013 21:36:43 +0000 (+0200) Subject: Do not convert a KUrl to a QString and back again X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/15107c780ccc84d4c7bb33e674b519d692348746 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 --- diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index d174cf67f..1b4911dec 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/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); }