XMLGUI: preventing merges into a specific toolbar

Vladimir Prus ghost at cs.msu.su
Mon Apr 28 06:31:28 BST 2008


Is it possible, using XMLGUI to specify that a given toolbar defined 
by the application should never get any actions added from new xmlgui clients.
In other words, the toolbar should only have actions from applications's
actionCollection().

Here's what we have in kdevelui.rc now:

<ToolBar name="mainToolBar" position="Top" noMerge="1">
  <text>Main Toolbar</text>
  <Action name="file_new" />
</ToolBar>

When a new XMLGUI client is added via the call to KXMLGuiFactory::addClient,
new items appear in this toolbar, even though it has no merge point defined.
Looking at kxmlguifactory_p.cpp:BuilderHelper::processActionElement, it
appears the an action is added even if no merge point is found.

Is this a bug? If so, can it be fixed? If it's not a bug, how do I get
the behaviour I need? (I had written a code to achieve the desired effect
in KDevelop, but it's seriously scary).

Thanks,
Volodya




More information about the kde-core-devel mailing list