maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Help me to code for Sailfish OS (https://talk.maemo.org/showthread.php?t=100817)

peterleinchen 2020-11-06 22:03

Re: Help me to code for Sailfish OS
 
You mean like ?
Code:

dconf dump /

Markkyboy 2020-11-07 07:35

Re: Help me to code for Sailfish OS
 
as per the response from peterleinchen, you can also output to file;

Code:

dconf dump / > dconf-output.txt

aerique 2020-12-05 16:10

Re: Help me to code for Sailfish OS
 
What's the proper way to store an apps settings?

For my current (and first) app I'm for now just grabbing the `$HOME` environment variable and stuff a file in `$HOME/.config/app/settings`, but this is just for local dev and testing.

Once I'm distributing it through OpenRepos I'd like to do it the proper way (if there is one).

edit: Thanks for the hint, coderus. I've gone with:
Code:

QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)

coderus 2020-12-05 17:06

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by aerique (Post 1570411)
What's the proper way to store an apps settings?

For my current (and first) app I'm for now just grabbing the `$HOME` environment variable and stuff a file in `$HOME/.config/app/settings`, but this is just for local dev and testing.

Once I'm distributing it through OpenRepos I'd like to do it the proper way (if there is one).

https://doc.qt.io/archives/qt-5.6/qstandardpaths.html

Code:

QStandardPaths::writableLocation(QStandardPaths::DataLocation)
If you use QSettings class it will automatically create file in correct location.


All times are GMT. The time now is 16:32.

vBulletin® Version 3.8.8