From 5751cdf8e0eece1b67180768d901b4c731435a05 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Thu, 25 Jul 2024 16:31:42 +0200 Subject: [PATCH] Remove unused method --- src/scriptable/scriptableproxy.cpp | 32 ------------------------------ src/scriptable/scriptableproxy.h | 1 - 2 files changed, 33 deletions(-) diff --git a/src/scriptable/scriptableproxy.cpp b/src/scriptable/scriptableproxy.cpp index 1ba0d5891f..dc94c6dd4a 100644 --- a/src/scriptable/scriptableproxy.cpp +++ b/src/scriptable/scriptableproxy.cpp @@ -1232,38 +1232,6 @@ void ScriptableProxy::runInternalAction(const QVariantMap &data, const QString & m_wnd->runInternalAction(action); } -QByteArray ScriptableProxy::tryGetCommandOutput(const QString &command) -{ - INVOKE(tryGetCommandOutput, (command)); - - for (int i = 0; i < 3; ++i) { - Action action; - action.setCommand(command); - action.setReadOutput(true); - - QByteArray output; - connect( &action, &Action::actionOutput, - this, [&output](const QByteArray &actionOutput) { - output.append(actionOutput); - } ); - - action.start(); - if ( !action.waitForFinished(5000) ) { - if ( output.isEmpty() || !action.waitForFinished(30000) ) { - action.terminate(); - continue; - } - } - - if ( action.actionFailed() || action.exitCode() != 0 ) - continue; - - return output; - } - - return QByteArray(); -} - void ScriptableProxy::showMessage(const QString &title, const QString &msg, const QString &icon, diff --git a/src/scriptable/scriptableproxy.h b/src/scriptable/scriptableproxy.h index 274ffb314a..b60c9c2b04 100644 --- a/src/scriptable/scriptableproxy.h +++ b/src/scriptable/scriptableproxy.h @@ -125,7 +125,6 @@ public slots: void action(const QVariantMap &arg1, const Command &arg2); void runInternalAction(const QVariantMap &data, const QString &command); - QByteArray tryGetCommandOutput(const QString &command); void showMessage(const QString &title, const QString &msg,