[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Using KConfig XT/KConfigDialogManager with "compound" dialogs
From: Shaheed <srhaque () iee ! org>
Date: 2005-05-01 2:47:04
Message-ID: 200505010347.04990.srhaque () iee ! org
[Download RAW message or body]
Hi,
I'm having a bit of trouble working out how to use KConfig XT with
KConfigDialogManager, in the case where the actual dialog pages are
dynamically built up from a fixed set of tabs plus a run-time generated set
of tabs.
The specific case is kdemultimedia/kioslave/audiocd/kcmaudiocd. Here, I
recently converted the fixed tabs to KConfigXT, and the per-encoder tabs
(which already used KConfigXT) are added at run time depending on what the
user has available. The net result is that the complete audiocd KCM module is
represented by upto three rc files:
kcmaudiocdrc
kcmaudiocd_encoder_lame_rc
kcmaudiocd_encoder_vorbis_rc
I then tried adding this to the settings dialog in kscd like this (error
handling removed for clarity):
KService::Ptr audiocd = KService::serviceByDesktopName("audiocd");
KCModuleInfo info(audiocd->desktopEntryPath());
KCModule *m = KCModuleLoader::loadModule(info, KCModuleLoader::Inline);
KConfigSkeleton *cfg = new KConfigSkeleton(QString::fromLatin1
("kcmaudiocdrc"));
configDialog->addPage(m, cfg, i18n("CD Audio"), "audiocd", i18n("CD Audio
Configuration"));
Notice first that I only get to refer to one of the rc files. But even given
the one I specified, I get this warning followed by an assertion on the
following line 219:
kdecore (KConfigDialogManager): WARNING: A widget named 'kcfg_replaceInput'
was found but there is no setting named 'replaceInput'
kscd: /home/srhaque/kdecvs/kdelibs/kdecore/kconfigdialogmanager.cpp:219: bool
KConfigDialogManager::parseChildren(const QWidget*, bool): Assertion `false'
failed.
Firstly, what am I doing wrong with the config for the fixed tabs? Secondly,
is there any way to make the dynamic tabs work since I have no way to specify
the extra rc files?
Thanks, Shaheed
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic