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

List:       kde-kimageshop
Subject:    Re: [calligra] krita/image: Cancel all running strokes when the queue gets destructed.
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2012-06-28 18:45:17
Message-ID: CAEkBSfXfPjX2aas5-4a_nLuyvwXjMG7-HHnvvya-3kGXzn19XA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Cancelling the stroke does not cancel them immediately. It just adds the
jobs to cancel them. So you just grow the queue with doing this. What bug
you were fixing with it?

On Thu, Jun 28, 2012 at 5:54 PM, Boudewijn Rempt <boud@valdyas.org> wrote:

> Git commit e0f5d156f61e16fca41801adb090bcc49f263ac5 by Boudewijn Rempt.
> Committed on 28/06/2012 at 15:52.
> Pushed by rempt into branch 'master'.
>
> Cancel all running strokes when the queue gets destructed.
>
> M  +4    -0    krita/image/kis_strokes_queue.cpp
>
> http://commits.kde.org/calligra/e0f5d156f61e16fca41801adb090bcc49f263ac5
>
> diff --git a/krita/image/kis_strokes_queue.cpp
> b/krita/image/kis_strokes_queue.cpp
> index 7ef64a5..86783ac 100644
> --- a/krita/image/kis_strokes_queue.cpp
> +++ b/krita/image/kis_strokes_queue.cpp
> @@ -40,6 +40,10 @@ KisStrokesQueue::KisStrokesQueue()
>
>  KisStrokesQueue::~KisStrokesQueue()
>  {
> +    foreach(KisStrokeSP stroke, m_d->strokesQueue) {
> +        stroke->cancelStroke();
> +    }
> +
>     delete m_d;
>  }
>
>


-- 
Dmitry Kazakov

[Attachment #5 (text/html)]

Cancelling the stroke does not cancel them immediately. It just adds the jobs to \
cancel them. So you just grow the queue with doing this. What bug you were fixing \
with it?<br><br><div class="gmail_quote">On Thu, Jun 28, 2012 at 5:54 PM, Boudewijn \
Rempt <span dir="ltr">&lt;<a href="mailto:boud@valdyas.org" \
target="_blank">boud@valdyas.org</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Git commit e0f5d156f61e16fca41801adb090bcc49f263ac5 by \
Boudewijn Rempt.<br> Committed on 28/06/2012 at 15:52.<br>
Pushed by rempt into branch &#39;master&#39;.<br>
<br>
Cancel all running strokes when the queue gets destructed.<br>
<br>
M   +4      -0      krita/image/kis_strokes_queue.cpp<br>
<br>
<a href="http://commits.kde.org/calligra/e0f5d156f61e16fca41801adb090bcc49f263ac5" \
target="_blank">http://commits.kde.org/calligra/e0f5d156f61e16fca41801adb090bcc49f263ac5</a><br>
 <br>
diff --git a/krita/image/kis_strokes_queue.cpp \
b/krita/image/kis_strokes_queue.cpp<br> index 7ef64a5..86783ac 100644<br>
--- a/krita/image/kis_strokes_queue.cpp<br>
+++ b/krita/image/kis_strokes_queue.cpp<br>
@@ -40,6 +40,10 @@ KisStrokesQueue::KisStrokesQueue()<br>
<br>
  KisStrokesQueue::~KisStrokesQueue()<br>
  {<br>
+      foreach(KisStrokeSP stroke, m_d-&gt;strokesQueue) {<br>
+            stroke-&gt;cancelStroke();<br>
+      }<br>
+<br>
       delete m_d;<br>
  }<br>
<br>
</blockquote></div><br><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