Commit 26505189 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Reduce map look-ups

parent 9856de8e
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment