[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: koffice/krita/image
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2009-09-27 15:02:53
Message-ID: ae32c1ef0909270802j509746d3u70157e67c0075fae () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Sat, Sep 26, 2009 at 10:11 AM, Boudewijn Rempt <boud@valdyas.org> wrote:

> SVN commit 1028181 by rempt:
>
> Fix layer test
>
> We used to leak the KisProjection, which meant that for every image opened
> and closed we would leave a thread with an eventloop running. However,
> stopping
> that thread reliably is quite hard, so try really hard to stop it.
>
>  M  +3 -1      kis_image.cc
>  M  +11 -1     kis_projection.cc
>  M  +1 -0      kis_projection.h
>  M  +4 -0      tests/kis_layer_test.cpp
>



> +void KisProjection::stop()
> +{
> +    quit();
> +    while(isRunning()) {
> +        qApp->processEvents();
> +    }
> +    setTerminationEnabled(true);
> +    terminate();
> +}
> +
>

This 'while' loop with processEvents() causes infinite loop in
KisCropVisitorTest. Please check this! =)




-- 
Dmitry Kazakov

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Sat, Sep 26, 2009 at 10:11 AM, Boudewijn Rempt \
<span dir="ltr">&lt;<a href="mailto:boud@valdyas.org">boud@valdyas.org</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> SVN commit 1028181 by \
rempt:<br> <br>
Fix layer test<br>
<br>
We used to leak the KisProjection, which meant that for every image opened<br>
and closed we would leave a thread with an eventloop running. However, stopping<br>
that thread reliably is quite hard, so try really hard to stop it.<br>
<br>
  M   +3 -1         kis_image.cc<br>
  M   +11 -1       kis_projection.cc<br>
  M   +1 -0         kis_projection.h<br>
  M   +4 -0         tests/kis_layer_test.cpp<br></blockquote><div><br>  \
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

+void KisProjection::stop()<br>
+{<br>
+      quit();<br>
+      while(isRunning()) {<br>
+            qApp-&gt;processEvents();<br>
+      }<br>
+      setTerminationEnabled(true);<br>
+      terminate();<br>
+}<br>
+<br></blockquote><div><br>This &#39;while&#39; loop with processEvents() causes \
infinite loop in KisCropVisitorTest. Please check this! =)<br><br>  \
<br></div></div><br clear="all"><br>-- <br>Dmitry Kazakov<br>



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic