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
Bu işleme şunda yer alıyor:
Shubham Jangra 2019-06-08 15:42:32 +05:30
ebeveyn ba48851d34
işleme 6f7cea6b27
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme

Dosyayı Görüntüle

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