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