JsonWizard: Add a polish phase

Add a signal/method to polish the generated files: This phase happens after all files
are written to disk and are ready. It is intended for tasks not directly related to
the project setup: E.g. generation of config files, etc.

Use this to generate our config files.

Change-Id: I9bb5d296bec19f163b70c5ec8d43d5b8e3a52d79
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-04-23 15:02:59 +02:00
parent ad49b68605
commit 35aafdcdd9
7 changed files with 28 additions and 2 deletions

View File

@@ -209,12 +209,17 @@ void JsonWizard::accept()
return;
}
emit filesReady(m_files);
if (!JsonWizardGenerator::polish(this, &m_files, &errorMessage)) {
if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to polish Files"), errorMessage);
return;
}
emit filesPolished(m_files);
if (!JsonWizardGenerator::allDone(this, &m_files, &errorMessage)) {
if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to Open Files"), errorMessage);
return;
}
emit allDone(m_files);
}