Current problematic status:
If we do not change anything, Okular config files will stay in several different locations (same issue we had with Kleopatra):
%LOCALAPPDATA% (okularrc), %APPDATA%/okular (okularstaterc) and %LOCALAPPDATA%/okular/docdata
Currently, in Gpg4win 5 (and in VSD 3.4 if T7700 is done) all Qt-programs are configured via qt.conf to use %GNUPGHOME%/kleopatra if they set GNUPGHOME. Which Kleopatra does, Okular doesn't.
So if we want to move the Okular config files by setting GNUPGHOME there, too, or if a global GNUPGHOME is set, %GNUPGHOME%/kleopatra is the folder where the config files will go.
Which is fine when we only have Kleopatra. But where do we want to store those application related files for Okular?
Suggestions to use for both Kleopatra and Okular:
- %GNUPGHOME%/kleopatra (i.e. leave as-is)
- %GNUPGHOME%/kde (i.e. use a more generic name; kleopatragroupsrc could stay in %GNUPGHOME%/kleopatra or move here, too)
Note: A location that depends on the application name (e.g. %GNUPGHOME%/$applicationname) might seem nicer, but it would require extending our patch for QStandardPaths. Moreover, it will cause problems if config files need to be shared (which, at the moment, doesn't seem necessary).
For the solution we want to implement see T7717#208938
For hints for testing see T7717#209211
Copied from T7700: Kleopatra: Move kleopatrarc away from %LOCALAPPDATA% (with adjustment to new file locations):
For reference for testing:
- In VSD 3.1.26 < 3.3.0, Kleopatra uses the following config files
- %LOCALAPPDATA%/kxmlgui5/kleopatra/kleopatra.rc -> move/migrate
- %LOCALAPPDATA%/klanguageoverridesrc -> move/migrate
- %LOCALAPPDATA%/kleopatrarc -> move/migrate
- %APPDATA%/kleopatra/kleopatrastaterc -> move/migrate
- %LOCALAPPDATA%/kleopatragroupsrc -> move/migrate
- In VSD 3.3.0, Kleopatra uses the following config files
- %LOCALAPPDATA%/kxmlgui5/kleopatra/kleopatra.rc -> move/migrate
- %LOCALAPPDATA%/klanguageoverridesrc -> move/migrate
- %LOCALAPPDATA%/kleopatrarc -> move/migrate
- %APPDATA%/kleopatra/kleopatrastaterc -> move/migrate
- %APPDATA%/gnupg/kleopatra/kleopatragroupsrc -> this is the desired location; if future VSDs use %APPDATA%/gnupg-vsd then they need to migrate everything from %APPDATA%/gnupg to %APPDATA%/gnupg-vsd, i.e. kleopatra doesn't need to care for this
- In GPD 4.3.0, Kleopatra uses the following config files
- %LOCALAPPDATA%/kxmlgui5/kleopatra/kleopatra.rc -> move/migrate
- %LOCALAPPDATA%/klanguageoverridesrc -> move/migrate
- %LOCALAPPDATA%/kleopatragroupsrc -> move/migrate
- %LOCALAPPDATA%/kleopatrarc -> move/migrate
- %APPDATA%/kleopatra/kleopatrastaterc -> move/migrate
- In Gpg4win 4.3.1, Kleopatra uses the following config files
- %APPDATA%/kleopatra/kxmlgui5/kleopatra/kleopatra.rc -> move/migrate
- %APPDATA%/kleopatra/klanguageoverridesrc -> move/migrate
- %APPDATA%/kleopatra/kleopatragroupsrc -> move/migrate
- %APPDATA%/kleopatra/kleopatrarc -> move/migrate
- %APPDATA%/kleopatra/kleopatrastaterc -> move/migrate
- In Gpg4win 4.4.1, Kleopatra uses the following config files
- %APPDATA%/gnupg/kleopatra/kleopatragroupsrc -> OK
- %APPDATA%/kleopatra/kxmlgui5/kleopatra/kleopatra.rc -> move/migrate
- %APPDATA%/kleopatra/klanguageoverridesrc -> move/migrate
- %APPDATA%/kleopatra/kleopatrarc -> move/migrate
- %APPDATA%/kleopatra/kleopatrastaterc -> move/migrate
- In VSD 3.4 and Gpg4win 5.0 all config files used by Kleopatra shall be in/under see T7717#208938 and T7717#209211 .
Further notes for testing:
- How to create some of the config files with the old versions:
- Add an action to the toolbar (e.g. About Kleopatra) to get the file kxmlgui5/kleopatra/kleopatra.rc.
- Configure a different language to get the file klanguageoverridesrc.
- Create a group to get the file kleopatragroupsrc.
- In VSD 3.4+ the old config files should be migrated to the following locations/names:
- kxmlgui5/kleopatra/kleopatra.rc -> %APPDATA%/kleopatra-vsd/kxmlgui5/kleopatra-vsd/kleopatra.rc
- klanguageoverridesrc -> %APPDATA%/kleopatra-vsd/klanguageoverridesrc
- kleopatrarc -> %APPDATA%/kleopatra-vsd/kleopatra-vsdrc
- kleopatrastaterc -> %LOCALAPPDATA%/kleopatra-vsd/State/kleopatra-vsdstaterc
- kleopatragroupsrc -> %GNUPGHOME%/kleopatra/kleopatragroupsrc
- In GPD 4.4+ the old config files should be migrated to the following locations/names:
- kxmlgui5/kleopatra/kleopatra.rc -> %APPDATA%/kleopatra-gpd/kxmlgui5/kleopatra-gpd/kleopatra.rc
- klanguageoverridesrc -> %APPDATA%/kleopatra-gpd/klanguageoverridesrc
- kleopatrarc -> %APPDATA%/kleopatra-gpd/kleopatra-gpdrc
- kleopatrastaterc -> %LOCALAPPDATA%/kleopatra-gpd/State/kleopatra-gpdstaterc
- kleopatragroupsrc -> %GNUPGHOME%/kleopatra/kleopatragroupsrc
- In Gpg4win 5.0+ the old config files should be migrated to the following locations/names:
- kxmlgui5/kleopatra/kleopatra.rc -> %APPDATA%/kleopatra/kxmlgui5/kleopatra/kleopatra.rc
- klanguageoverridesrc -> %APPDATA%/kleopatra/klanguageoverridesrc
- kleopatrarc -> %APPDATA%/kleopatra/kleopatrarc
- kleopatrastaterc -> %LOCALAPPDATA%/kleopatra/State/kleopatrastaterc
- kleopatragroupsrc -> %GNUPGHOME%/kleopatra/kleopatragroupsrc