[proposed PATCH] new comparison method in KConfigSkeletonItem (was: Custom-type QVariant comparison in KConfigDialogManager)
Andreas Pakulat
apaku at gmx.de
Sun Jun 17 16:19:34 BST 2007
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.
More information about the kde-core-devel
mailing list