mirror of
https://github.com/ioquake/launch.git
synced 2024-11-10 06:31:39 +00:00
Clear wizard copy files before adding so the back button works.
This commit is contained in:
parent
70dbf58f44
commit
c9f1422f4a
4 changed files with 9 additions and 0 deletions
|
@ -37,6 +37,11 @@ InstallWizard::~InstallWizard()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void InstallWizard::clearCopyFiles()
|
||||
{
|
||||
copyFiles.clear();
|
||||
}
|
||||
|
||||
void InstallWizard::addCopyFile(const QString &source, const QString &dest)
|
||||
{
|
||||
CopyFile cf;
|
||||
|
|
|
@ -24,6 +24,7 @@ public:
|
|||
QString dest;
|
||||
};
|
||||
|
||||
void clearCopyFiles();
|
||||
void addCopyFile(const QString &source, const QString &dest);
|
||||
const QList<CopyFile> &getCopyFiles() const;
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ InstallWizard_Copy::~InstallWizard_Copy()
|
|||
|
||||
void InstallWizard_Copy::initializePage()
|
||||
{
|
||||
ui->lblStatus->setText("");
|
||||
isCopyFinished = false;
|
||||
copyFilename = QString();
|
||||
|
||||
|
|
|
@ -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++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue