Fixed most of the memory leaks and started working on correctly exiting the thread

This commit is contained in:
pvdk 2014-04-18 13:17:37 +02:00
parent af883991e2
commit aa07a33906
29 changed files with 246 additions and 137 deletions

View file

@ -8,10 +8,17 @@
#include <QDir>
#include <QDebug>
Process::ProcessInvoker::ProcessInvoker(QWidget *parent)
Process::ProcessInvoker::ProcessInvoker()
{
mProcess = new QProcess(this);
connect(mProcess, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(processError(QProcess::ProcessError)));
connect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(processFinished(int,QProcess::ExitStatus)));
mName = QString();
mArguments = QStringList();
}
@ -48,13 +55,6 @@ QProcess* Process::ProcessInvoker::getProcess()
bool Process::ProcessInvoker::startProcess(const QString &name, const QStringList &arguments, bool detached)
{
// mProcess = new QProcess(this);
connect(mProcess, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(processError(QProcess::ProcessError)));
connect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(processFinished(int,QProcess::ExitStatus)));
mName = name;
mArguments = arguments;

View file

@ -13,7 +13,7 @@ namespace Process
public:
ProcessInvoker(QWidget *parent = 0);
ProcessInvoker();
~ProcessInvoker();
// void setProcessName(const QString &name);