- /*TODO
- QDomDocument doc;
- QDomElement effect = m_effect.cloneNode().toElement();
- doc.appendChild(doc.importNode(effect, true));
- effect = doc.firstChild().toElement();
- effect.removeAttribute("kdenlive_ix");
- effect.setAttribute("id", name);
- effect.setAttribute("type", "custom");
- QDomElement effectname = effect.firstChildElement("name");
- effect.removeChild(effectname);
- effectname = doc.createElement("name");
- QDomText nametext = doc.createTextNode(name);
- effectname.appendChild(nametext);
- effect.insertBefore(effectname, QDomNode());
- QDomElement effectprops = effect.firstChildElement("properties");
- effectprops.setAttribute("id", name);
- effectprops.setAttribute("type", "custom");
+ QDomDocument doc = effectsData();
+ QDomElement base = doc.documentElement();
+ QDomNodeList effects = base.elementsByTagName("effect");
+ for (int i = 0; i < effects.count(); i++)
+ effects.at(i).toElement().removeAttribute("kdenlive_ix");
+
+ base.setAttribute("id", name);
+ base.setAttribute("type", "custom");