Skip to content

Fix changing shortcuts sometimes being lost

Albert Astals Cid requested to merge work/aacid/shorcutslost_2008 into release/20.12

When they were lost:

  • Open okular
  • Open two files as tabs in okular
  • Set the shortcut for toggle colors
  • Activate the shortcut for toggle colors
  • The shortcut would get lost or reverted to its old value

This is more a workaround than a fix, the issue as i see it is two fold:

  1. KActionCollectionPrivate::writeKXMLGUIConfigFile writes to disk but does not flush the cache in KXMLGUIClient so if you call KXMLGUIFactory::refreshActionProperties, the old on memory XML is used to reset the shortcuts
  2. When calling KParts::MainWindow::createGUI that ends up calling KXMLGUIFactory::addClient the same situation happens, if the shortcuts have been modified in another part, the shorcuts would need refreshing.

BUGS: 384700 BUGS: 411492

Merge request reports

Loading