setupGui strange interaction with KConfig
tokoe at kde.org
Sun Jan 23 14:30:42 GMT 2005
On Sun, Jan 23, 2005 at 01:05:15PM +0100, Albert Astals Cid wrote:
> look at this test, calling setupGui changes the group of the KInstance
> KConfig object. That is causing, for example bug
> http://bugs.kde.org/show_bug.cgi?id=97229 so i don't know if it may be
> causing any bug more.
I had a similar bug in ksysguard as well some years ago... the problem
was, that KMainWindow::applyMainWindowSettings() set a new group without
restoring it. That's fixed in CVS HEAD now.
BTW, I know KConfigGroup should be used instead of KConfigGroupSaver,
but KConfigGroup is designed in the wrong way IMHO.
I'd would expect to do the following
void foorbar( KConfig *config )
KConfigGroup group( config, "myGroup" );
readValue( &group, "MyKey" );
The problem is, that most methods like 'readValue' expect a KConfig* and
not a KConfigBase*, so you can't really use KConfigGroup in real life...
Separate politics from religion and economy!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the kde-core-devel