parametrized entries in kcfg files are set to immutable...

Reinhold Kainhofer reinhold at kainhofer.com
Sat Mar 6 18:40:56 GMT 2004


Hi, I'm having a problem with parametrized entries in KConfigXT: In KPilot's 
addressbook conduit we have four Custom fields, where the user can choose 
among possible values of an enum. The corresponding part in the .kcfg file 
(kdepim/kpilot/conduits/abbrowserconduit/abbrowserconduit.kcfg) is:

<entry name="Custom$(customIndex)" key="Custom $(customIndex)" type="Enum">
  <parameter name="customIndex" type="Int" max="3"/>
  <choices label="eCustomEnum">
    <choice name="eCustomField"/>
    <choice name="eCustomBirthdate"/>
    <choice name="eCustomURL"/>
    <choice name="eCustomIM"/>
  </choices>
  <label></label>
  <default>eCustomField</default>
</entry>


Accessing the config entries via custom(0) works fine. Now, whenever I do a 
setCustom(0, ...), nothing changes. I inserted a few debug statements into 
the generated abbrowserSettings.h (in the static void setCustom(int i, int v) 
function) and found that the "Custom" item is set to immutable:

static
void setCustom( int i, int v )
{
	if (!self()->isImmutable( "Custom" ))
		self()->mCustom[i] = v;
}

The isImmutable always returns true, and the item is not changed! Am I doing 
something wrong, or is this a bug somewhere in kconfigXT or kconfigSkeleton?

Thanks for any help,
Reinhold





More information about the kde-core-devel mailing list