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:
parent
ba48851d34
commit
6f7cea6b27
|
@ -52,6 +52,12 @@ ActionReply ExternalCommandHelper::init(const QVariantMap& args)
|
||||||
!QDBusConnection::systemBus().registerObject(QStringLiteral("/Helper"), this, QDBusConnection::ExportAllSlots)) {
|
!QDBusConnection::systemBus().registerObject(QStringLiteral("/Helper"), this, QDBusConnection::ExportAllSlots)) {
|
||||||
qWarning() << QDBusConnection::systemBus().lastError().message();
|
qWarning() << QDBusConnection::systemBus().lastError().message();
|
||||||
reply.addData(QStringLiteral("success"), false);
|
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;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue