TextEditor: De-noise ICodeStylePreferences setup a bit

Change-Id: I6c3fcbb6ef17c7ca5771326b1444f057cc150e3d
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2020-01-28 18:48:32 +01:00
parent e0c76647ce
commit 2c865a771c
9 changed files with 16 additions and 45 deletions

View File

@@ -46,9 +46,9 @@ public:
QByteArray m_id;
QString m_displayName;
bool m_readOnly = false;
QString m_settingsSuffix;
};
}
}
ICodeStylePreferences::ICodeStylePreferences(QObject *parent) :
@@ -206,14 +206,19 @@ void ICodeStylePreferences::setCurrentDelegate(const QByteArray &id)
setCurrentDelegate(d->m_pool->codeStyle(id));
}
void ICodeStylePreferences::setSettingsSuffix(const QString &suffix)
{
d->m_settingsSuffix = suffix;
}
void ICodeStylePreferences::toSettings(const QString &category, QSettings *s) const
{
Utils::toSettings(settingsSuffix(), category, s, this);
Utils::toSettings(d->m_settingsSuffix, category, s, this);
}
void ICodeStylePreferences::fromSettings(const QString &category, const QSettings *s)
{
Utils::fromSettings(settingsSuffix(), category, s, this);
Utils::fromSettings(d->m_settingsSuffix, category, s, this);
}
void ICodeStylePreferences::toMap(const QString &prefix, QVariantMap *map) const
@@ -268,3 +273,4 @@ void ICodeStylePreferences::codeStyleRemoved(ICodeStylePreferences *preferences)
}
}
} // TextEditor