diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 0e1ae93a25a..2845e4defe1 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -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 diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index 067262bcd57..71528bfb837 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -294,4 +295,13 @@ private: QString m_errorString; }; +class PROJECTEXPLORER_EXPORT KillerAdapter : public Utils::Tasking::TaskAdapter +{ +public: + KillerAdapter(); + void start() final; +}; + } // namespace ProjectExplorer + +QTC_DECLARE_CUSTOM_TASK(Killer, ProjectExplorer::KillerAdapter);