[PATCHes] Re: even more on kconfig escapes (Re: KDE/kdelibs/kdeui/icons)
Andreas Pakulat
apaku at gmx.de
Fri Nov 23 16:22:05 GMT 2007
On 22.11.07 21:02:24, Oswald Buddenhagen wrote:
> On Thu, Nov 22, 2007 at 09:17:05AM +0100, Oswald Buddenhagen wrote:
> > > Though your last idea seems interesting.
> > >
> > yes. i think i'll simply do it. it looks quite readable (even if a bit
> > weird at first) and the implementation should be simple.
> >
> ok, here's what i did. it's a bit more than only the nested groups
> stuff. :)
> next would be adding a backwards compatible group name parser and
> related logic. but somebody with authority has to prod me into doing it.
> ;)
Out of curiosity: What types of group names from old configs (especially
kde3) can now not be parsed anymore (or parsed incorrectly)?
> diff --git a/tests/kconfigtest.cpp b/tests/kconfigtest.cpp
> index 1a60160..b9f21c9 100644
> --- a/tests/kconfigtest.cpp
> +++ b/tests/kconfigtest.cpp
> @@ -65,7 +65,7 @@ QTEST_KDEMAIN_CORE( KConfigTest )
> #define VARIANTLISTENTRY2 (QVariantList() << POINTENTRY << SIZEENTRY)
> #define HOMEPATH QDir::homePath()+"/foo"
> #define HOMEPATHESCAPE QDir::homePath()+"/foo/$HOME"
> -#define SUBGROUPLIST (QStringList() << "SubGroup1" << "SubGroup2" << "SubGroup")
> +#define SUBGROUPLIST (QStringList() << "SubGroup/3" << "SubGroup1" << "SubGroup2")
I'm wondering if there's a way to make this constant and the test
> QCOMPARE(cg.groupList(), SUBGROUPLIST );
a bit more reliable. Currently the test relies on whatever order the
kconfig backend decides to use to write out the groups, but I think
that it shouldn't. Maybe we should use QSet::fromList() around the
groupList and compare to a QSet?
I mean as far as I can see the order of groups in the file doesn't play
any role anywhere.
Andreas
--
Best of all is never to have been born. Second best is to die soon.
More information about the kde-core-devel
mailing list