<br><br><div class="gmail_quote">On Wed, Mar 16, 2011 at 7:37 PM, Sebastian Trüg <span dir="ltr">&lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt;</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&#39;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>
&gt; This patch ( now committed ) is not that useful.<br>
&gt;<br>
&gt; The only thing it does is sets the time elapsed when you click the &quot;Stop<br>
&gt; Query&quot; button. And it removes the old code which allowed you to<br>
&gt; automatically stop the old query if you ran a new one.<br>
&gt;<br>
&gt; When a query finishes execution, or is closed, it automatically deletes<br>
&gt; itself and therefore disconnects itself from all signals and slots.<br>
&gt;<br>
&gt; I know the setting of &#39;d-&gt;m_currentQuery = 0&#39; was not completely<br>
&gt; obvious. But it did what it was supposed to. The query if it was still<br>
&gt; being executed would have been deleted when more results were received<br>
&gt; in slotNextResultReady()<br>
&gt;<br>
&gt; I&#39;ll either revert this patch or fix it.<br>
&gt;<br>
&gt; On Wed, Mar 16, 2011 at 4:37 PM, Who Knows &lt;<a href="mailto:who828@gmail.com">who828@gmail.com</a><br>
</div><div class="im">&gt; &lt;mailto:<a href="mailto:who828@gmail.com">who828@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     The previous patch affected the copyright somehow so i am sending a<br>
&gt;     new one.<br>
&gt;<br>
&gt;<br>
&gt;        - Smit Shah (My real name)<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     Nepomuk mailing list<br>
</div>&gt;     <a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a> &lt;mailto:<a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a>&gt;<br>
<div><div></div><div class="h5">&gt;     <a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Vishesh Handa<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Nepomuk mailing list<br>
&gt; <a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a><br>
&gt; <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>