forked from qt-creator/qt-creator
Utils: Pass settings key to BaseAspect::saveToMap
Makes the code on the user side somewhat more symmetric and is a bit more flexible, even if that's not used right now. Change-Id: I29a5182463ead0e4a39fcb51ecf4fdd5adf2a203 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -85,7 +85,7 @@ void BaseStringListAspect::fromMap(const QVariantMap &map)
|
||||
|
||||
void BaseStringListAspect::toMap(QVariantMap &data) const
|
||||
{
|
||||
saveToMap(data, m_value, QStringList());
|
||||
saveToMap(data, m_value, QStringList(), settingsKey());
|
||||
}
|
||||
|
||||
QStringList BaseStringListAspect::value() const
|
||||
|
||||
@@ -89,7 +89,7 @@ void BuildDirectoryAspect::toMap(QVariantMap &map) const
|
||||
StringAspect::toMap(map);
|
||||
if (!d->sourceDir.isEmpty()) {
|
||||
const FilePath shadowDir = isChecked() ? filePath() : d->savedShadowBuildDir;
|
||||
saveToMap(map, shadowDir.toString(), QString(), ".shadowDir");
|
||||
saveToMap(map, shadowDir.toString(), QString(), settingsKey() + ".shadowDir");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -235,8 +235,8 @@ void WorkingDirectoryAspect::toMap(QVariantMap &data) const
|
||||
{
|
||||
const QString wd = m_workingDirectory == m_defaultWorkingDirectory
|
||||
? QString() : m_workingDirectory.toString();
|
||||
saveToMap(data, wd, QString());
|
||||
saveToMap(data, m_defaultWorkingDirectory.toString(), QString(), ".default");
|
||||
saveToMap(data, wd, QString(), settingsKey());
|
||||
saveToMap(data, m_defaultWorkingDirectory.toString(), QString(), settingsKey() + ".default");
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -411,8 +411,8 @@ void ArgumentsAspect::fromMap(const QVariantMap &map)
|
||||
*/
|
||||
void ArgumentsAspect::toMap(QVariantMap &map) const
|
||||
{
|
||||
saveToMap(map, m_arguments, QString());
|
||||
saveToMap(map, m_multiLine, false, ".multi");
|
||||
saveToMap(map, m_arguments, QString(), settingsKey());
|
||||
saveToMap(map, m_multiLine, false, settingsKey() + ".multi");
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -177,7 +177,7 @@ void InterpreterAspect::fromMap(const QVariantMap &map)
|
||||
|
||||
void InterpreterAspect::toMap(QVariantMap &map) const
|
||||
{
|
||||
saveToMap(map, m_currentId, QString());
|
||||
saveToMap(map, m_currentId, QString(), settingsKey());
|
||||
}
|
||||
|
||||
void InterpreterAspect::addToLayout(LayoutBuilder &builder)
|
||||
|
||||
Reference in New Issue
Block a user