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

List:       kde-core-devel
Subject:    Re: KConfigDialogManager without Q3SqlPropertyMap
From:       Szombathelyi "György" <gyurco () freemail ! hu>
Date:       2006-01-29 21:24:26
Message-ID: 200601292224.26846.gyurco () freemail ! hu
[Download RAW message or body]

Thanks, I modified my patch to use the USER properties, and commited to trunk. 
Too bad there isn't such facility for the changedMap :(

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

____________________________________________________________________
Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol
Probald ki most! http://www.freestart.hu


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

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