Clear wizard copy files before adding so the back button works.

This commit is contained in:
Jonathan Young 2014-05-15 19:53:17 +10:00
parent 70dbf58f44
commit c9f1422f4a
4 changed files with 9 additions and 0 deletions

View file

@ -37,6 +37,11 @@ InstallWizard::~InstallWizard()
delete ui;
}
void InstallWizard::clearCopyFiles()
{
copyFiles.clear();
}
void InstallWizard::addCopyFile(const QString &source, const QString &dest)
{
CopyFile cf;

View file

@ -24,6 +24,7 @@ public:
QString dest;
};
void clearCopyFiles();
void addCopyFile(const QString &source, const QString &dest);
const QList<CopyFile> &getCopyFiles() const;

View file

@ -77,6 +77,7 @@ InstallWizard_Copy::~InstallWizard_Copy()
void InstallWizard_Copy::initializePage()
{
ui->lblStatus->setText("");
isCopyFinished = false;
copyFilename = QString();

View file

@ -72,6 +72,7 @@ bool InstallWizard_Setup::validatePage()
iw->setIsQuake3PatchRequired(true);
// Copy page will copy baseq3/pak0.pk3.
iw->clearCopyFiles();
iw->addCopyFile(ui->cbInstallSource->currentText() + QString("/QUAKE3/baseq3/pak0.pk3"), ui->txtInstallDest->text() + QString("/baseq3/pak0.pk3"));
iw->setQuakePath(ui->txtInstallDest->text());
}
@ -97,6 +98,7 @@ bool InstallWizard_Setup::validatePage()
// Copy page will copy baseq3/*.pk3 files.
QFileInfoList pakFiles = steamQuakeDir.entryInfoList(QStringList("*.pk3"), QDir::Files | QDir::NoSymLinks | QDir::Readable, QDir::Name);
iw->clearCopyFiles();
for (int i = 0; i < pakFiles.size(); i++)
{