Using KConfig XT/KConfigDialogManager with "compound" dialogs
srhaque at iee.org
Sun May 1 19:24:24 BST 2005
On Sunday 01 May 2005 03:47, Shaheed wrote:
> 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:
> 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
> 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?
Sleeping on it, it seems that the right answer to the second question is to
merge the three rc files. But I'm still baffled on the first question...
More information about the kde-core-devel