QmlJSEditor: block non Utf8 codecs

Additionally adjust the postioning of the initial setCodec to all other
forced codecs.

Change-Id: Id60bfdac858851e5ad6554ff2dbcb3dd5b806c0b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
David Schulz
2021-10-11 11:49:54 +02:00
parent 3f0aa40d35
commit bfe6c46f9f
3 changed files with 9 additions and 2 deletions

View File

@@ -131,8 +131,6 @@ void QmlJSEditorWidget::finalizeInitialization()
connect(&m_updateOutlineIndexTimer, &QTimer::timeout,
this, &QmlJSEditorWidget::updateOutlineIndexNow);
textDocument()->setCodec(QTextCodec::codecForName("UTF-8")); // qml files are defined to be utf-8
m_modelManager = ModelManagerInterface::instance();
m_contextPane = Internal::QmlJSEditorPlugin::quickToolBar();