I think QtCentre's moving to a new host may have ruined the code tags in my initial post. So that everyone is clear:
I've connected my signals to my process in the Dialog's constructor like this (and I have verified that they are connected):
connect(process,
SIGNAL(error
(QProcess::ProcessError)),
this,
SLOT(handleProcessError
(QProcess::ProcessError)));
connect(process,
SIGNAL(finished
(int,
QProcess::ExitStatus )),
this,
SLOT(handleProcessFinish
(int,
QProcess::ExitStatus)));
process = new QProcess();
connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(handleProcessError(QProcess::ProcessError)));
connect(process, SIGNAL(finished(int, QProcess::ExitStatus )), this, SLOT(handleProcessFinish(int, QProcess::ExitStatus)));
To copy to clipboard, switch view to plain text mode
When pushing the stop button, I want to kill the process with QProcess::kill(). When the process is killed, naturally, the handleProcessError slot gets called and I do not want this. I wanted to disable this by using:
disconnect
(process,
SIGNAL(error
(QProcess::ProcessError)),
0,
0);
disconnect
(process,
SIGNAL(finished
(int exitCode,
QProcess::ExitStatus)),
0,
0);
process->kill();
disconnect(process, SIGNAL(error(QProcess::ProcessError)), 0, 0);
disconnect(process, SIGNAL(finished(int exitCode, QProcess::ExitStatus)), 0,0);
process->kill();
To copy to clipboard, switch view to plain text mode
I've also tried calling:
process->disconnect();
process->kill();
process->disconnect();
process->kill();
To copy to clipboard, switch view to plain text mode
in an attempt to blindly disconnect everything.
the slots, handleProcessError and handleProcessFinish are still being called.
Bookmarks