Preferences: more missing /

subsurface_webservice_uid ends up in the wrong group due missing
/. Notice that this does not fix the issues I mentioned in #1648.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2018-09-07 15:09:22 +02:00 committed by Dirk Hohndel
parent 56a77f0fa3
commit 2635673c3a

View file

@ -103,14 +103,14 @@ void qPrefCloudStorage::disk_userid(bool doSync)
{ {
if (doSync) { if (doSync) {
// always save in new position (part of cloud storage group) // always save in new position (part of cloud storage group)
qPrefPrivate::propSetValue(group + "subsurface_webservice_uid", prefs.userid, default_prefs.userid); qPrefPrivate::propSetValue(group + "/subsurface_webservice_uid", prefs.userid, default_prefs.userid);
} else { } else {
//WARNING: UserId was stored outside of any group. //WARNING: UserId was stored outside of any group.
// try to read from new location, if it fails read from old location // try to read from new location, if it fails read from old location
prefs.userid = copy_qstring(qPrefPrivate::propValue(group + "subsurface_webservice_uid", "NoUserIdHere").toString()); prefs.userid = copy_qstring(qPrefPrivate::propValue(group + "/subsurface_webservice_uid", "NoUserIdHere").toString());
if (QString(prefs.userid) == "NoUserIdHere") { if (QString(prefs.userid) == "NoUserIdHere") {
const QString group = QStringLiteral(""); const QString group = QStringLiteral("");
prefs.userid = copy_qstring(qPrefPrivate::propValue(group + "subsurface_webservice_uid", default_prefs.userid).toString()); prefs.userid = copy_qstring(qPrefPrivate::propValue(group + "/subsurface_webservice_uid", default_prefs.userid).toString());
} }
} }
} }