forked from qt-creator/qt-creator
Prefer using 'override' instead of 'virtual'
warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
@@ -46,9 +46,9 @@ public:
|
||||
, m_snapshot(snapshot)
|
||||
{}
|
||||
|
||||
virtual void indentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const
|
||||
void indentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const override
|
||||
{
|
||||
// ### shares code with QmlJSTextEditor::indent
|
||||
QTextDocument *doc = selection.document();
|
||||
@@ -70,9 +70,9 @@ public:
|
||||
} while (block.isValid() && block != end);
|
||||
}
|
||||
|
||||
virtual void reindentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const
|
||||
void reindentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const override
|
||||
{
|
||||
const TextEditor::TabSettings &tabSettings =
|
||||
ProjectExplorer::actualTabSettings(fileName, textDocument);
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
indenter.reindent(selection.document(), selection, tabSettings);
|
||||
}
|
||||
|
||||
virtual void fileChanged(const QString &fileName)
|
||||
void fileChanged(const QString &fileName) override
|
||||
{
|
||||
m_modelManager->updateSourceFiles(QStringList(fileName), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user