mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-04 10:44:46 +00:00
Reduce map look-ups
This commit is contained in:
parent
9856de8e90
commit
2650518990
1 changed files with 3 additions and 2 deletions
|
|
@ -136,8 +136,9 @@ void ApplicationListModel::loadApplications()
|
||||||
data.storageId = service->storageId();
|
data.storageId = service->storageId();
|
||||||
data.entryPath = service->exec();
|
data.entryPath = service->exec();
|
||||||
|
|
||||||
if (m_appPositions.contains(service->storageId())) {
|
auto it = m_appPositions.constFind(service->storageId());
|
||||||
orderedList[m_appPositions.value(service->storageId())] = data;
|
if (it != m_appPositions.constEnd()) {
|
||||||
|
orderedList[*it] = data;
|
||||||
} else {
|
} else {
|
||||||
unorderedList << data;
|
unorderedList << data;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue