<br><br><div class="gmail_quote">On Wed, Mar 16, 2011 at 8:01 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;">
<div class="im">On 03/16/2011 03:20 PM, Vishesh Handa wrote:<br>
><br>
><br>
> On Wed, Mar 16, 2011 at 7:37 PM, Sebastian Trüg <<a href="mailto:trueg@kde.org">trueg@kde.org</a><br>
</div><div class="im">> <mailto:<a href="mailto:trueg@kde.org">trueg@kde.org</a>>> wrote:<br>
><br>
> 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>
><br>
><br>
> That too won't work. Here is why -<br>
><br>
> You run a query A, it finishes executing itself and then deletes itself.<br>
> You then run query B, it will try to stop query A by deleting it. But<br>
> 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">
> The only way I could think of solving this was by checking if the query<br>
> we were getting results for was the m_currentQuery, and otherwise<br>
> deleting it. That code was removed in the patch provided.<br>
><br>
><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<br>
> "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<br>
> 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>
> <mailto:<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> <mailto:<a href="mailto:who828@gmail.com">who828@gmail.com</a>>>> wrote:<br>
> ><br>
> > The previous patch affected the copyright somehow so i am<br>
> sending a<br>
> > new one.<br>
> ><br>
> ><br>
> > - Smit Shah (My real name)<br>
> ><br>
> > _______________________________________________<br>
> > Nepomuk mailing list<br>
> > <a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a> <mailto:<a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a>><br>
</div>> <mailto:<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> <mailto:<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> <mailto:<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>
><br>
><br>
><br>
> --<br>
> Vishesh Handa<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><font color="#999999">Vishesh Handa</font><br>