From: Mikko Keinänen Date: Tue, 19 Oct 2010 21:32:55 +0000 (+0300) Subject: QProcess proc was not needed anymore (replaced by emuHelper). X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=2edf8a9e4d3fdea43c2a486954b468e9e4de7d76;p=emufront QProcess proc was not needed anymore (replaced by emuHelper). --- 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();