mirror of
https://github.com/ioquake/launch.git
synced 2024-11-28 05:51:59 +00:00
Make install wizard work with Linux Qt4
This commit is contained in:
parent
97c0b11a0b
commit
a3287b1c24
7 changed files with 23 additions and 23 deletions
|
@ -45,7 +45,7 @@ InstallWizard::InstallWizard(QWidget *parent, Settings *settings) :
|
||||||
setButtonLayout(layout);
|
setButtonLayout(layout);
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
connect(cancelButton, &QPushButton::clicked, this, &InstallWizard::cancel);
|
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
|
||||||
|
|
||||||
setPage(Page_Setup, new InstallWizard_Setup(this, settings));
|
setPage(Page_Setup, new InstallWizard_Setup(this, settings));
|
||||||
setPage(Page_Eula, new InstallWizard_Eula(this));
|
setPage(Page_Eula, new InstallWizard_Eula(this));
|
||||||
|
|
|
@ -62,12 +62,12 @@ void InstallWizard_Copy::initializePage()
|
||||||
qRegisterMetaType<QList<FileOperation> >("QList<FileOperation>");
|
qRegisterMetaType<QList<FileOperation> >("QList<FileOperation>");
|
||||||
copyWorker = new FileCopyWorker(((InstallWizard *)wizard())->getFileCopyOperations());
|
copyWorker = new FileCopyWorker(((InstallWizard *)wizard())->getFileCopyOperations());
|
||||||
copyWorker->moveToThread(©Thread);
|
copyWorker->moveToThread(©Thread);
|
||||||
connect(©Thread, &QThread::finished, copyWorker, &QObject::deleteLater);
|
connect(©Thread, SIGNAL(finished()), copyWorker, SLOT(deleteLater()));
|
||||||
connect(this, &InstallWizard_Copy::copy, copyWorker, &FileCopyWorker::copy);
|
connect(this, SIGNAL(copy()), copyWorker, SLOT(copy()));
|
||||||
connect(copyWorker, &FileCopyWorker::fileChanged, this, &InstallWizard_Copy::setCopyFilename);
|
connect(copyWorker, SIGNAL(fileChanged(const QString)), this, SLOT(setCopyFilename(const QString)));
|
||||||
connect(copyWorker, &FileCopyWorker::progressChanged, this, &InstallWizard_Copy::setCopyProgress);
|
connect(copyWorker, SIGNAL(progressChanged(qint64,qint64)), this, SLOT(setCopyProgress(qint64,qint64)));
|
||||||
connect(copyWorker, &FileCopyWorker::errorMessage, this, &InstallWizard_Copy::setCopyErrorMessage);
|
connect(copyWorker, SIGNAL(errorMessage(const QString)), this, SLOT(setCopyErrorMessage(const QString)));
|
||||||
connect(copyWorker, &FileCopyWorker::copyFinished, this, &InstallWizard_Copy::finishCopy);
|
connect(copyWorker, SIGNAL(copyFinished(QList<FileOperation>)), this, SLOT(finishCopy(QList<FileOperation>)));
|
||||||
copyThread.start();
|
copyThread.start();
|
||||||
|
|
||||||
emit copy();
|
emit copy();
|
||||||
|
|
|
@ -66,9 +66,9 @@ void InstallWizard_Patch::initializePage()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
networkReply = nam.get(networkRequest);
|
networkReply = nam.get(networkRequest);
|
||||||
connect(networkReply, &QNetworkReply::readyRead, this, &InstallWizard_Patch::downloadRead);
|
connect(networkReply, SIGNAL(readyRead()), this, SLOT(downloadRead()));
|
||||||
connect(networkReply, &QNetworkReply::downloadProgress, this, &InstallWizard_Patch::updateProgress);
|
connect(networkReply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(updateProgress(qint64,qint64)));
|
||||||
connect(networkReply, &QNetworkReply::finished, this, &InstallWizard_Patch::downloadFinished);
|
connect(networkReply, SIGNAL(finished()), this, SLOT(downloadFinished()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallWizard_Patch::cleanupPage()
|
void InstallWizard_Patch::cleanupPage()
|
||||||
|
@ -141,12 +141,12 @@ void InstallWizard_Patch::downloadFinished()
|
||||||
qRegisterMetaType<QList<FileOperation> >("QList<FileOperation>");
|
qRegisterMetaType<QList<FileOperation> >("QList<FileOperation>");
|
||||||
extractWorker = new FileExtractWorker(patchFile->fileName(), filesToExtract);
|
extractWorker = new FileExtractWorker(patchFile->fileName(), filesToExtract);
|
||||||
extractWorker->moveToThread(&extractThread);
|
extractWorker->moveToThread(&extractThread);
|
||||||
connect(&extractThread, &QThread::finished, extractWorker, &QObject::deleteLater);
|
connect(&extractThread, SIGNAL(finished()), extractWorker, SLOT(deleteLater()));
|
||||||
connect(this, &InstallWizard_Patch::extract, extractWorker, &FileExtractWorker::extract);
|
connect(this, SIGNAL(extract()), extractWorker, SLOT(extract()));
|
||||||
connect(extractWorker, &FileExtractWorker::fileChanged, this, &InstallWizard_Patch::setExtractFilename);
|
connect(extractWorker, SIGNAL(fileChanged(const QString)), this, SLOT(setExtractFilename(const QString)));
|
||||||
connect(extractWorker, &FileExtractWorker::progressChanged, this, &InstallWizard_Patch::updateProgress);
|
connect(extractWorker, SIGNAL(progressChanged(qint64,qint64)), this, SLOT(updateProgress(qint64,qint64)));
|
||||||
connect(extractWorker, &FileExtractWorker::errorMessage, this, &InstallWizard_Patch::setErrorMessage);
|
connect(extractWorker, SIGNAL(errorMessage(const QString)), this, SLOT(setErrorMessage(const QString)));
|
||||||
connect(extractWorker, &FileExtractWorker::finished, this, &InstallWizard_Patch::finishExtract);
|
connect(extractWorker, SIGNAL(finished(QList<FileOperation>)), this, SLOT(finishExtract(QList<FileOperation>)));
|
||||||
extractThread.start();
|
extractThread.start();
|
||||||
emit extract();
|
emit extract();
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,7 @@ bool InstallWizard_Setup::validatePage()
|
||||||
|
|
||||||
if (ui->stackPages->currentIndex() == Page_Install)
|
if (ui->stackPages->currentIndex() == Page_Install)
|
||||||
{
|
{
|
||||||
QDir dir(ui->cbInstallSource->currentData().toString());
|
QDir dir(ui->cbInstallSource->currentText());
|
||||||
|
|
||||||
if (!dir.exists())
|
if (!dir.exists())
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,7 @@ bool InstallWizard_Setup::validatePage()
|
||||||
|
|
||||||
// Copy page will copy baseq3/pak0.pk3.
|
// Copy page will copy baseq3/pak0.pk3.
|
||||||
iw->clearFileCopyOperations();
|
iw->clearFileCopyOperations();
|
||||||
iw->addFileCopyOperation(ui->cbInstallSource->currentData().toString() + QString("/QUAKE3/baseq3/pak0.pk3"), ui->txtInstallDest->text() + QString("/baseq3/pak0.pk3"));
|
iw->addFileCopyOperation(ui->cbInstallSource->currentText() + QString("/QUAKE3/baseq3/pak0.pk3"), ui->txtInstallDest->text() + QString("/baseq3/pak0.pk3"));
|
||||||
iw->setQuakePath(ui->txtInstallDest->text());
|
iw->setQuakePath(ui->txtInstallDest->text());
|
||||||
}
|
}
|
||||||
else if (ui->stackPages->currentIndex() == Page_InstallSteam)
|
else if (ui->stackPages->currentIndex() == Page_InstallSteam)
|
||||||
|
@ -214,7 +214,7 @@ bool InstallWizard_Setup::isComplete() const
|
||||||
{
|
{
|
||||||
if (ui->stackPages->currentIndex() == Page_Install)
|
if (ui->stackPages->currentIndex() == Page_Install)
|
||||||
{
|
{
|
||||||
return !ui->cbInstallSource->currentData().toString().isEmpty() && !ui->txtInstallDest->text().isEmpty();
|
return !ui->cbInstallSource->currentText().isEmpty() && !ui->txtInstallDest->text().isEmpty();
|
||||||
}
|
}
|
||||||
else if (ui->stackPages->currentIndex() == Page_InstallSteam)
|
else if (ui->stackPages->currentIndex() == Page_InstallSteam)
|
||||||
{
|
{
|
||||||
|
@ -288,7 +288,7 @@ void InstallWizard_Setup::on_txtLocatePath_textChanged(const QString & /*arg1*/)
|
||||||
|
|
||||||
void InstallWizard_Setup::on_btnInstallBrowseSource_clicked()
|
void InstallWizard_Setup::on_btnInstallBrowseSource_clicked()
|
||||||
{
|
{
|
||||||
const QString location = QFileDialog::getExistingDirectory(wizard(), "Select Quake III Arena CD-ROM directory", ui->cbInstallSource->currentData().toString());
|
const QString location = QFileDialog::getExistingDirectory(wizard(), "Select Quake III Arena CD-ROM directory", ui->cbInstallSource->currentText());
|
||||||
|
|
||||||
if (!location.isEmpty())
|
if (!location.isEmpty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <QtZlib/zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
#if defined(USE_FILE32API)
|
#if defined(USE_FILE32API)
|
||||||
#define fopen64 fopen
|
#define fopen64 fopen
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
#define NOUNCRYPT
|
#define NOUNCRYPT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QtZlib/zlib.h>
|
#include <zlib.h>
|
||||||
#include "unzip.h"
|
#include "unzip.h"
|
||||||
|
|
||||||
#ifdef STDC
|
#ifdef STDC
|
||||||
|
|
|
@ -48,7 +48,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _ZLIB_H
|
#ifndef _ZLIB_H
|
||||||
#include <QtZlib/zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _ZLIBIOAPI_H
|
#ifndef _ZLIBIOAPI_H
|
||||||
|
|
Loading…
Reference in a new issue