diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-22 21:48:52 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-22 21:48:52 +1000 |
| commit | 1991b4176c302ac30ea3a1539d139eaee574b0a5 (patch) | |
| tree | b833c3f6f776efc0196816a1f93d4b452909ac2d /plugin/src/Caelestia/appdb.cpp | |
| parent | plugin/fsm: dont store comparator (diff) | |
| download | caelestia-shell-1991b4176c302ac30ea3a1539d139eaee574b0a5.tar.gz caelestia-shell-1991b4176c302ac30ea3a1539d139eaee574b0a5.tar.bz2 caelestia-shell-1991b4176c302ac30ea3a1539d139eaee574b0a5.zip | |
plugin: delete entries after emitting signal
Diffstat (limited to '')
| -rw-r--r-- | plugin/src/Caelestia/appdb.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/src/Caelestia/appdb.cpp b/plugin/src/Caelestia/appdb.cpp index 74d1873..19db096 100644 --- a/plugin/src/Caelestia/appdb.cpp +++ b/plugin/src/Caelestia/appdb.cpp @@ -207,15 +207,17 @@ void AppDb::updateApps() { newIds.insert(entry->property("id").toString()); } + QList<AppEntry*> toDelete; for (auto id : m_apps.keys()) { if (!newIds.contains(id)) { dirty = true; - m_apps.take(id)->deleteLater(); + toDelete << m_apps.take(id); } } if (dirty) { emit appsChanged(); + qDeleteAll(toDelete); } } |