KConfigDialogManager without Q3SqlPropertyMap

Benjamin Meyer ben at meyerhome.net
Sun Jan 29 22:23:42 GMT 2006


On Sunday 29 January 2006 10:59 pm, Benjamin Meyer wrote:
> On Saturday 28 January 2006 6:12 pm, Szombathelyi György wrote:
> > And here's an improved patch, with api docs. I'll commit tomorrow if
> > there will no objections.
> >
> > Bye,
> > György
>
> Don't remove the kapplication function.  It is deprecated and part of
> support sense other things use it.  We could move it into the header file
> and make it inline for those few classes that use it.  As for the other
> class I added support in moc for a USER propery in 4.1.  Here is an example
> way to find out what property should be used.
>
> QHash<QString, QString> userPropertyMapping;
>
> QString getUserProperty(const QWidget *widget) {
>     if (!userPropertyMapping.contains(widget->metaObject()->className())) {
>         const QMetaObject *metaObject = widget->metaObject();
>         int propertyCount = metaObject->propertyCount();
>         for (int i = 0; i < propertyCount; ++i) {
>             const QMetaProperty metaProperty = metaObject->property(i);
>             if (metaProperty.isUser()) {
>                 userPropertyMapping[widget->metaObject()->className()] =
> metaProperty.name();
>                 break;
>             }
>         }
>     }
>
>     return userPropertyMapping[widget->metaObject()->className()];
> }
>
> QString propertyToUse = getUserProperty(widget);
> return widget->property(qPrintable(propertyToUse));
>
> -Benjamin Meyer

if you want I can just do this.

-Benjamin Meyer

-- 
aka icefox
Public Key: http://www.icefox.net/public_key.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060129/42a2e08b/attachment.sig>


More information about the kde-core-devel mailing list