KCModuleInfo (Was: Strange problem with KControl)
Waldo Bastian
bastian at kde.org
Wed Sep 3 13:16:54 BST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 03 September 2003 13:39, Matthias Kretz wrote:
> To the KServiceGroup thing:
> You mean, that the _groups variable should be read from
> KServiceGroup::baseGroupName()? (/me didn't see that method before, so we
> could probably get rid of X-KDE-Groups)
Well, I'm still not quite sure what the groups variable is supposed to mean in
KModuleInfo or why you would like to store that kind of info in KCModuleInfo
in the first place.
KServiceGroup::baseGroupName allows you to identify a service group such as
"Settings/Screensavers" by a unique name (e.g. "screensavers") so that when
"Settings/Screensavers" gets moved around to "Settings/LookNFeel/
Screensavers" we can still find it back by its unique name.
I don't think that is what you are looking for.
In kdebase/kcontrol/kcontrol/modules.cpp
ConfigModuleList::readDesktopEntriesRecursive(const QString &path)
the location in the visual tree is given by "path".
The following hackish patch makes it work somewhat again:
- --- modules.cpp 1 Sep 2003 18:08:14 -0000 1.49
+++ modules.cpp 3 Sep 2003 12:09:20 -0000
@@ -266,6 +266,12 @@
if (p->isType(KST_KService))
{
ConfigModule *module = new ConfigModule(p->entryPath(), KCGlobal::
baseGroup());
+ QString tmp = path;
+ if (tmp.endsWith("/"))
+ tmp.truncate(tmp.length()-1);
+ QStringList groups;
+ groups.append(tmp);
+ module->setGroups(groups);
append(module);
}
else if (p->isType(KST_KServiceGroup))
Cheers,
Waldo
- --
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/Vdu2N4pvrENfboIRAuozAKCGD7n1qI9aGZCwZI/LLmOah2s+SACfaYIF
5a9+yHEH8ialn/wbOQjWcuo=
=INiZ
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list