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 6b1b075f6f
commit bf2618d7cf

View file

@ -702,7 +702,7 @@ void KFileItemModel::resortAllItems()
QList<int> movedToIndexes; QList<int> movedToIndexes;
movedToIndexes.reserve(itemCount); movedToIndexes.reserve(itemCount);
for (int i = 0; i < itemCount; i++) { 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); movedToIndexes.append(newIndex);
} }