@@ -249,15 +249,16 @@ void LauncherModel::refresh()
251 if (itemIndex == -1) {
251 if (itemIndex == -1) {
252+ QMap<QString, QVariant> chachedMap = entry.toMap();
252 // Need to add it. Just add it into the addedIndex to keep same ordering as the list in AS.
253 // Need to add it. Just add it into the addedIndex to keep same ordering as the list in AS.
253− LauncherItem *item = new LauncherItem(entry.toMap().value("id").toString(),
254+ LauncherItem *item = new LauncherItem(chachedMap.value("id").toString(),
254− entry.toMap().value("name").toString(),
255+ chachedMap.value("name").toString(),
255− entry.toMap().value("icon").toString(),
256+ chachedMap.value("icon").toString(),
257 item->setPinned(true);
258 item->setPinned(true);
258− item->setCount(entry.toMap().value("count").toInt());
259+ item->setCount(chachedMap.value("count").toInt());
259− item->setCountVisible(entry.toMap().value("countVisible").toBool());
260+ item->setCountVisible(chachedMap.value("countVisible").toBool());
260− item->setProgress(entry.toMap().value("progress").toInt());
261+ item->setProgress(chachedMap.value("progress").toInt());
261 beginInsertRows(QModelIndex(), newPosition, newPosition);
262 beginInsertRows(QModelIndex(), newPosition, newPosition);
262 m_list.insert(newPosition, item);
263 m_list.insert(newPosition, item);
263 endInsertRows();
264 endInsertRows();