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
This commit is contained in:
Frank Reininghaus 2013-07-28 23:36:43 +02:00
parent 32bf4827c4
commit 15107c780c

View 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);
}