Using KConfig XT/KConfigDialogManager with "compound" dialogs
srhaque at iee.org
Sun May 1 03:47:04 BST 2005
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
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:
I then tried adding this to the settings dialog in kscd like this (error
handling removed for clarity):
KService::Ptr audiocd = KService::serviceByDesktopName("audiocd");
KCModule *m = KCModuleLoader::loadModule(info, KCModuleLoader::Inline);
KConfigSkeleton *cfg = new KConfigSkeleton(QString::fromLatin1
configDialog->addPage(m, cfg, i18n("CD Audio"), "audiocd", i18n("CD Audio
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'
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?
More information about the kde-core-devel