QtSupport: Use new settings API

Avoid writing defaults to the settings.

Task-number: QTCREATORBUG-24430
Change-Id: Ic068ade0d34a66e1baf067d90d63e01b0d0e73c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2021-01-20 15:10:46 +01:00
parent 89f2c274c0
commit 02a27a9bb6
3 changed files with 38 additions and 20 deletions

View File

@@ -662,7 +662,7 @@ void QtVersionManager::setDocumentationSetting(const QtVersionManager::Documenta
{
if (setting == documentationSetting())
return;
Core::ICore::settings()->setValue(DOCUMENTATION_SETTING_KEY, int(setting));
Core::ICore::settings()->setValueWithDefault(DOCUMENTATION_SETTING_KEY, int(setting), 0);
// force re-evaluating which documentation should be registered
// by claiming that all are removed and re-added
const QList<BaseQtVersion *> vs = versions();