diff options
author | Katja Marttila <katja.marttila@qt.io> | 2021-03-05 10:01:42 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2021-03-09 13:23:38 +0200 |
commit | abd97626ac2d50e54650a7256b48b7bbc1b2769e (patch) | |
tree | 533d2403a5a586a28c5c3e1e473a464fa124d699 /tests | |
parent | 644df1f513a0e2c813d72fb028d4d058c3b9a9ba (diff) |
Cppcheck: Add explicit and override keywords
Change-Id: Ia8305652afdf29cbc88328b76f5156187aa54dba
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/installer/binaryformat/tst_binaryformat.cpp | 4 | ||||
-rw-r--r-- | tests/auto/installer/factory/tst_factory.cpp | 8 | ||||
-rw-r--r-- | tests/auto/installer/packagemanagercore/tst_packagemanagercore.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/installer/binaryformat/tst_binaryformat.cpp b/tests/auto/installer/binaryformat/tst_binaryformat.cpp index c9cd2b00f..7e0f5ed24 100644 --- a/tests/auto/installer/binaryformat/tst_binaryformat.cpp +++ b/tests/auto/installer/binaryformat/tst_binaryformat.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -51,7 +51,7 @@ struct Layout : public QInstaller::BinaryLayout class TestOperation : public KDUpdater::UpdateOperation { public: - TestOperation(const QString &name) + explicit TestOperation(const QString &name) : KDUpdater::UpdateOperation(nullptr) { setName(name); } diff --git a/tests/auto/installer/factory/tst_factory.cpp b/tests/auto/installer/factory/tst_factory.cpp index f44a6febe..eb7e2c36c 100644 --- a/tests/auto/installer/factory/tst_factory.cpp +++ b/tests/auto/installer/factory/tst_factory.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -82,7 +82,7 @@ public: : Food(amount) , m_expireDate(expireDate) { qDebug().nospace().noquote() << "Constructor."; } - QDate expireDate() const { + QDate expireDate() const Q_DECL_OVERRIDE { return m_expireDate; } private: @@ -92,7 +92,7 @@ private: class Butter : public Food { public: - QDate expireDate() const { + QDate expireDate() const Q_DECL_OVERRIDE { return m_expireDate; } static Food *create(int amount, const QDate expireDate) { @@ -117,7 +117,7 @@ public: : Food(amount) , m_expireDate(expireDate) { qDebug().nospace().noquote() << "Constructor."; } - QDate expireDate() const { + QDate expireDate() const Q_DECL_OVERRIDE { return m_expireDate; } diff --git a/tests/auto/installer/packagemanagercore/tst_packagemanagercore.cpp b/tests/auto/installer/packagemanagercore/tst_packagemanagercore.cpp index 17343e49d..a3e86c2f8 100644 --- a/tests/auto/installer/packagemanagercore/tst_packagemanagercore.cpp +++ b/tests/auto/installer/packagemanagercore/tst_packagemanagercore.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -46,7 +46,7 @@ using namespace QInstaller; class DummyComponent : public Component { public: - DummyComponent(PackageManagerCore *core) + explicit DummyComponent(PackageManagerCore *core) : Component(core) { setCheckState(Qt::Checked); |