correctly using the preferences wrapper objects

Dirk Hohndel dirk at
Sat Jul 30 12:58:51 PDT 2016


Would you create a short writeup how the wrapper objects should be used?
I'll admit that I feel less then clear about this right now.

For each of the seperate types, should there be only one instance of these
objects in the running application? Or can any class create their own
wrapper object and things will still work correctly (somehow I doubt that,
looking at the way this seems to work with the change notifications).

But if it's a single instance only, then why aren't there instance()
functions for them?

I guess I'm confused :-(

My example:

cloudstorage.cpp creates a CloudStorageSettings object and uses that to
make sure that the verification status is maintained correctly. But
another part of the CloudStorageSettings is prefs.git_local_only /
CloudStorageSettings::gitLocalOnly() - and that needs to be accessed from
multiple locations.

So if I want to connect a function with the gitLocalOnlyChanged() signal
(which, oh, btw, currently isn't sent when that preference is changed),
then how do I do this? Clearly creating a separate object isn't going to
do the right thing... so I think this needs to indeed be a glabal



More information about the subsurface mailing list