mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +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.entryPath = service->exec();
|
||||
|
||||
if (m_appPositions.contains(service->storageId())) {
|
||||
orderedList[m_appPositions.value(service->storageId())] = data;
|
||||
auto it = m_appPositions.constFind(service->storageId());
|
||||
if (it != m_appPositions.constEnd()) {
|
||||
orderedList[*it] = data;
|
||||
} else {
|
||||
unorderedList << data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue