diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp index 1b4572df22b1c6a221edd952243c705e799e4de5..d490d9907e1854b92ae376b5087be5c78e89ebd0 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp @@ -162,14 +162,12 @@ void JsonWizard::accept() Utils::Wizard::accept(); QString errorMessage; - GeneratorFiles list = fileList(); - - if (list.isEmpty()) + if (fileList().isEmpty()) return; emit prePromptForOverwrite(m_files); JsonWizardGenerator::OverwriteResult overwrite = - JsonWizardGenerator::promptForOverwrite(&list, &errorMessage); + JsonWizardGenerator::promptForOverwrite(&m_files, &errorMessage); if (overwrite == JsonWizardGenerator::OverwriteError) { if (!errorMessage.isEmpty()) QMessageBox::warning(this, tr("Failed to Overwrite Files"), errorMessage); @@ -177,27 +175,27 @@ void JsonWizard::accept() } emit preFormatFiles(m_files); - if (!JsonWizardGenerator::formatFiles(this, &list, &errorMessage)) { + if (!JsonWizardGenerator::formatFiles(this, &m_files, &errorMessage)) { if (!errorMessage.isEmpty()) QMessageBox::warning(this, tr("Failed to Format Files"), errorMessage); return; } emit preWriteFiles(m_files); - if (!JsonWizardGenerator::writeFiles(this, &list, &errorMessage)) { + if (!JsonWizardGenerator::writeFiles(this, &m_files, &errorMessage)) { if (!errorMessage.isEmpty()) QMessageBox::warning(this, tr("Failed to Write Files"), errorMessage); return; } emit postProcessFiles(m_files); - if (!JsonWizardGenerator::postWrite(this, &list, &errorMessage)) { + if (!JsonWizardGenerator::postWrite(this, &m_files, &errorMessage)) { if (!errorMessage.isEmpty()) QMessageBox::warning(this, tr("Failed to Post-Process Files"), errorMessage); return; } emit filesReady(m_files); - if (!JsonWizardGenerator::allDone(this, &list, &errorMessage)) { + if (!JsonWizardGenerator::allDone(this, &m_files, &errorMessage)) { if (!errorMessage.isEmpty()) QMessageBox::warning(this, tr("Failed to Open Files"), errorMessage); return;