ProjectExplorer: Provide task tree adapter for DeviceProcessKiller

Change-Id: I45133dcba07d5fc5fa721c0af13ba86f75985a5e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2022-11-24 15:27:46 +01:00
parent c99dd6650d
commit 0c18fbc31f
2 changed files with 20 additions and 0 deletions

View File

@@ -683,4 +683,14 @@ void DeviceProcessKiller::start()
m_signalOperation->killProcess(m_processPath.path());
}
KillerAdapter::KillerAdapter()
{
connect(task(), &DeviceProcessKiller::done, this, &KillerAdapter::done);
}
void KillerAdapter::start()
{
task()->start();
}
} // namespace ProjectExplorer

View File

@@ -9,6 +9,7 @@
#include <utils/id.h>
#include <utils/filepath.h>
#include <utils/hostosinfo.h>
#include <utils/tasktree.h>
#include <QAbstractSocket>
#include <QCoreApplication>
@@ -294,4 +295,13 @@ private:
QString m_errorString;
};
class PROJECTEXPLORER_EXPORT KillerAdapter : public Utils::Tasking::TaskAdapter<DeviceProcessKiller>
{
public:
KillerAdapter();
void start() final;
};
} // namespace ProjectExplorer
QTC_DECLARE_CUSTOM_TASK(Killer, ProjectExplorer::KillerAdapter);