Fix the reloadOnChange setting
The setting allows the user to choose whether kgraphviewer should reload an open file when its content is changed on disk (the changes are tracked by a KDirWatch
instance). So far, while the setting value chosen in the settings dialog was saved, it was ignored by the relevant program mechanisms, so every time a file was changed, the user would be asked if they want to reload it.
The setting was implemented in the main program class, KGraphViewer
, but the reload logic is handled by DotGraphView
, which in turn is a part of KGraphViewerPart
. The proposed implementation adds a new KGraphViewer
signal, reloadOnChangeModeChanged()
, and connects it, through KGraphViewerPart
, to a new DotGraphView
method, setReloadOnChangeMode()
; thus every time the setting is changed, it is propagated to the interested parties. The setting is also read every time a new file is open. While the existing textual setting values ("ask"
, "true"
, "false"
) are still used in the configuration file, the implementation introduces and uses another way of expressing them, the KGraphViewerInterface::ReloadOnChangeMode
enum.
This patch conflicts, although hopefully in a minor way, with the pending Nicolas Fella’s Combine preferences into a single page (!3).