QSettings: hide the return type of actualKey() and normalizedKey()
It may change in the future. Change-Id: If65bf690b12d4e6474557d7a48567941b18413bf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
66d080af31
commit
ccdf9a73ce
@ -231,7 +231,7 @@ QSettingsPrivate::~QSettingsPrivate()
|
|||||||
|
|
||||||
QString QSettingsPrivate::actualKey(const QString &key) const
|
QString QSettingsPrivate::actualKey(const QString &key) const
|
||||||
{
|
{
|
||||||
QString n = normalizedKey(key);
|
auto n = normalizedKey(key);
|
||||||
Q_ASSERT_X(!n.isEmpty(), "QSettings", "empty key");
|
Q_ASSERT_X(!n.isEmpty(), "QSettings", "empty key");
|
||||||
return groupPrefix + n;
|
return groupPrefix + n;
|
||||||
}
|
}
|
||||||
@ -3148,8 +3148,7 @@ void QSettings::setValue(const QString &key, const QVariant &value)
|
|||||||
qWarning("QSettings::setValue: Empty key passed");
|
qWarning("QSettings::setValue: Empty key passed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString k = d->actualKey(key);
|
d->set(d->actualKey(key), value);
|
||||||
d->set(k, value);
|
|
||||||
d->requestUpdate();
|
d->requestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3214,8 +3213,7 @@ void QSettings::remove(const QString &key)
|
|||||||
bool QSettings::contains(const QString &key) const
|
bool QSettings::contains(const QString &key) const
|
||||||
{
|
{
|
||||||
Q_D(const QSettings);
|
Q_D(const QSettings);
|
||||||
QString k = d->actualKey(key);
|
return d->get(d->actualKey(key), nullptr);
|
||||||
return d->get(k, nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -3285,8 +3283,7 @@ QVariant QSettings::value(const QString &key, const QVariant &defaultValue) cons
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
QVariant result = defaultValue;
|
QVariant result = defaultValue;
|
||||||
QString k = d->actualKey(key);
|
d->get(d->actualKey(key), &result);
|
||||||
d->get(k, &result);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user