Skip to content

Store the state of the builtin annotations in a new config key

Simone Gaiarin requested to merge gaiarin/okular:fix-425354 into release/20.08

Using the new configuration key BuiltinAnnotationTools instead of AnnotationTools, we avoid any conflicts in the configuration files due to the fact that the key AnnotationTools had a different meaning in the previous versions of Okular. In particular we avoid the critical problem that the actions in the UI do not match the actual annotation tools. The conflict may happen if the kconf_update script is not executed for some reason (e.g. okular running from flatpack).

Test plan

  • Remove ~/.config/okularpartrc and check that when a setting (e.g. color) of a builtin annotation is changed, the key BuiltinAnnotationTools is created in ~/.config/okularpartrc and the state of the builtin annotation is retained after restarting okular
  • Coming from a version of ~/.config/okularpartrc pre 1.11.0 where only the key AnnotationTools is present: kconf_update script is executed and it migrates the key AnnotationToolsto QuickAnnotationTools
  • Coming from a version of ~/.config/okularpartrc 1.11.1 (where the rule annotation-toolbar has already been executed) where both the key AnnotationTools and QuickAnnoationTools are present: kconf_update script is executed and it removes the key AnnotationTools without touching QuickAnnotationTools

BUG: 425354

FIXED-IN: 1.11.1

Merge request reports