On Thu, Apr 10, 2014 at 7:19 PM, Dirk Hohndel <[email protected]> wrote:
> On Tue, 2014-04-08 at 14:11 +0200, Gehad wrote: > > On 04/07/2014 10:22 PM, Dirk Hohndel wrote: > > > > > I'd really like to have a prefs variable that tracks the currently > > > active prefs and only reference that anywhere in the code. The only > > > place that should mess with s.value should be preferences.cpp > > > > And when will the prefs be synchronized with the QSettings ? > > I found that some QSettings are changed in the middle of the code not > > only from preference window or at startup. > > instead of the writing of QSettings all over the place I'd rather do > this only in one space and have accessor functions that do the right > thing. Maybe I'm overthinking this, but whenever I try to figure out > something that's going wrong with preferences my eyes glaze over... > > /D > There are some functions in pref.h that I couldn't find their implementation I think they are not implemented, Right ? extern void subsurface_open_conf(void); extern void subsurface_set_conf(const char *name, const char *value); extern void subsurface_set_conf_bool(const char *name, bool value); extern void subsurface_set_conf_int(const char *name, int value); extern void subsurface_unset_conf(const char *name); extern const char *subsurface_get_conf(const char *name); extern int subsurface_get_conf_bool(const char *name); extern int subsurface_get_conf_int(const char *name); extern void subsurface_flush_conf(void); extern void subsurface_close_conf(void); Are those the accessor functions you were talking about ? also there is some macros defined in preferences.cpp they do a similar job to these functions, this is confusing me a little bit. I can work on this, But I don't understand how the whole thing is supposed to work. Thanks, Gehad.
_______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
