fix: core dumped under Qt 6.4
1. call method metaObject of QMetaType will coredump under Qt 6.4 2. remove `std::terminate()` when AM can't connect to Systemd Signals. 3. call `Subscribe` before connecting to Systemd Signals to guarantee that systemd will send UnitNew and UnitRemoved. Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
@ -317,7 +317,7 @@ bool ApplicationService::addOneInstance(const QString &instanceId, const QString
|
||||
auto *adaptor = new InstanceAdaptor(service);
|
||||
QString objectPath{m_applicationPath.path() + "/" + instanceId};
|
||||
|
||||
if (registerObjectToDBus(service, objectPath, getDBusInterface(QMetaType::fromType<InstanceAdaptor>()))) {
|
||||
if (registerObjectToDBus(service, objectPath, InstanceInterface)) {
|
||||
m_Instances.insert(QDBusObjectPath{objectPath}, QSharedPointer<InstanceService>{service});
|
||||
service->moveToThread(this->thread());
|
||||
adaptor->moveToThread(this->thread());
|
||||
|
Reference in New Issue
Block a user