From kde-core-devel Sun Jan 29 21:24:26 2006 From: Szombathelyi "György" Date: Sun, 29 Jan 2006 21:24:26 +0000 To: kde-core-devel Subject: Re: KConfigDialogManager without Q3SqlPropertyMap Message-Id: <200601292224.26846.gyurco () freemail ! hu> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=113857265109020 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 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