From 45db65e09c32cfa349aa69803213d32074f5db2d Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 23 Nov 2018 23:23:01 +0100 Subject: [PATCH] PythonEditor: Modernize modernize-* Change-Id: I3d8a79b59822f9d13f90730b770121dbf582da84 Reviewed-by: Orgad Shaneh --- src/plugins/pythoneditor/pythoneditorplugin.cpp | 2 +- src/plugins/pythoneditor/pythonformattoken.h | 2 +- src/plugins/pythoneditor/pythonindenter.h | 3 --- src/plugins/pythoneditor/pythonscanner.h | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index 5dd91d7067c..64722ef7496 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -99,7 +99,7 @@ private: bool saveRawList(const QStringList &rawList, const QString &fileName); void parseProject(); QStringList processEntries(const QStringList &paths, - QHash *map = 0) const; + QHash *map = nullptr) const; QStringList m_rawFileList; QStringList m_files; diff --git a/src/plugins/pythoneditor/pythonformattoken.h b/src/plugins/pythoneditor/pythonformattoken.h index 285fb548ac8..c98f3a1fefa 100644 --- a/src/plugins/pythoneditor/pythonformattoken.h +++ b/src/plugins/pythoneditor/pythonformattoken.h @@ -48,7 +48,7 @@ enum Format { class FormatToken { public: - FormatToken() {} + FormatToken() = default; FormatToken(Format format, int position, int length) : m_format(format), m_position(position), m_length(length) diff --git a/src/plugins/pythoneditor/pythonindenter.h b/src/plugins/pythoneditor/pythonindenter.h index baee5ce78fe..414c5dcb252 100644 --- a/src/plugins/pythoneditor/pythonindenter.h +++ b/src/plugins/pythoneditor/pythonindenter.h @@ -31,9 +31,6 @@ namespace PythonEditor { class PythonIndenter : public TextEditor::Indenter { -public: - PythonIndenter() {} - private: bool isElectricCharacter(const QChar &ch) const override; int indentFor(const QTextBlock &block, const TextEditor::TabSettings &tabSettings) override; diff --git a/src/plugins/pythoneditor/pythonscanner.h b/src/plugins/pythoneditor/pythonscanner.h index d1633a7de28..c6844097de3 100644 --- a/src/plugins/pythoneditor/pythonscanner.h +++ b/src/plugins/pythoneditor/pythonscanner.h @@ -37,10 +37,10 @@ namespace Internal { */ class Scanner { +public: Scanner(const Scanner &other) = delete; void operator=(const Scanner &other) = delete; -public: enum State { State_Default, State_String,