Changeset View
Changeset View
Standalone View
Standalone View
src/util/externalcommandhelper.cpp
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>.* | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>.* | ||
16 | *************************************************************************/ | 16 | *************************************************************************/ | ||
17 | 17 | | |||
18 | #include "externalcommandhelper.h" | 18 | #include "externalcommandhelper.h" | ||
19 | #include "externalcommand_whitelist.h" | 19 | #include "externalcommand_whitelist.h" | ||
20 | 20 | | |||
21 | #include <QtDBus> | 21 | #include <QtDBus> | ||
22 | #include <QCoreApplication> | ||||
22 | #include <QDebug> | 23 | #include <QDebug> | ||
23 | #include <QFile> | 24 | #include <QFile> | ||
24 | #include <QString> | 25 | #include <QString> | ||
25 | #include <QTime> | 26 | #include <QTime> | ||
26 | #include <QVariant> | 27 | #include <QVariant> | ||
27 | 28 | | |||
28 | #include <KLocalizedString> | 29 | #include <KLocalizedString> | ||
29 | 30 | | |||
Show All 36 Lines | 46 | { | |||
66 | connect(serviceWatcher, &QDBusServiceWatcher::serviceUnregistered, | 67 | connect(serviceWatcher, &QDBusServiceWatcher::serviceUnregistered, | ||
67 | [this]() { | 68 | [this]() { | ||
68 | m_loop->exit(); | 69 | m_loop->exit(); | ||
69 | }); | 70 | }); | ||
70 | 71 | | |||
71 | m_loop->exec(); | 72 | m_loop->exec(); | ||
72 | reply.addData(QStringLiteral("success"), true); | 73 | reply.addData(QStringLiteral("success"), true); | ||
73 | 74 | | |||
75 | // Also end the application loop started by KAuth's main() code. Our loop | ||||
76 | // exits when our client disappears. Without client we have no reason to | ||||
77 | // live. | ||||
78 | qApp->quit(); | ||||
79 | | ||||
74 | return reply; | 80 | return reply; | ||
75 | } | 81 | } | ||
76 | 82 | | |||
77 | /** Reads the given number of bytes from the sourceDevice into the given buffer. | 83 | /** Reads the given number of bytes from the sourceDevice into the given buffer. | ||
78 | @param sourceDevice device or file to read from | 84 | @param sourceDevice device or file to read from | ||
79 | @param buffer buffer to store the bytes read in | 85 | @param buffer buffer to store the bytes read in | ||
80 | @param offset offset where to begin reading | 86 | @param offset offset where to begin reading | ||
81 | @param size the number of bytes to read | 87 | @param size the number of bytes to read | ||
▲ Show 20 Lines • Show All 214 Lines • Show Last 20 Lines |