From 76ca72eccd794d0c6d6c903938fcf40b628cb7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 26 Sep 2019 23:47:34 +0100 Subject: [PATCH] Revert "Create a timer to wait for system to free resources" This reverts commit 2627d476f4a7d1ca6561abbd4bc9f671fec63523. --- src/util/externalcommand.cpp | 11 ++--------- src/util/externalcommand.h | 3 --- 2 files changed, 2 insertions(+), 12 deletions(-) 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();