Utils: Make PagedSettings::readSettings() calls shorter

Ideally, this would not be needed on the user code side at all, but
there's no way to ensure the settings are read timing before sibling
constructors might need it. So keep the 'poor man's two-phase
initialization', but make it less intrusive.

Change-Id: Ica7f6510cd05072d7286f4e85cd72c494e8f10f8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-05-16 13:06:18 +02:00
parent 824de3046c
commit 6c5fb656d6
10 changed files with 16 additions and 15 deletions

View File

@@ -14,7 +14,6 @@
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <projectexplorer/project.h>
@@ -112,7 +111,7 @@ public:
connect(EditorManager::instance(), &EditorManager::aboutToSave,
this, &CMakeFormatterPrivate::applyIfNecessary);
readSettings(ICore::settings());
readSettings();
}
bool isApplicable(const IDocument *document) const;