Fwd: Re: KConfig: Expandable flag of config entries is not persistent
David Faure
faure at kde.org
Mon Oct 8 23:55:29 CEST 2007
Can I suggest that KDE-3.94 should wait for the main KConfig regressions to be fixed?
Not much point in releasing something completely broken :/
(I guess kmail isn't the only app affected by this....)
---------- Forwarded Message ----------
Subject: Re: KConfig: Expandable flag of config entries is not persistent
Date: Monday 08 October 2007
From: Ingo Klöcker <kloecker at kde.org>
To: kde-core-devel at kde.org
On Monday 08 October 2007, Nhuh Put wrote:
> > Von: Ingo Klöcker
> > Gesendet: Sonntag, 7. Oktober 2007 22:41
> > An: kde-core-devel at kde.org
> > Betreff: KConfig: Expandable flag of config entries is not
> > persistent
> >
> > Hi,
> >
> > KConfigGroup seems to have a serious problem with the persistence
> > of the flags of config entries. In the particular case I have
> > encountered the expandable flag ($e) of a path entry is lost if the
> > config is rewritten without explicitly rewritting the path entry
> > with writePathEntry(). This should be a very common use case
> > because it occurs whenever an application writes a path entry only
> > if it has changed (e.g. KMail writes the location of the mail
> > storage usually only a single time and thenceforth only reads the
> > entry).
> >
> > The attached patch for kconfigtest demonstrates the problem. After
> > adding another config entry and synching the config the expandable
> > flag of the path entry is gone so that the second read test of the
> > path fails because readPathEntry() returns the unexpanded value
> > $HOME/foo:
> >
> > FAIL! : KConfigTest::testPath() Compared values are not the same
> > Actual (sc3.readPathEntry( "homepath", QString() )): $HOME/foo
> > Expected (HOMEPATH): /home/ingo/foo
> > Loc:
> > [/home/ingo/svn/kde/trunk/KDE/kdelibs/kdecore/tests/kconfigtest.cpp
> >(277)]
>
> This should now also be fixed, at least the testcase doesn't fail
> anymore.
I'm sorry, but it is not fixed. I have now committed my testcase. With
revision 723155 (which includes my amended kconfigtest) I'm getting
********* Start testing of KConfigTest *********
Config: Using QTest library 4.3.1, Qt 4.3.1
PASS : KConfigTest::initTestCase()
PASS : KConfigTest::testSimple()
FAIL! : KConfigTest::testLists() 'sc3.hasKey(
QString("stringListEmptyEntry") )' returned FALSE. ()
Loc:
[/home/ingo/svn/kde/trunk/KDE/kdelibs/kdecore/tests/kconfigtest.cpp(261)]
PASS : KConfigTest::testPath()
FAIL! : KConfigTest::testPersistenceOfExpandFlagForPath() Compared
values are not the same
Actual (sc3.readPathEntry( "homepath", QString() )): $HOME/foo
Expected (HOMEPATH): /home/ingo/foo
Loc:
[/home/ingo/svn/kde/trunk/KDE/kdelibs/kdecore/tests/kconfigtest.cpp(287)]
FWIW, this bug makes it impossible to run KMail because after the second
start your mail storage will not be found anymore (due to the missing
expansion of $HOME).
Regards,
Ingo
-------------------------------------------------------
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the release-team
mailing list