Wizards: Make it possible to check existing files to overwrite.

Present a checkable list of files to be overwritten,
enabling re-generating a part of the project or class.

Task-number: QTCREATORBUG-4538
This commit is contained in:
Friedemann Kleint
2011-04-15 11:27:15 +02:00
parent ea266e33d6
commit 3543eefc8c
7 changed files with 299 additions and 36 deletions

View File

@@ -262,10 +262,11 @@ bool CustomWizard::writeFiles(const Core::GeneratedFiles &files, QString *errorM
return false;
if (d->m_parameters->filesGeneratorScript.isEmpty())
return true;
// Prepare run of the custom script to generate. In the case of a
// project wizard that is entirely created by a script,
// the target project directory might not exist.
// Known issue: By nature, the script does not honor
// Core::GeneratedFile::KeepExistingFileAttribute.
const CustomWizardContextPtr ctx = context();
const QString scriptWorkingDir = scriptWorkingDirectory(ctx, d->m_parameters);
const QDir scriptWorkingDirDir(scriptWorkingDir);