forked from qt-creator/qt-creator
AbstractProcessStep: De-virtualize finish() method
Provide a setDoneHook() setter instead. The hook is introduced temporarily, as when all the subclasses are transformed to use the task tree, the done hook is going to be a part of the subclass' recipe. Task-number: QTCREATORBUG-29168 Change-Id: Idbc0f8b8a32c8df2fa5ecb73ed1cbaedad99620d Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -484,6 +484,11 @@ AndroidBuildApkStep::AndroidBuildApkStep(BuildStepList *parent, Utils::Id id)
|
||||
if (format == OutputFormat::Stderr)
|
||||
stdError(string);
|
||||
});
|
||||
|
||||
setDoneHook([this](bool success) {
|
||||
if (m_openPackageLocationForRun && success)
|
||||
QTimer::singleShot(0, this, &AndroidBuildApkStep::showInGraphicalShell);
|
||||
});
|
||||
}
|
||||
|
||||
bool AndroidBuildApkStep::init()
|
||||
@@ -632,13 +637,6 @@ QWidget *AndroidBuildApkStep::createConfigWidget()
|
||||
return new AndroidBuildApkWidget(this);
|
||||
}
|
||||
|
||||
void AndroidBuildApkStep::finish(ProcessResult result)
|
||||
{
|
||||
if (m_openPackageLocationForRun && isSuccess(result))
|
||||
QTimer::singleShot(0, this, &AndroidBuildApkStep::showInGraphicalShell);
|
||||
AbstractProcessStep::finish(result);
|
||||
}
|
||||
|
||||
bool AndroidBuildApkStep::verifyKeystorePassword()
|
||||
{
|
||||
if (!m_keystorePath.exists()) {
|
||||
|
||||
@@ -63,7 +63,6 @@ private:
|
||||
bool init() override;
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
QWidget *createConfigWidget() override;
|
||||
void finish(Utils::ProcessResult result) override;
|
||||
bool verifyKeystorePassword();
|
||||
bool verifyCertificatePassword();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user