diff --git a/src/util/externalcommand.cpp b/src/util/externalcommand.cpp index 5ed64c1..0568bb6 100644 --- a/src/util/externalcommand.cpp +++ b/src/util/externalcommand.cpp @@ -119,12 +119,13 @@ void ExternalCommand::setup() */ bool ExternalCommand::start(int timeout) { + Q_UNUSED(timeout) + if (command().isEmpty()) return false; if (!QDBusConnection::systemBus().isConnected()) { qWarning() << QDBusConnection::systemBus().lastError().message(); - QTimer::singleShot(timeout, this, &ExternalCommand::quit); return false; } @@ -167,8 +168,6 @@ bool ExternalCommand::start(int timeout) connect(watcher, &QDBusPendingCallWatcher::finished, exitLoop); loop.exec(); - QTimer::singleShot(timeout, this, &ExternalCommand::quit); - return rval; } @@ -340,12 +339,6 @@ void ExternalCommand::setExitCode(int i) d->m_ExitCode = i; } -/**< Dummy function for QTimer when needed. */ -void ExternalCommand::quit() -{ - -} - bool ExternalCommand::startHelper() { if (!QDBusConnection::systemBus().isConnected()) { diff --git a/src/util/externalcommand.h b/src/util/externalcommand.h index c36c42e..be56818 100644 --- a/src/util/externalcommand.h +++ b/src/util/externalcommand.h @@ -104,9 +104,6 @@ public: void emitReport(const QVariantMap& report) { emit reportSignal(report); } - /**< Dummy function for QTimer when needed. */ - void quit(); - // KAuth /**< start ExternalCommand Helper */ bool startHelper();