Thought about a Qt port

Lubomir I. Ivanov neolit123 at gmail.com
Sun Mar 31 06:00:29 PDT 2013


On 30 March 2013 23:25, Alberto Mardegan <mardy at users.sourceforge.net> wrote:
> On 03/30/2013 07:40 PM, Dirk Hohndel wrote:
> Changing topic: currently, there are three files which are used to
> implement the functions which read/write the application settings:
>   linux.c (GConf)
>   windows.c (registry)
>   macos.c (CFPreferences)
> Do we want to keep them, or use the QSettings class [0]? QSettings uses
> the Windows Registry in win32 and the CFPreferences API in OSX, and I
> believe it should be possible to configure the paths in such a way to
> match the current ones. However, in Linux it uses plain .ini files (by
> default, stored under ~/.config/<company>/<application>.conf, IIRC, but
> it can be changed).
> Given that subsurface isn't sharing its data with other applications, I
> don't see a strong reason to prefer using GConf (or GSettings) to
> ~/.config/subsurface.conf; however, we'd need to address the problem of
> migrating the existing user's configuration there (*if* it is a problem;
> maybe we can just apologize and ask the Linux users to reconfigure the
> app?).
> This probably is a bit premature, but it can have an impact on how the
> UI stores the configuration (in any case the C API in pref.h would stay,
> if it's used by other C files).
>

reading on QSettings,

how about using QSettings::IniFormat for portability of the config
across OS and store to the default suggested locations?
http://harmattan-dev.nokia.com/docs/library/html/qt4/qsettings.html#setPath

this way, if the config gets huge or complicated at some point i can
just copy the .ini file from an OSX box to a Linux box and it will
"just work"?

i side question, we also load/store a file to the application data
folder (on Windows that is SHGetFolderPath(NULL, CSIDL_APPDATA, ...)
or e.g "user/appData/roaming/subsurface/"). so what should be used
here in a portable manner - QDesktopServices::DataLocation?

lubomir
--


More information about the subsurface mailing list