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