Utils: Rename most FilePath::{from,to}Variant uses to {from,to}Settings

Specifies the main purpose more clearly. The remaining ones a "true"
(internal) variants in models and as action data.

Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-01-03 12:31:52 +01:00
parent ca4af940b1
commit 66c08a824d
59 changed files with 154 additions and 139 deletions

View File

@@ -93,8 +93,8 @@ void GerritParameters::toSettings(QSettings *s) const
s->setValue(userKeyC, server.user.userName);
s->setValue(portKeyC, server.port);
s->setValue(portFlagKeyC, portFlag);
s->setValue(sshKeyC, ssh.toVariant());
s->setValue(curlKeyC, curl.toVariant());
s->setValue(sshKeyC, ssh.toSettings());
s->setValue(curlKeyC, curl.toSettings());
s->setValue(httpsKeyC, https);
s->endGroup();
}
@@ -111,8 +111,8 @@ void GerritParameters::fromSettings(const QSettings *s)
const QString rootKey = QLatin1String(settingsGroupC) + '/';
server.host = s->value(rootKey + hostKeyC, GerritServer::defaultHost()).toString();
server.user.userName = s->value(rootKey + userKeyC, QString()).toString();
ssh = FilePath::fromVariant(s->value(rootKey + sshKeyC, QString()));
curl = FilePath::fromVariant(s->value(rootKey + curlKeyC));
ssh = FilePath::fromSettings(s->value(rootKey + sshKeyC, QString()));
curl = FilePath::fromSettings(s->value(rootKey + curlKeyC));
server.port = ushort(s->value(rootKey + portKeyC, QVariant(GerritServer::defaultPort)).toInt());
portFlag = s->value(rootKey + portFlagKeyC, defaultPortFlag).toString();
savedQueries = s->value(rootKey + savedQueriesKeyC, QString()).toString()