qmldesigner: make DesignerSettings thread save

Change-Id: I07074b35456533e9729644ef3647803d477bd6f1
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Tim Jenssen
2022-09-20 16:32:46 +02:00
parent a6a7ca3688
commit a527ceff60
27 changed files with 107 additions and 111 deletions

View File

@@ -266,7 +266,7 @@ void TextEditorView::reformatFile()
// Reformat document if we have a .ui.qml file
if (document && document->filePath().toString().endsWith(".ui.qml")
&& DesignerSettings::getValue(DesignerSettingsKey::REFORMAT_UI_QML_FILES).toBool()) {
&& QmlDesignerPlugin::settings().value(DesignerSettingsKey::REFORMAT_UI_QML_FILES).toBool()) {
QmlJS::Document::Ptr currentDocument(document->semanticInfo().document);
QmlJS::Snapshot snapshot = QmlJS::ModelManagerInterface::instance()->snapshot();