diff --git a/applets/kicker/plugin/favoritesmodel.cpp b/applets/kicker/plugin/favoritesmodel.cpp --- a/applets/kicker/plugin/favoritesmodel.cpp +++ b/applets/kicker/plugin/favoritesmodel.cpp @@ -277,6 +277,17 @@ void FavoritesModel::refresh() { + // Bug 374156: When RootModel completes, it calls this method, we would + // happily update ourselves and announce "favoritesChanged", at which point + // the QML part would store the "new" favorites to settings. + // Unfortunately, by the time this happens, Component.onCompleted of + // the RootModel has not yet fired, so we haven't yet set m_favorites to + // the ones in the config, having us nuke the config every time. + // To avoid this, avoid doing anything if both entryList and m_favorites is empty. + if (m_entryList.isEmpty() && m_favorites.isEmpty()) { + return; + } + beginResetModel(); setDropPlaceholderIndex(-1);