Core: Do not access system settings during creation

Do not directly access system settings during its creation.
Avoids an endless hang by recursive initialization.
Amends 7f908d737b.
Correct initialization is guaranteed by the init() of the
EditorManagerPrivate.

Change-Id: Ia58cfb5d6b11a2230915a8a0b5042bb26be5e1a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Christian Stenger
2023-07-31 08:43:10 +02:00
parent 734c493aea
commit 0717a76803

View File

@@ -152,12 +152,10 @@ SystemSettings::SystemSettings()
showCrashButton.setSettingsKey("ShowCrashButton");
#endif
const auto updateAutoSave = [] { EditorManagerPrivate::updateAutoSave(); };
connect(&autoSaveModifiedFiles, &BaseAspect::changed, this, updateAutoSave);
connect(&autoSaveInterval, &BaseAspect::changed, this, updateAutoSave);
readSettings();
connect(&autoSaveModifiedFiles, &BaseAspect::changed,
this, &EditorManagerPrivate::updateAutoSave);
connect(&autoSaveInterval, &BaseAspect::changed, this, &EditorManagerPrivate::updateAutoSave);
}
class SystemSettingsWidget : public IOptionsPageWidget