Commit 4b40aa5b authored by Tobias Hunger's avatar Tobias Hunger

SettingsAccessorPrivate::Settings: Remove clear() method

None of the callers need anything beyond ::map.clear()

Change-Id: I8296d04019f58e0c2fceb672a0e717146b91c1a7
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 67a2732b
......@@ -419,7 +419,6 @@ public:
Settings() {}
Settings(const QVariantMap &map) : map(map) {}
void clear();
bool isValid() const;
QVariantMap map;
......@@ -814,7 +813,7 @@ QVariantMap SettingsAccessor::readUserSettings(QWidget *parent) const
msgBox.setDefaultButton(QMessageBox::No);
msgBox.setEscapeButton(QMessageBox::No);
if (msgBox.exec() == QMessageBox::No)
result.clear();
result.map.clear();
} else if ((result.path.toString() != defaultFileName(m_userSuffix))
&& (versionFromMap(result.map) < currentVersion())) {
QMessageBox::information(
......@@ -863,7 +862,7 @@ QVariantMap SettingsAccessor::readSharedSettings(QWidget *parent) const
msgBox.setDefaultButton(QMessageBox::No);
msgBox.setEscapeButton(QMessageBox::No);
if (msgBox.exec() == QMessageBox::No)
sharedSettings.clear();
sharedSettings.map.clear();
else
sharedSettings.map = setVersionInMap(sharedSettings.map, currentVersion());
}
......@@ -877,7 +876,6 @@ SettingsAccessorPrivate::Settings SettingsAccessorPrivate::bestSettings(const Se
Settings tmp;
foreach (const QString &file, candidates) {
tmp.clear();
tmp.path = FileName::fromString(file);
tmp.map = accessor->readFile(tmp.path);
if (tmp.map.isEmpty())
......@@ -940,12 +938,6 @@ QVariantMap SettingsAccessor::mergeSettings(const QVariantMap &userMap,
// -------------------------------------------------------------------------
// SettingsData
// -------------------------------------------------------------------------
void SettingsAccessorPrivate::Settings::clear()
{
map.clear();
path.clear();
}
bool SettingsAccessorPrivate::Settings::isValid() const
{
return SettingsAccessor::versionFromMap(map) > -1 && !path.isEmpty();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment