example: add launch application example

fix some bug while testing the example

Signed-off-by: ComixHe <heyuming@deepin.org>
Signed-off-by: black-desk <me@black-desk.cn>
This commit is contained in:
ComixHe
2023-08-11 10:12:46 +08:00
committed by Comix
parent 8a74802c84
commit bc2bdf559e
11 changed files with 144 additions and 22 deletions

View File

@ -37,9 +37,9 @@ public:
if (!application) {
return false;
}
if (!registerObjectToDBus(new ApplicationAdaptor{application.data()},
application->m_applicationPath.path(),
getDBusInterface<ApplicationAdaptor>())) {
auto *ptr = application.data();
new ApplicationAdaptor{ptr};
if (!registerObjectToDBus(ptr, application->m_applicationPath.path(), getDBusInterface<ApplicationAdaptor>())) {
return false;
}
m_applicationList.insert(application->m_applicationPath, application);