Re: Comparing KFileItems

2012-10-30 Thread David Faure
On Friday 26 October 2012 17:04:33 Michael Pyne wrote: > On Friday, October 26, 2012 10:16:50 Frank Reininghaus wrote: > > > I was thinking the first one, but indeed Qt often does the second one, > > > I'm not sure what the difference really is. Either one is fine with me. > > > > in the end, I di

Re: Comparing KFileItems

2012-10-26 Thread Michael Pyne
On Friday, October 26, 2012 10:16:50 Frank Reininghaus wrote: > > I was thinking the first one, but indeed Qt often does the second one, > > I'm not sure what the difference really is. Either one is fine with me. > > in the end, I did not inline the function - before I pushed the > commit, I wonde

Re: Comparing KFileItems

2012-10-26 Thread Frank Reininghaus
Hi David, 2012/10/24 David Faure: > On Wednesday 24 October 2012 10:47:46 Frank Reininghaus wrote: >> Hi David, >> >> I see that I should probably have created a review request to make >> review easier for you - sorry about that! But I think we're getting >> closer to the final solution, so I'll j

Re: Comparing KFileItems

2012-10-24 Thread David Faure
On Wednesday 24 October 2012 10:47:46 Frank Reininghaus wrote: > Hi David, > > I see that I should probably have created a review request to make > review easier for you - sorry about that! But I think we're getting > closer to the final solution, so I'll just reply to your message with > a new pa

Re: Comparing KFileItems

2012-10-24 Thread Frank Reininghaus
Hi David, I see that I should probably have created a review request to make review easier for you - sorry about that! But I think we're getting closer to the final solution, so I'll just reply to your message with a new patch. 2012/10/23 David Faure: > On Monday 22 October 2012 20:10:23 Frank Re

Re: Comparing KFileItems

2012-10-23 Thread David Faure
On Monday 22 October 2012 20:10:23 Frank Reininghaus wrote: > KFileItem.diff > diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp > index 482c4b6..ad62246 100644 > --- a/kio/kio/kfileitem.cpp > +++ b/kio/kio/kfileitem.cpp > @@ -1307,13 +1307,12 @@ bool KFileItem::cmp( const KFileItem & item

Re: Comparing KFileItems

2012-10-22 Thread Frank Reininghaus
Hi David, 2012/10/21 David Faure: On Thursday 18 October 2012 13:54:09 Frank Reininghaus wrote: Obviously, KFileItems are only considered equal if their d pointers are the same. Yes, i.e. created from the same place. But I agree, let's compare URLs too, since they are "unique identifiers" fo

Re: Comparing KFileItems

2012-10-22 Thread Aurélien Gâteau
Le dimanche 21 octobre 2012 13:49:49 David Faure a écrit : > I don't think we want to call a full cmp(). > > If you have two KFileItems referring to the same file, but one KFileItem has > more details than the other (e.g. because it comes from KIO while the other > one was created from a URL only)

Re: Comparing KFileItems

2012-10-21 Thread David Faure
On Thursday 18 October 2012 13:54:09 Frank Reininghaus wrote: > Obviously, KFileItems are only considered equal if their d pointers > are the same. Yes, i.e. created from the same place. But I agree, let's compare URLs too, since they are "unique identifiers" for resources. > There is a Dolphin

Re: Comparing KFileItems

2012-10-19 Thread Frank Reininghaus
Hi, 2012/10/19 Michael Pyne: > On Thursday, October 18, 2012 13:54:09 Frank Reininghaus wrote: >> There are ways to fix or work around this problem inside Dolphin, but >> I'm wondering if it makes sense to change the way KFileItems are >> compared. If two items do not have the same d pointers, one

Re: Comparing KFileItems

2012-10-18 Thread Michael Pyne
On Thursday, October 18, 2012 13:54:09 Frank Reininghaus wrote: > There are ways to fix or work around this problem inside Dolphin, but > I'm wondering if it makes sense to change the way KFileItems are > compared. If two items do not have the same d pointers, one could > check if their URLs are eq

Comparing KFileItems

2012-10-18 Thread Frank Reininghaus
Hi everyone, the operator used for comparing KFileItems is the following: bool KFileItem::operator==(const KFileItem& other) const { // is this enough? return d == other.d; } Obviously, KFileItems are only considered equal if their d pointers are the same. There is a Dolphin bug w