From 2edf8a9e4d3fdea43c2a486954b468e9e4de7d76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mikko=20Kein=C3=A4nen?= Date: Wed, 20 Oct 2010 00:32:55 +0300 Subject: [PATCH] QProcess proc was not needed anymore (replaced by emuHelper). --- src/emulauncher.cpp | 11 +++++------ src/emulauncher.h | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/emulauncher.cpp b/src/emulauncher.cpp index f0e8e4f..a71b046 100644 --- a/src/emulauncher.cpp +++ b/src/emulauncher.cpp @@ -39,7 +39,6 @@ EmuLauncher::EmuLauncher(QWidget *parent) : dbMediaType = new DbMediaType(this); dbExec = new DbExecutable(this); dbMic = 0; - proc = 0; emuHelper = new EmuHelper(this); initWidgets(); layout(); @@ -48,9 +47,9 @@ EmuLauncher::EmuLauncher(QWidget *parent) : EmuLauncher::~EmuLauncher() { - if (proc) { - proc->kill(); // TODO: do this in a more sophisticated way - delete proc; + if (emuHelper) { + qDebug() << "EmuLauncher destructor"; + emuHelper->kill(); // TODO: do this in a more sophisticated way } } @@ -226,7 +225,7 @@ void EmuLauncher::processError(QProcess::ProcessError e) QString stdErr = emuHelper->readAllStandardError(); QMessageBox::warning(this, tr("Emulator"), tr("Launching emulator failed with: %1.\n").arg(e) - .append(";\n").append(proc->errorString().append(";\n") + .append(";\n").append(emuHelper->errorString().append(";\n") .append(stdErr)), QMessageBox::Ok ); } @@ -237,7 +236,7 @@ void EmuLauncher::processFinished(int a) QString stdErr = emuHelper->readAllStandardError(); QString stdMsg = emuHelper->readAllStandardOutput(); QString msg = tr("Emulator has finished with: %1.\n").arg(a).append(stdMsg); - if (a) msg.append("; ").append(proc->errorString()).append(";\n").append(stdErr); + if (a) msg.append("; ").append(emuHelper->errorString()).append(";\n").append(stdErr); QMessageBox::information(this, tr("Emulator finished"), msg, QMessageBox::Ok); } diff --git a/src/emulauncher.h b/src/emulauncher.h index c879a8b..6921f9a 100644 --- a/src/emulauncher.h +++ b/src/emulauncher.h @@ -33,7 +33,6 @@ class EFFileObjectComboBox; class ExecutableComboBox; class Executable; class MediaImageContainer; -class QProcess; class EmuHelper; class EmuLauncher : public QWidget @@ -63,7 +62,6 @@ private: DbMediaType *dbMediaType; DbMediaImageContainer *dbMic; DbExecutable *dbExec; - QProcess *proc; EmuHelper *emuHelper; void initWidgets(); void layout(); -- 1.7.9.5