forked from qt-creator/qt-creator
QmlEditor: remove indirect QString::toUtf8/fromUtf8 roundtrip
Change-Id: Ie83ba8ff03834f10ef1b4d23827141817deb1bf3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -226,7 +226,7 @@ void QmlJSEditorPluginPrivate::reformatFile()
|
|||||||
QmlJS::Document::MutablePtr latestDocument;
|
QmlJS::Document::MutablePtr latestDocument;
|
||||||
|
|
||||||
const Utils::FilePath fileName = m_currentDocument->filePath();
|
const Utils::FilePath fileName = m_currentDocument->filePath();
|
||||||
latestDocument = snapshot.documentFromSource(QString::fromUtf8(m_currentDocument->contents()),
|
latestDocument = snapshot.documentFromSource(m_currentDocument->plainText(),
|
||||||
fileName,
|
fileName,
|
||||||
QmlJS::ModelManagerInterface::guessLanguageOfFile(fileName));
|
QmlJS::ModelManagerInterface::guessLanguageOfFile(fileName));
|
||||||
latestDocument->parseQml();
|
latestDocument->parseQml();
|
||||||
|
Reference in New Issue
Block a user