mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-01 13:20:29 +00:00
Ensure the launcher is not shown when the wizard is run
This commit is contained in:
parent
6348af586e
commit
0cc7c06262
apps/launcher
@ -55,9 +55,11 @@ int main(int argc, char *argv[])
|
|||||||
if (!mainWin.showFirstRunDialog())
|
if (!mainWin.showFirstRunDialog())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// if (!mainWin.setup())
|
// if (!mainWin.setup()) {
|
||||||
// return 0;
|
// return 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
mainWin.show();
|
||||||
|
|
||||||
int returnValue = app.exec();
|
int returnValue = app.exec();
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
@ -51,6 +51,9 @@ Launcher::MainDialog::MainDialog(QWidget *parent)
|
|||||||
mGameInvoker = new ProcessInvoker();
|
mGameInvoker = new ProcessInvoker();
|
||||||
mWizardInvoker = new ProcessInvoker();
|
mWizardInvoker = new ProcessInvoker();
|
||||||
|
|
||||||
|
connect(mWizardInvoker->getProcess(), SIGNAL(started()),
|
||||||
|
this, SLOT(wizardStarted()));
|
||||||
|
|
||||||
connect(mWizardInvoker->getProcess(), SIGNAL(finished(int,QProcess::ExitStatus)),
|
connect(mWizardInvoker->getProcess(), SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||||
this, SLOT(wizardFinished(int,QProcess::ExitStatus)));
|
this, SLOT(wizardFinished(int,QProcess::ExitStatus)));
|
||||||
|
|
||||||
@ -218,7 +221,6 @@ bool Launcher::MainDialog::setup()
|
|||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
show();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -416,7 +418,7 @@ bool Launcher::MainDialog::setupGameSettings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (selectedFile.isEmpty())
|
if (selectedFile.isEmpty())
|
||||||
return false; // Cancel was clicked;
|
return false; // Cancel was clicked
|
||||||
|
|
||||||
QFileInfo info(selectedFile);
|
QFileInfo info(selectedFile);
|
||||||
|
|
||||||
@ -616,6 +618,7 @@ void Launcher::MainDialog::closeEvent(QCloseEvent *event)
|
|||||||
void Launcher::MainDialog::wizardStarted()
|
void Launcher::MainDialog::wizardStarted()
|
||||||
{
|
{
|
||||||
qDebug() << "wizard started!";
|
qDebug() << "wizard started!";
|
||||||
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Launcher::MainDialog::wizardFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
void Launcher::MainDialog::wizardFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||||
@ -623,10 +626,7 @@ void Launcher::MainDialog::wizardFinished(int exitCode, QProcess::ExitStatus exi
|
|||||||
if (exitCode != 0 || exitStatus == QProcess::CrashExit)
|
if (exitCode != 0 || exitStatus == QProcess::CrashExit)
|
||||||
return qApp->quit();
|
return qApp->quit();
|
||||||
|
|
||||||
if (!setup())
|
if (reloadSettings())
|
||||||
return;
|
|
||||||
|
|
||||||
reloadSettings();
|
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user