aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/icodestylepreferences.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-01-28 18:48:32 +0100
committerhjk <hjk@qt.io>2020-01-29 06:30:48 +0000
commit2c865a771c1b9f6f2b8d32fc127ee0b29fda66c4 (patch)
tree5ee64746a0923fdd5c4b1941cccb6739d68aef44 /src/plugins/texteditor/icodestylepreferences.cpp
parente0c76647cecb13d6afd054ec6e22cc9e66df43b2 (diff)
TextEditor: De-noise ICodeStylePreferences setup a bit
Change-Id: I6c3fcbb6ef17c7ca5771326b1444f057cc150e3d Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/icodestylepreferences.cpp')
-rw-r--r--src/plugins/texteditor/icodestylepreferences.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/texteditor/icodestylepreferences.cpp b/src/plugins/texteditor/icodestylepreferences.cpp
index bebd25f29f..7d7aa14fd9 100644
--- a/src/plugins/texteditor/icodestylepreferences.cpp
+++ b/src/plugins/texteditor/icodestylepreferences.cpp
@@ -46,10 +46,10 @@ public:
QByteArray m_id;
QString m_displayName;
bool m_readOnly = false;
+ QString m_settingsSuffix;
};
}
-}
ICodeStylePreferences::ICodeStylePreferences(QObject *parent) :
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