Ask / Submit
0

Where to place my custom app's configuration files?

asked 2014-08-04 14:48:12 +0300

vertoe gravatar image

I'm writing my custom app which has a settings tab. Now, I wish to save these settings persistent even if the app is closed. How should I do that?

My first Idea is to create a config file, like that in $HOME/.myapp/myapp.conf

# my settings
key = value

Is that the correct location? Is that the correct way to save settings persistent?

Is there anything else I should take care of? Are there any code examples/best practice hints?

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
2

answered 2014-08-04 16:22:14 +0300

Sthocs gravatar image

This is more a question for the devel ml, but as specified in Harbour FAQ, the correct directory to put you config files is $XDG_CONFIG_HOME/<HARBOUR_APP_NAME>, i.e. $HOME/.config/harbour-myapp/

If you are developing a Qt app, you can use QSettings (but put your app name as the Organization Name), or QStandardPaths.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2014-08-04 14:48:12 +0300

Seen: 104 times

Last updated: Aug 04 '14