Browse Source

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
master
Shubham Jangra 11 months ago
parent
commit
6f7cea6b27
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/util/externalcommandhelper.cpp

+ 6
- 0
src/util/externalcommandhelper.cpp View File

@@ -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;
}


Loading…
Cancel
Save