forked from qt-creator/qt-creator
Vcs: allow settings to read legacy data
As advised with Tobias, having a "read legacy" annex function to readSettings() is the simplest solution for backward compatibility with old VCS settings. readLegacySettings() is useful when refactoring a Vcs settings class to make it inherit VcsBaseClientSettings. Change-Id: I96e3f67921f607bf010688d023098114e0e91035 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -254,6 +254,8 @@ void VcsBaseClientSettings::readSettings(const QSettings *settings)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this->readLegacySettings(settings);
|
||||
}
|
||||
|
||||
bool VcsBaseClientSettings::equals(const VcsBaseClientSettings &rhs) const
|
||||
@@ -381,4 +383,9 @@ QVariant VcsBaseClientSettings::keyDefaultValue(const QString &key) const
|
||||
return QVariant(valueType(key));
|
||||
}
|
||||
|
||||
void VcsBaseClientSettings::readLegacySettings(const QSettings *settings)
|
||||
{
|
||||
Q_UNUSED(settings);
|
||||
}
|
||||
|
||||
} // namespace VcsBase
|
||||
|
||||
Reference in New Issue
Block a user