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

List:       koffice-devel
Subject:    Proposal to replace Value by QVariant (Re: koffice/kspread)
From:       Stefan Nikolaus <stefan.nikolaus () kdemail ! net>
Date:       2007-10-17 9:12:54
Message-ID: 200710171112.58302.stefan.nikolaus () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday, 17. October 2007 00:26:20 Johannes Simon wrote:
> SVN commit 726043 by jsimon:
>
> * Return an empty QVariant in KSpread::BindingModel::headerData() and
> KSpread::BindingModel::data() if role is not Qt::EditRole or
> Qt::DisplayRole, otherwise we'll confuse the KDChart with data that's only
> meant for those two roles * Add "QVariant data();" method to KSpread::Value
> class to allow integration with QVariant
>
> These two changes fix the problem the ChartShape had when it was added to a
> KSpread document. The main reason why I sent this to the KOffice mailing
> list is the second point. I think we should reimplement KSpread::Value to
> better integrate with the existing QVariant in Qt 4. For now, I only added
> a method that converts the internal data into a QVariant, so that the
> change doesn't break any code.

KSpread::Value is used a lot and the last time I've checked it was more 
lightweight as QVariant. Replacing it by the latter would increase KSpread's 
memory footprint. Means: I object to your proposal.

I'm fine with the method added to KSpread::Value except its name. Please 
rename it, 'data()' is confusing in this case. Either go with Value's scheme 
and call it 'asVariant()' or convert the method into an 'operator QVariant()' 
as many Qt classes do. Both are fine with me.

-- 
Regards,
Stefan

["signature.asc" (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


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

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