[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: even more on kconfig escapes (Re: KDE/kdelibs/kdeui/icons)
From: Oswald Buddenhagen <ossi () kde ! org>
Date: 2007-11-23 8:28:41
Message-ID: 20071123082841.GA7911 () ugly ! local
[Download RAW message or body]
On Thu, Nov 22, 2007 at 09:28:39PM -0600, Thomas Braxton wrote:
> On 11/22/07, Oswald Buddenhagen <ossi@kde.org> wrote:
> > no, that code is correct. you want only direct children of a group.
> > e.g., if the hierarchy someparent/foo/blubb exists, you don't want
> > foo/blubb, only foo. that's correct even if foo itself does not
> > contain any entries.
> >
> Ok, so with this change to name() and changing the separator does this
> work now?
>
is there a reason to doubt it?
well, actually, there is, but that's something you did already. see
patch.
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
["kconfig-prefix.diff" (text/x-diff)]
commit 9b8af52e2a5a5e229b4270bf7a9b75631d41a6c4
Author: Oswald Buddenhagen <ossi@ugly.local>
Date: Fri Nov 23 01:18:28 2007 +0100
don't claim /bar to be a child of /foo when looking at /foobar.
diff --git a/config/kconfig.cpp b/config/kconfig.cpp
index 3b87d42..8acae13 100644
--- a/config/kconfig.cpp
+++ b/config/kconfig.cpp
@@ -167,12 +167,13 @@ QStringList KConfig::groupList() const
QStringList KConfigPrivate::groupList(const QByteArray& group) const
{
+ QByteArray theGroup = group + '\x1d';
QSet<QString> groups;
foreach (const KEntryKey& key, entryMap.keys())
- if (key.mKey.isNull() && key.mGroup.startsWith(group) && key.mGroup != group)
+ if (key.mKey.isNull() && key.mGroup.startsWith(theGroup))
{
- QString groupname = QString::fromUtf8(key.mGroup.mid(group.length()+1));
+ QString groupname = QString::fromUtf8(key.mGroup.mid(theGroup.length()));
groups << groupname.left(groupname.indexOf('\x1d'));
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic