KActionCollection::writeSetting and kxmlgui

Michael Jansen kde at michael-jansen.biz
Mon Mar 3 23:42:43 GMT 2008


Can someone explain to me the difference between the implementation and the explanation? Why does kxmlgui hijack the writeSettings method and does something completly different? 
Ignoring the parameters given? The first line goes on to rewrite the xmlfile and returns.

I would say that's bad behavior :-))

How can we fix that? It can't stay that way in my opinion.


    * Write the current configurable key associations to @p config,
    * or (if @p config is zero) to the application's
    * configuration file.
    * \param config Config object to save to, or null to use the application's config object.
    * \param writeDefaults set to true to write settings which are already at defaults.
    * \param oneAction pass an action here if you just want to save the values for one action, eg.
    *                  if you know that action is the only one which has changed.
  void writeSettings( KConfigGroup* config = 0, bool writeDefaults = false, QAction* oneAction = 0 ) const;


> void KActionCollection::writeSettings( KConfigGroup* config, bool writeAll, QAction* oneAction ) const
> {
>   if (parentGUIClient() && !parentGUIClient()->xmlFile().isEmpty()) {
>   kDebug(129) << "xmlFile=" << parentGUIClient()->xmlFile();

Michael Jansen
Available for contract work ( Development / Configuration Management )

More information about the kde-core-devel mailing list