forked from qt-creator/qt-creator
KillAppService: Some cleanup
Remove undefined and unused handleStdErr() and handleProcessFinished() methods. Remove cleanup() and finishDeployment() methods and move the implementation into stopDeployment(). Change-Id: I983e4513c4bcba45638eb054b389783ec4f73367 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -26,17 +26,12 @@ public:
|
|||||||
void setRemoteExecutable(const FilePath &filePath);
|
void setRemoteExecutable(const FilePath &filePath);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handleStdErr();
|
|
||||||
void handleProcessFinished();
|
|
||||||
|
|
||||||
bool isDeploymentNecessary() const override;
|
bool isDeploymentNecessary() const override;
|
||||||
|
|
||||||
void doDeploy() override;
|
void doDeploy() override;
|
||||||
void stopDeployment() override;
|
void stopDeployment() override;
|
||||||
|
|
||||||
void handleSignalOpFinished(const QString &errorMessage);
|
void handleSignalOpFinished(const QString &errorMessage);
|
||||||
void cleanup();
|
|
||||||
void finishDeployment();
|
|
||||||
|
|
||||||
FilePath m_remoteExecutable;
|
FilePath m_remoteExecutable;
|
||||||
DeviceProcessSignalOperation::Ptr m_signalOperation;
|
DeviceProcessSignalOperation::Ptr m_signalOperation;
|
||||||
@@ -66,32 +61,22 @@ void KillAppService::doDeploy()
|
|||||||
m_signalOperation->killProcess(m_remoteExecutable.path());
|
m_signalOperation->killProcess(m_remoteExecutable.path());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KillAppService::cleanup()
|
void KillAppService::stopDeployment()
|
||||||
{
|
{
|
||||||
if (m_signalOperation) {
|
if (m_signalOperation) {
|
||||||
disconnect(m_signalOperation.data(), nullptr, this, nullptr);
|
disconnect(m_signalOperation.data(), nullptr, this, nullptr);
|
||||||
m_signalOperation.clear();
|
m_signalOperation.clear();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void KillAppService::finishDeployment()
|
|
||||||
{
|
|
||||||
cleanup();
|
|
||||||
handleDeploymentDone();
|
handleDeploymentDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KillAppService::stopDeployment()
|
|
||||||
{
|
|
||||||
finishDeployment();
|
|
||||||
}
|
|
||||||
|
|
||||||
void KillAppService::handleSignalOpFinished(const QString &errorMessage)
|
void KillAppService::handleSignalOpFinished(const QString &errorMessage)
|
||||||
{
|
{
|
||||||
if (errorMessage.isEmpty())
|
if (errorMessage.isEmpty())
|
||||||
emit progressMessage(Tr::tr("Remote application killed."));
|
emit progressMessage(Tr::tr("Remote application killed."));
|
||||||
else
|
else
|
||||||
emit progressMessage(Tr::tr("Failed to kill remote application. Assuming it was not running."));
|
emit progressMessage(Tr::tr("Failed to kill remote application. Assuming it was not running."));
|
||||||
finishDeployment();
|
stopDeployment();
|
||||||
}
|
}
|
||||||
|
|
||||||
class KillAppStep : public AbstractRemoteLinuxDeployStep
|
class KillAppStep : public AbstractRemoteLinuxDeployStep
|
||||||
|
Reference in New Issue
Block a user