feat: connect to system bus signal for monitor application changed
for dpkg Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
parent
f3381a4387
commit
cc4c928dc1
@ -49,6 +49,16 @@ ApplicationManager1Service::ApplicationManager1Service(std::unique_ptr<Identifie
|
|||||||
this,
|
this,
|
||||||
&ApplicationManager1Service::removeInstanceFromApplication);
|
&ApplicationManager1Service::removeInstanceFromApplication);
|
||||||
|
|
||||||
|
auto sysBus = QDBusConnection::systemBus();
|
||||||
|
if (!sysBus.connect("org.desktopspec.ApplicationUpdateNotifier1",
|
||||||
|
"/org/desktopspec/ApplicationUpdateNotifier1",
|
||||||
|
"org.desktopspec.ApplicationUpdateNotifier1",
|
||||||
|
"ApplicationUpdated",
|
||||||
|
this,
|
||||||
|
SLOT(ReloadApplications()))) {
|
||||||
|
qFatal("connect to ApplicationUpdated failed.");
|
||||||
|
}
|
||||||
|
|
||||||
scanApplications();
|
scanApplications();
|
||||||
|
|
||||||
scanInstances();
|
scanInstances();
|
||||||
|
Loading…
Reference in New Issue
Block a user