Replace repetitive code in SettingsObjectWrapper.cpp by functions?

Dirk Hohndel dirk at hohndel.org
Sat Nov 18 16:52:10 PST 2017


> On Nov 18, 2017, at 11:17 AM, Berthold Stoeger <bstoeger at mail.tuwien.ac.at> wrote:
> 
> Thereby I noted two things:
> 
> 1) In getCloudURL() in core/qthelper.cpp, the cloud_storate_email_encoded 
> member is set, but it seems not to be written to disk.

I looked at that code recently and am struggling with the overall logic of it.
Right now I feel like I need to take a step back and really look at the overall
logic of how we manage user name and password - because as I read the
code as it is it confuses me (and I think I wrote a good part of this).

> 2) In uploadFinished() in core/cloudstorage.cpp, the cloud_storage_password 
> member is set, but it likewise seems not to be written to disk.

The password we should only store if that checkbox is ticked. 

> Are there some slot/signal subtleties that I'm missing or are these genuine 
> bugs?

I honestly don't know the answer right now and I won't have the time tonight
to dig into this. I'd be entirely unsurprised if there were some bugs in there.
IIRC part of the complication is that we allow URLs encoded as filenames and
those URLs can include user name and password encoded in the URL itself
(which is where the variable name originally came from - we supported git
storage for local repos before we added cloud storage).

Feel free to poke more at this. I'll add this to my near infinite todo list and
will try to dig deeper into it.

If you have time this weekend, one thing to try is to work through the different
code flows that can hit those functions and try to understand if possible the
data gets saved elsewhere.

Sorry to not be more helpful right now.

/D


More information about the subsurface mailing list