diff --git a/src/plugins/qmljseditor/qmljseditordocument.cpp b/src/plugins/qmljseditor/qmljseditordocument.cpp index 0575e2dbbba..a5b7687a2ac 100644 --- a/src/plugins/qmljseditor/qmljseditordocument.cpp +++ b/src/plugins/qmljseditor/qmljseditordocument.cpp @@ -505,7 +505,6 @@ QmlJSEditorDocumentPrivate::QmlJSEditorDocumentPrivate(QmlJSEditorDocument *pare this, &QmlJSEditorDocumentPrivate::updateOutlineModel); modelManager->updateSourceFiles(Utils::FilePaths({parent->filePath()}), false); - settingsChanged(); } QmlJSEditorDocumentPrivate::~QmlJSEditorDocumentPrivate() @@ -818,6 +817,8 @@ QmlJSEditorDocument::QmlJSEditorDocument(Utils::Id id) setId(id); connect(this, &TextEditor::TextDocument::tabSettingsChanged, d, &Internal::QmlJSEditorDocumentPrivate::invalidateFormatterCache); + connect(this, &TextEditor::TextDocument::openFinishedSuccessfully, + d, &Internal::QmlJSEditorDocumentPrivate::settingsChanged); setSyntaxHighlighter(new QmlJSHighlighter(document())); setCodec(QTextCodec::codecForName("UTF-8")); // qml files are defined to be utf-8 setIndenter(new Internal::Indenter(document()));