Changeset View
Changeset View
Standalone View
Standalone View
src/util/externalcommandhelper.cpp
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 46 | { | |||
---|---|---|---|---|---|
47 | Q_UNUSED(args) | 47 | Q_UNUSED(args) | ||
48 | 48 | | |||
49 | ActionReply reply; | 49 | ActionReply reply; | ||
50 | 50 | | |||
51 | if (!QDBusConnection::systemBus().isConnected() || !QDBusConnection::systemBus().registerService(QStringLiteral("org.kde.kpmcore.helperinterface")) || | 51 | if (!QDBusConnection::systemBus().isConnected() || !QDBusConnection::systemBus().registerService(QStringLiteral("org.kde.kpmcore.helperinterface")) || | ||
52 | !QDBusConnection::systemBus().registerObject(QStringLiteral("/Helper"), this, QDBusConnection::ExportAllSlots)) { | 52 | !QDBusConnection::systemBus().registerObject(QStringLiteral("/Helper"), this, QDBusConnection::ExportAllSlots)) { | ||
53 | qWarning() << QDBusConnection::systemBus().lastError().message(); | 53 | qWarning() << QDBusConnection::systemBus().lastError().message(); | ||
54 | reply.addData(QStringLiteral("success"), false); | 54 | reply.addData(QStringLiteral("success"), false); | ||
55 | | ||||
56 | // Also end the application loop started by KAuth's main() code. Our loop | ||||
57 | // exits when our client disappears. Without client we have no reason to | ||||
58 | // live. | ||||
59 | qApp->quit(); | ||||
60 | | ||||
55 | return reply; | 61 | return reply; | ||
56 | } | 62 | } | ||
57 | 63 | | |||
58 | m_loop = std::make_unique<QEventLoop>(); | 64 | m_loop = std::make_unique<QEventLoop>(); | ||
59 | HelperSupport::progressStep(QVariantMap()); | 65 | HelperSupport::progressStep(QVariantMap()); | ||
60 | 66 | | |||
61 | // End the loop and return only once the client is done using us. | 67 | // End the loop and return only once the client is done using us. | ||
62 | auto serviceWatcher = | 68 | auto serviceWatcher = | ||
▲ Show 20 Lines • Show All 240 Lines • Show Last 20 Lines |