I'm writing an open source application using KDE to sell in the Software Center. According to the requirements for uploading an application to the Software Center,
Write all configuration settings to ~/.config/ (This can be one file or a directory containing multiple configuration files)
By default, it appears that KDE applications store configuration files in
~/.kde/share/config/<name>rc. Is this not allowed? If so, how do I change where the file is stored? I'm using KConfig XT. The tutorial says
Start that file by opening the tag which controls which KConfig file the data will be stored in. There are three possibilities:
- If the
<kcfgfile>tag has no attributes the generated code will use the application's default KConfig file (normally
- The "name" attribute is used to manually specify a file name. If the value assigned to "name" is not an absolute file path, the file will be created in the default KDE config directory (normally
- If you would like to be able to specify the config file at construction time, use
<kcfgfile arg="true">. This causes the constructor of the generated class to take a
KSharedConfig::Ptras an argument, allowing you to construct multiple instances pointing to different files.
I've tried setting the
name attribute to be
~/.config/<appname>, but there is no file at that location, although settings are still being saved. Also, when I set the name attribute, other settings are still saved to
~/.kde/share/config/<appname>rc, such as window size.
How to I change where configuration data is stored for a KDE app so it will meet upload requirements for the Software Center?