<br><br><div class="gmail_quote">On Wed, Mar 16, 2011 at 7:37 PM, Sebastian Trüg <span dir="ltr"><<a href="mailto:trueg@kde.org">trueg@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
OK, so we only need a stopQuery() in the setQuery method, right? IMHO<br>
that is much cleaner and easier to understand than setting current query<br>
to 0.<br></blockquote><div><br></div><div>That too won't work. Here is why -</div><div><br></div><div>You run a query A, it finishes executing itself and then deletes itself. You then run query B, it will try to stop query A by deleting it. But since it has already been deleted - Crash.</div>
<div><br></div><div>The only way I could think of solving this was by checking if the query we were getting results for was the m_currentQuery, and otherwise deleting it. That code was removed in the patch provided. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 03/16/2011 02:58 PM, Vishesh Handa wrote:<br>
> This patch ( now committed ) is not that useful.<br>
><br>
> The only thing it does is sets the time elapsed when you click the "Stop<br>
> Query" button. And it removes the old code which allowed you to<br>
> automatically stop the old query if you ran a new one.<br>
><br>
> When a query finishes execution, or is closed, it automatically deletes<br>
> itself and therefore disconnects itself from all signals and slots.<br>
><br>
> I know the setting of 'd->m_currentQuery = 0' was not completely<br>
> obvious. But it did what it was supposed to. The query if it was still<br>
> being executed would have been deleted when more results were received<br>
> in slotNextResultReady()<br>
><br>
> I'll either revert this patch or fix it.<br>
><br>
> On Wed, Mar 16, 2011 at 4:37 PM, Who Knows <<a href="mailto:who828@gmail.com">who828@gmail.com</a><br>
</div><div class="im">> <mailto:<a href="mailto:who828@gmail.com">who828@gmail.com</a>>> wrote:<br>
><br>
> The previous patch affected the copyright somehow so i am sending a<br>
> new one.<br>
><br>
><br>
> - Smit Shah (My real name)<br>
><br>
> _______________________________________________<br>
> Nepomuk mailing list<br>
</div>> <a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a> <mailto:<a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a>><br>
<div><div></div><div class="h5">> <a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Vishesh Handa<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Nepomuk mailing list<br>
> <a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a><br>
> <a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
_______________________________________________<br>
Nepomuk mailing list<br>
<a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><font color="#999999">Vishesh Handa</font><br>