Quit application if bus is not connected, interface not registered

Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21616
This commit is contained in:
Shubham Jangra 2019-06-08 15:42:32 +05:30
부모 ba48851d34
커밋 6f7cea6b27
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

@ -52,6 +52,12 @@ ActionReply ExternalCommandHelper::init(const QVariantMap& args)
!QDBusConnection::systemBus().registerObject(QStringLiteral("/Helper"), this, QDBusConnection::ExportAllSlots)) {
qWarning() << QDBusConnection::systemBus().lastError().message();
reply.addData(QStringLiteral("success"), false);
// Also end the application loop started by KAuth's main() code. Our loop
// exits when our client disappears. Without client we have no reason to
// live.
qApp->quit();
return reply;
}