Start the ioq3 process detached, so you can close the launcher while ioq3 is running.

This commit is contained in:
Jonathan Young 2014-05-08 21:37:32 +10:00
parent bad8358d46
commit 189d9b88ca
2 changed files with 2 additions and 4 deletions

View File

@ -1,3 +1,4 @@
#include <QProcess>
#include "mainwindow.h"
#include "ui_mainwindow.h"
@ -51,8 +52,7 @@ void ioLaunch::on_btnLaunch_clicked()
screenOption = "";
}
myProcess.start(ioq3+resOption+screenOption);
if(!myProcess.waitForStarted())
if(!QProcess::startDetached(ioq3+resOption+screenOption))
{
ioq3Failed.setText("ioquake3 failed to start!\nIs it installed?\n");
ioq3Failed.exec();

View File

@ -4,7 +4,6 @@
#include <QMainWindow>
#include <QDesktopWidget>
#include <QMessageBox>
#include <QProcess>
#include <QString>
#include <QtGlobal>
#include <QFileDialog>
@ -42,7 +41,6 @@ private slots:
private:
Ui::ioLaunch *ui;
QProcess myProcess;
QString ioq3;
QString resOption;
QString screenOption;