mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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:
parent
6b1b075f6f
commit
bf2618d7cf
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue