forked from qt-creator/qt-creator
DiffEditor: Modernize
modernize-use-auto modernize-use-override modernize-use-equals-default Change-Id: I4e70550ed2962781b62661a405517b5c79126bad Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -129,7 +129,7 @@ class DiffFilesController : public DiffEditorController
|
||||
Q_OBJECT
|
||||
public:
|
||||
DiffFilesController(IDocument *document);
|
||||
~DiffFilesController();
|
||||
~DiffFilesController() override;
|
||||
|
||||
protected:
|
||||
void reload() final;
|
||||
@@ -203,7 +203,7 @@ QList<ReloadInput> DiffCurrentFileController::reloadInputList() const
|
||||
{
|
||||
QList<ReloadInput> result;
|
||||
|
||||
TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(
|
||||
auto textDocument = qobject_cast<TextEditor::TextDocument *>(
|
||||
DocumentModel::documentForFilePath(m_fileName));
|
||||
|
||||
if (textDocument && textDocument->isModified()) {
|
||||
@@ -259,7 +259,7 @@ QList<ReloadInput> DiffOpenFilesController::reloadInputList() const
|
||||
const QList<IDocument *> openedDocuments = DocumentModel::openedDocuments();
|
||||
|
||||
for (IDocument *doc : openedDocuments) {
|
||||
TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(doc);
|
||||
auto textDocument = qobject_cast<TextEditor::TextDocument *>(doc);
|
||||
|
||||
if (textDocument && textDocument->isModified()) {
|
||||
QString errorString;
|
||||
@@ -317,7 +317,7 @@ QList<ReloadInput> DiffModifiedFilesController::reloadInputList() const
|
||||
QList<ReloadInput> result;
|
||||
|
||||
for (const QString &fileName : m_fileNames) {
|
||||
TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(
|
||||
auto textDocument = qobject_cast<TextEditor::TextDocument *>(
|
||||
DocumentModel::documentForFilePath(fileName));
|
||||
|
||||
if (textDocument && textDocument->isModified()) {
|
||||
|
||||
Reference in New Issue
Block a user