From 189d9b88ca90a83a46b5cc782c10da5177b3a8a6 Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Thu, 8 May 2014 21:37:32 +1000 Subject: [PATCH] Start the ioq3 process detached, so you can close the launcher while ioq3 is running. --- mainwindow.cpp | 4 ++-- mainwindow.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index c7bdeaa..a372dc8 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,3 +1,4 @@ +#include #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(); diff --git a/mainwindow.h b/mainwindow.h index 6f550f0..5d1bc8a 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -42,7 +41,6 @@ private slots: private: Ui::ioLaunch *ui; - QProcess myProcess; QString ioq3; QString resOption; QString screenOption;