[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: setupGui strange interaction with KConfig
From: Tobias Koenig <tokoe () kde ! org>
Date: 2005-01-23 14:30:42
Message-ID: 20050123143041.GA3512 () ghostdog ! localnet
[Download RAW message or body]
On Sun, Jan 23, 2005 at 01:05:15PM +0100, Albert Astals Cid wrote:
> Hi,
Hi Albert,
> 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...
Ciao,
Tobias
--
Separate politics from religion and economy!
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic