Refactor Locator filter settings saving

Unify setting saving. Do not write settings that stay at the default, so
defaults could change and take effect.

For this we explicitly differentiate between default and user settings.
Make QJsonDocument the basis for saving settings, because QDataStream
cannot really handle structured data where parts could be missing.

Write locator settings to a different settings group, so we do not
destroy reading older settings from older Qt Creator versions.

Task-number: QTCREATORBUG-24762
Change-Id: I5909e2d79313f6fc26159bb644fdfb43781b6c38
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2021-01-26 16:31:12 +01:00
parent b47a80c5ce
commit cb96b91dd4
37 changed files with 398 additions and 201 deletions

View File

@@ -44,8 +44,8 @@ FunctionFilter::FunctionFilter(LocatorData *data, QObject *parent)
{
setId("Functions");
setDisplayName(tr("QML Functions"));
setShortcutString("m");
setIncludedByDefault(false);
setDefaultShortcutString("m");
setDefaultIncludedByDefault(false);
}
FunctionFilter::~FunctionFilter() = default;