forked from qt-creator/qt-creator
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:
@@ -209,7 +209,7 @@ static void appendExtraSelectionsForMessages(
|
||||
sel.cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, d.loc.length);
|
||||
}
|
||||
|
||||
const auto fontSettings = TextEditor::TextEditorSettings::instance()->fontSettings();
|
||||
const auto fontSettings = TextEditor::TextEditorSettings::fontSettings();
|
||||
|
||||
if (d.isWarning())
|
||||
sel.format = fontSettings.toTextCharFormat(TextEditor::C_WARNING);
|
||||
|
||||
@@ -404,7 +404,7 @@ protected:
|
||||
length = end-begin;
|
||||
}
|
||||
|
||||
const TextEditor::FontSettings &fontSettings = TextEditor::TextEditorSettings::instance()->fontSettings();
|
||||
const TextEditor::FontSettings &fontSettings = TextEditor::TextEditorSettings::fontSettings();
|
||||
|
||||
QTextCharFormat format;
|
||||
if (d.isWarning())
|
||||
@@ -441,7 +441,7 @@ protected:
|
||||
length = end-begin;
|
||||
}
|
||||
|
||||
const TextEditor::FontSettings &fontSettings = TextEditor::TextEditorSettings::instance()->fontSettings();
|
||||
const TextEditor::FontSettings &fontSettings = TextEditor::TextEditorSettings::fontSettings();
|
||||
|
||||
QTextCharFormat format;
|
||||
if (d.severity == Severity::Warning
|
||||
|
||||
Reference in New Issue
Block a user