KillAppStep: Get rid of isDeploymentNecessary()

Make it a part of deployRecipe().

Change-Id: Ia52be36ccc2f387dce3d1c9e946179b9ef328717
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2023-10-23 17:13:41 +02:00
parent 5ef74df9d0
commit d60a67e800

View File

@@ -38,7 +38,6 @@ public:
} }
private: private:
bool isDeploymentNecessary() const final { return !m_remoteExecutable.isEmpty(); }
GroupItem deployRecipe() final; GroupItem deployRecipe() final;
FilePath m_remoteExecutable; FilePath m_remoteExecutable;
@@ -47,9 +46,14 @@ private:
GroupItem KillAppStep::deployRecipe() GroupItem KillAppStep::deployRecipe()
{ {
const auto setupHandler = [this](DeviceProcessKiller &killer) { const auto setupHandler = [this](DeviceProcessKiller &killer) {
if (m_remoteExecutable.isEmpty()) {
addSkipDeploymentMessage();
return SetupResult::StopWithDone;
}
killer.setProcessPath(m_remoteExecutable); killer.setProcessPath(m_remoteExecutable);
addProgressMessage(Tr::tr("Trying to kill \"%1\" on remote device...") addProgressMessage(Tr::tr("Trying to kill \"%1\" on remote device...")
.arg(m_remoteExecutable.path())); .arg(m_remoteExecutable.path()));
return SetupResult::Continue;
}; };
const auto doneHandler = [this](const DeviceProcessKiller &) { const auto doneHandler = [this](const DeviceProcessKiller &) {
addProgressMessage(Tr::tr("Remote application killed.")); addProgressMessage(Tr::tr("Remote application killed."));