forked from qt-creator/qt-creator
RemoteLinux: Drop stopRequested from GenericDirectUploadService
It can never be true. And there is another stopRequested in AbstractRemotelinuxDeployService. Change-Id: If30b0732f87ddbe573112334a1e4ce719614edfc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -50,11 +50,10 @@ class GenericDirectUploadServicePrivate
|
||||
{
|
||||
public:
|
||||
GenericDirectUploadServicePrivate()
|
||||
: incremental(false), ignoreMissingFiles(false), stopRequested(false), state(Inactive) {}
|
||||
: incremental(false), ignoreMissingFiles(false), state(Inactive) {}
|
||||
|
||||
bool incremental;
|
||||
bool ignoreMissingFiles;
|
||||
bool stopRequested;
|
||||
State state;
|
||||
QList<DeployableFile> filesToUpload;
|
||||
SftpChannel::Ptr uploader;
|
||||
@@ -132,12 +131,6 @@ void GenericDirectUploadService::handleSftpInitialized()
|
||||
{
|
||||
QTC_ASSERT(d->state == InitializingSftp, setFinished(); return);
|
||||
|
||||
if (d->stopRequested) {
|
||||
setFinished();
|
||||
handleDeploymentDone();
|
||||
return;
|
||||
}
|
||||
|
||||
Q_ASSERT(!d->filesToUpload.isEmpty());
|
||||
connect(d->uploader.data(), &SftpChannel::finished,
|
||||
this, &GenericDirectUploadService::handleUploadFinished);
|
||||
@@ -160,11 +153,6 @@ void GenericDirectUploadService::handleUploadFinished(SftpJobId jobId, const QSt
|
||||
|
||||
QTC_ASSERT(d->state == Uploading, setFinished(); return);
|
||||
|
||||
if (d->stopRequested) {
|
||||
setFinished();
|
||||
handleDeploymentDone();
|
||||
}
|
||||
|
||||
const DeployableFile df = d->filesToUpload.takeFirst();
|
||||
if (!errorMsg.isEmpty()) {
|
||||
QString errorString = tr("Upload of file \"%1\" failed. The server said: \"%2\".")
|
||||
@@ -204,11 +192,6 @@ void GenericDirectUploadService::handleLnFinished(int exitStatus)
|
||||
{
|
||||
QTC_ASSERT(d->state == Uploading, setFinished(); return);
|
||||
|
||||
if (d->stopRequested) {
|
||||
setFinished();
|
||||
handleDeploymentDone();
|
||||
}
|
||||
|
||||
const DeployableFile df = d->filesToUpload.takeFirst();
|
||||
const QString nativePath = df.localFilePath().toUserOutput();
|
||||
if (exitStatus != SshRemoteProcess::NormalExit || d->lnProc->exitCode() != 0) {
|
||||
@@ -226,12 +209,6 @@ void GenericDirectUploadService::handleChmodFinished(int exitStatus)
|
||||
{
|
||||
QTC_ASSERT(d->state == Uploading, setFinished(); return);
|
||||
|
||||
if (d->stopRequested) {
|
||||
setFinished();
|
||||
handleDeploymentDone();
|
||||
return;
|
||||
}
|
||||
|
||||
if (exitStatus != SshRemoteProcess::NormalExit || d->chmodProc->exitCode() != 0) {
|
||||
emit errorMessage(tr("Failed to set executable flag."));
|
||||
setFinished();
|
||||
@@ -245,11 +222,6 @@ void GenericDirectUploadService::handleMkdirFinished(int exitStatus)
|
||||
{
|
||||
QTC_ASSERT(d->state == Uploading, setFinished(); return);
|
||||
|
||||
if (d->stopRequested) {
|
||||
setFinished();
|
||||
handleDeploymentDone();
|
||||
}
|
||||
|
||||
const DeployableFile &df = d->filesToUpload.first();
|
||||
QFileInfo fi = df.localFilePath().toFileInfo();
|
||||
const QString nativePath = df.localFilePath().toUserOutput();
|
||||
@@ -351,7 +323,6 @@ void GenericDirectUploadService::checkDeploymentNeeded(const DeployableFile &dep
|
||||
|
||||
void GenericDirectUploadService::setFinished()
|
||||
{
|
||||
d->stopRequested = false;
|
||||
d->state = Inactive;
|
||||
if (d->mkdirProc)
|
||||
disconnect(d->mkdirProc.data(), 0, this, 0);
|
||||
|
Reference in New Issue
Block a user