Core: Make member functions const/static

readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.

readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.

Change-Id: I004d6f7fab4375f9902f940f29b4a4f561fc7604
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2020-12-10 00:59:50 +01:00
parent a40e5b5382
commit 3e9385bf1b
45 changed files with 84 additions and 84 deletions

View File

@@ -89,9 +89,9 @@ public:
void addContextObject(IContext *context);
void removeContextObject(IContext *context);
IDocument *openFiles(const QStringList &fileNames,
ICore::OpenFilesFlags flags,
const QString &workingDirectory = QString());
static IDocument *openFiles(const QStringList &fileNames,
ICore::OpenFilesFlags flags,
const QString &workingDirectory = QString());
inline SettingsDatabase *settingsDatabase() const { return m_settingsDatabase; }
virtual QPrinter *printer() const;
@@ -117,16 +117,16 @@ public:
void restart();
public slots:
void openFileWith();
static void openFileWith();
void exit();
protected:
void closeEvent(QCloseEvent *event) override;
private:
void openFile();
static void openFile();
void aboutToShowRecentFiles();
void setFocusToEditor();
static void setFocusToEditor();
void aboutQtCreator();
void aboutPlugins();
void updateFocusWidget(QWidget *old, QWidget *now);