forked from qt-creator/qt-creator
AndroidSettingsWidget: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals. Change-Id: If802368f1f084e5990458942b3ef94517a0cfdff Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -320,7 +320,7 @@ AndroidSettingsWidget::AndroidSettingsWidget()
|
|||||||
m_androidSummary = new SummaryWidget(androidValidationPoints, tr("Android settings are OK."),
|
m_androidSummary = new SummaryWidget(androidValidationPoints, tr("Android settings are OK."),
|
||||||
tr("Android settings have errors."),
|
tr("Android settings have errors."),
|
||||||
m_ui.androidDetailsWidget);
|
m_ui.androidDetailsWidget);
|
||||||
m_androidProgress = new Utils::ProgressIndicator(ProgressIndicatorSize::Medium, this);
|
m_androidProgress = new ProgressIndicator(ProgressIndicatorSize::Medium, this);
|
||||||
m_androidProgress->attachToWidget(m_ui.androidDetailsWidget);
|
m_androidProgress->attachToWidget(m_ui.androidDetailsWidget);
|
||||||
m_androidProgress->hide();
|
m_androidProgress->hide();
|
||||||
|
|
||||||
@@ -612,8 +612,16 @@ void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent)
|
|||||||
openButton->deleteLater();
|
openButton->deleteLater();
|
||||||
};
|
};
|
||||||
|
|
||||||
connect(gitCloner, &QtcProcess::finished, this, [=] {
|
connect(gitCloner, &QtcProcess::done, this, [=] {
|
||||||
openSslProgressDialog->close();
|
openSslProgressDialog->close();
|
||||||
|
if (gitCloner->error() != QProcess::UnknownError) {
|
||||||
|
if (gitCloner->error() == QProcess::FailedToStart) {
|
||||||
|
failDialog(tr("The Git tool might not be installed properly on your system."));
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
failDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
validateOpenSsl();
|
validateOpenSsl();
|
||||||
m_ui.openSslPathChooser->triggerChanged(); // After cloning, the path exists
|
m_ui.openSslPathChooser->triggerChanged(); // After cloning, the path exists
|
||||||
|
|
||||||
@@ -623,15 +631,6 @@ void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(gitCloner, &QtcProcess::errorOccurred, this, [=](QProcess::ProcessError error) {
|
|
||||||
openSslProgressDialog->close();
|
|
||||||
if (error == QProcess::FailedToStart) {
|
|
||||||
failDialog(tr("The Git tool might not be installed properly on your system."));
|
|
||||||
} else {
|
|
||||||
failDialog();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
openSslProgressDialog->show();
|
openSslProgressDialog->show();
|
||||||
gitCloner->start();
|
gitCloner->start();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user