From 0717a768030dae8565486a3569874599513944d1 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 31 Jul 2023 08:43:10 +0200 Subject: [PATCH] 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 7f908d737b0e017e65e917c65b19499f3093fa4c. Correct initialization is guaranteed by the init() of the EditorManagerPrivate. Change-Id: Ia58cfb5d6b11a2230915a8a0b5042bb26be5e1a2 Reviewed-by: Eike Ziller Reviewed-by: Qt CI Bot --- src/plugins/coreplugin/systemsettings.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/coreplugin/systemsettings.cpp b/src/plugins/coreplugin/systemsettings.cpp index 18c8908149a..fa474059f5f 100644 --- a/src/plugins/coreplugin/systemsettings.cpp +++ b/src/plugins/coreplugin/systemsettings.cpp @@ -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