forked from qt-creator/qt-creator
ProjectExplorer: Provide task tree adapter for DeviceProcessKiller
Change-Id: I45133dcba07d5fc5fa721c0af13ba86f75985a5e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user