UpdateInfo: Do not show multiple update notfications

Remove existing notification before showing a new one.
Otherwise checking for updates multiple times results in multiple
stacked notifications.

Change-Id: I1af07c005e88b297fbaebec7f5358fa46c09a84c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-12-17 11:07:23 +01:00
parent 141d5e2412
commit 17f47d6fa4

View File

@@ -207,6 +207,7 @@ void UpdateInfoPlugin::checkForUpdatesFinished()
label->setContentsMargins(0, 0, 0, 8);
return label;
});
Core::ICore::infoBar()->removeInfo(InstallUpdates); // remove any existing notifications
Core::ICore::infoBar()->unsuppressInfo(InstallUpdates);
Core::ICore::infoBar()->addInfo(info);
} else {