feat: add test for desktopentry and jobmanager

Log:
This commit is contained in:
heyuming
2023-07-19 17:56:45 +08:00
committed by black-desk
parent d288752fb3
commit 5fed3ed9f0
19 changed files with 451 additions and 92 deletions

View File

@ -3,6 +3,7 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#include "applicationservice.h"
#include "applicationadaptor.h"
#include "instanceadaptor.h"
#include <QUuid>
@ -27,7 +28,7 @@ QDBusObjectPath ApplicationService::Launch(const QString &action, const QStringL
QString objectPath{m_applicationPath.path() + "/" + QUuid::createUuid().toString()};
QSharedPointer<InstanceService> ins{new InstanceService{objectPath, ""}};
auto *ptr = ins.data();
if (registerObjectToDbus<decltype(ptr), InstanceAdaptor>(ptr, objectPath, getDBusInterface<InstanceAdaptor>())) {
if (registerObjectToDbus(new InstanceAdaptor(ptr), objectPath, getDBusInterface<InstanceAdaptor>())) {
m_Instances.insert(QDBusObjectPath{objectPath}, ins);
return QDBusObjectPath{objectPath};
}