Commit eafa8bf5 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Set noMerge=1 for menus when saving the xml file in kedittoolbar

As discussed with David add a noMerge=1 to xmlgui menus when saving them due to a edit toolbar action

REVIEW: 106535
BUGS: 306258
FIXED-IN: 4.9.2
parent b78a77e9
...@@ -823,6 +823,16 @@ bool KEditToolBarWidget::save() ...@@ -823,6 +823,16 @@ bool KEditToolBarWidget::save()
if ( (*it).type() == XmlData::Merged ) if ( (*it).type() == XmlData::Merged )
continue; continue;
// Add noMerge="1" to all the menus since we are saving the merged data
QDomNodeList menuNodes = (*it).domDocument().elementsByTagName( "Menu" );
for (uint i = 0; i < menuNodes.length(); ++i)
{
QDomNode menuNode = menuNodes.item(i);
QDomElement menuElement = menuNode.toElement();
if (menuElement.isNull()) continue;
menuElement.setAttribute( "noMerge", "1" );
}
kDebug() << (*it).domDocument().toString(); kDebug() << (*it).domDocument().toString();
kDebug(240) << "Saving " << (*it).xmlFile(); kDebug(240) << "Saving " << (*it).xmlFile();
......
Supports Markdown
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