Don't access static functions/fields via instance

Courtesy of readability-static-accessed-through-instance

Amends: b2a766a79a

Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py

Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Alessandro Portale
2020-11-27 13:12:23 +01:00
parent 0cc5ee12c5
commit a3857a996a
35 changed files with 52 additions and 56 deletions

View File

@@ -270,7 +270,7 @@ void TextEditorView::reformatFile()
QByteArray editorState = m_widget->textEditor()->saveState();
auto document =
qobject_cast<QmlJSEditor::QmlJSEditorDocument *>(Core::EditorManager::instance()->currentDocument());
qobject_cast<QmlJSEditor::QmlJSEditorDocument *>(Core::EditorManager::currentDocument());
/* Reformat document if we have a .ui.qml file */
if (document