Fix changing shortcuts sometimes being lost
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:
- 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
- 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.