Document that later <set>-elements will override earlier ones.

parent dd3d55da
......@@ -50,6 +50,7 @@ as Authors, publish date, the abstract, and Keywords -->
<year>2012</year>
<year>2013</year>
<year>2014</year>
<year>2015</year>
<holder>Thomas Friedrichsmeier</holder>
</copyright>
<!-- Translators: put here the copyright notice of the translation -->
......@@ -57,7 +58,7 @@ as Authors, publish date, the abstract, and Keywords -->
and in the FDL itself on how to use it. -->
<legalnotice>&FDLNotice;</legalnotice>
<date>2014-12-18</date>
<date>2015-01-22</date>
<releaseinfo>0.6.300</releaseinfo>
<abstract>
......@@ -3324,7 +3325,9 @@ Child-elements:
<varlistentry>
<term>&lt;set&gt;</term>
<listitem><para>Set a property to a fixed value (of course, if you additionally connect the property to some other property, the value does not remain fixed). For instance, if you embed a plugin, but want to hide some of its elements, you might set the visibility property of those elements to false. Useful esp. for embedded/embedding plugins. Attributes:
<listitem><para>Set a property to a fixed value (of course, if you additionally connect the property to some other property, the value does not remain fixed). For instance, if you embed a plugin, but want to hide some of its elements, you might set the visibility property of those elements to false. Useful esp. for embedded/embedding plugins. Note: If there are several &lt;set&gt; elements
for a single <parameter>id</parameter>, the latest one to be defined takes precendence. This will sometimes be useful to rely on when using &lt;include&gt;d parts.
Attributes:
<variablelist>
<varlistentry>
<term><parameter>id</parameter></term>
......
......@@ -710,11 +710,6 @@ void RKComponentBuilder::parseLogic (const QDomElement &element, XMLHelper &xml,
addConnection (xml.getStringAttribute (*it, "client", "#noid#", DL_WARNING), QString::null, xml.getStringAttribute (*it, "governor", "#noid#", DL_WARNING), QString::null, xml.getBoolAttribute (*it, "reconcile", false, DL_INFO), element);
}
// find initialize elements
children = xml.getChildElements (element, "set", DL_INFO);
for (it = children.constBegin (); it != children.constEnd (); ++it) {
initial_values.insert (xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING), xml.getStringAttribute (*it, "to", "false", DL_WARNING));
}
children = xml.getChildElements (element, "dependency_check", DL_INFO);
for (it = children.constBegin (); it != children.constEnd (); ++it) {
RKComponentPropertyBool *dep = new RKComponentPropertyBool (component (), false);
......@@ -736,7 +731,13 @@ void RKComponentBuilder::parseLogic (const QDomElement &element, XMLHelper &xml,
if (!dummy.isNull ()) {
initial_values.insert (id, dummy);
}
// TODO add more options
}
// find initialize elements
children = xml.getChildElements (element, "set", DL_INFO);
for (it = children.constBegin (); it != children.constEnd (); ++it) {
// NOTE: It is by design that if there are several initializations for a single id, the latest one takes precedence. Useful in some cases of inclusion.
initial_values.insert (xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING), xml.getStringAttribute (*it, "to", "false", DL_WARNING));
}
// find convert elements
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment