[KDevelop] 150def4: If the process hasn't been killed yet, kill it dur
Milian Wolff
mail at milianw.de
Thu Dec 2 22:31:33 GMT 2010
On Thursday 02 December 2010 15:48:25 David Nolden wrote:
> commit 150def40411a0b0bd3c208b2ed08a872bc315f6d
> branch master
> Author: David Nolden <nolden at i6.informatik.rwth-aachen.de>
> Date: Thu Dec 2 15:47:24 2010 +0100
>
> If the process hasn't been killed yet, kill it during destruction. This
> fixes an easily reproducible assertion (added with last change here) when
> using the "Stop" button on the toolbar while building a custom makefile
> project.
Hey David,
this is not correct. The MakeJob should be killed from the runcontroller, see
RunController::stopAllProcesses or slotKillJob.
What project did you try to build with custommake? I cannot reproduce it (yes,
I reverted this patch locally).
I think this shows a bug somewhere else, I added the assert because exactly
this code is *not* correct.
Bye
> diff --git a/projectbuilders/makebuilder/makejob.cpp
> b/projectbuilders/makebuilder/makejob.cpp index 8c7e651..72fd40e 100644
> --- a/projectbuilders/makebuilder/makejob.cpp
> +++ b/projectbuilders/makebuilder/makejob.cpp
> @@ -70,6 +70,11 @@ MakeJob::MakeJob(MakeBuilder* builder,
> KDevelop::ProjectBaseItem* item, CommandT
>
> MakeJob::~MakeJob()
> {
> + if(!m_killed && m_process && m_process->state() !=
> KProcess::NotRunning) + {
> + m_process->kill();
> + m_process->waitForFinished();
> + }
> Q_ASSERT(!m_process || m_process->state() == KProcess::NotRunning);
> }
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20101202/1495d7e4/attachment.sig>
More information about the KDevelop
mailing list