[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [proposed PATCH] new comparison method in KConfigSkeletonItem
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-06-17 15:19:34
Message-ID: 20070617151934.GB18943 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 16.06.07 19:39:37, Constantin Berzan wrote:
> On Saturday 16 June 2007 19:24, Andreas Pakulat wrote:
> > if(  ( ( p.userType() >= QVariant::UserType 
> >          || item->property.userType() >= QVariant::UserType 
> >        ) && p.userType() != item->property().userType() 
> >     ) 
> >     || ( ( p.userType() < QVariant::UserType
> >            && item->property.userType() < QVariant::UserType
> >          ) && p != item->property()
> >        )
> >     )
> 
> As far as I can see that would just compare the *types*, not the data, in case 
> the QVariants use custom types.
> 
> I already have a proposed solution, it involves adding a new function to the 
> KConfigSkeletonItem class. The
> 
> isEqual(const QVariant &)
> 
> function is to be used for comparison. It is a pure virtual, implemented in 
> each class derived from KConfigSkeletonItem.
> 
> Since the patch is not so small, I put it here:
> http://rafb.net/p/2894Mo42.html

I get a "requested document was not found on this server", but if this
is what you posted on IRC with the few changes Thiago suggest I'm ok
with it.

Andreas

-- 
Your best consolation is the hope that the things you failed to get weren't
really worth having.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic