diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-01-17 23:24:11 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-19 12:58:46 +0000 |
commit | d04ff5319003697c1161615d68a5bc8bd9682000 (patch) | |
tree | 9de1c2026eb134970097edbf9ef357e35d48794f /tests | |
parent | 3f6efc25cc32bb05f720373f26cf170cb76392a9 (diff) |
Baseline test framework: follow rule of zero for PlatformInfo type
The compiler generated special functions are just fine.
Change-Id: I64fba1fac59f55d2a82ab18e32c1a2b854df72f0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ad4c0ac5fb1c9cd5bb79fd1050581dc6332d1ede)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/baseline/shared/baselineprotocol.cpp | 22 | ||||
-rw-r--r-- | tests/baseline/shared/baselineprotocol.h | 8 |
2 files changed, 1 insertions, 29 deletions
diff --git a/tests/baseline/shared/baselineprotocol.cpp b/tests/baseline/shared/baselineprotocol.cpp index 9f4c3721fc..ab6ced204a 100644 --- a/tests/baseline/shared/baselineprotocol.cpp +++ b/tests/baseline/shared/baselineprotocol.cpp @@ -53,11 +53,6 @@ const QString PI_QtBuildMode(QLS("QtBuildMode")); const QString PI_GitCommit(QLS("GitCommit")); const QString PI_GitBranch(QLS("GitBranch")); -PlatformInfo::PlatformInfo() - : QMap<QString, QString>(), adHoc(true) -{ -} - PlatformInfo PlatformInfo::localHostInfo() { PlatformInfo pi; @@ -105,23 +100,6 @@ PlatformInfo PlatformInfo::localHostInfo() } -PlatformInfo::PlatformInfo(const PlatformInfo &other) - : QMap<QString, QString>(other) -{ - orides = other.orides; - adHoc = other.adHoc; -} - - -PlatformInfo &PlatformInfo::operator=(const PlatformInfo &other) -{ - QMap<QString, QString>::operator=(other); - orides = other.orides; - adHoc = other.adHoc; - return *this; -} - - void PlatformInfo::addOverride(const QString& key, const QString& value) { orides.append(key); diff --git a/tests/baseline/shared/baselineprotocol.h b/tests/baseline/shared/baselineprotocol.h index e03fdb7e04..a5cc6ba661 100644 --- a/tests/baseline/shared/baselineprotocol.h +++ b/tests/baseline/shared/baselineprotocol.h @@ -57,12 +57,6 @@ extern const QString PI_GitBranch; class PlatformInfo : public QMap<QString, QString> { public: - PlatformInfo(); - PlatformInfo(const PlatformInfo &other); - ~PlatformInfo() - {} - PlatformInfo &operator=(const PlatformInfo &other); - static PlatformInfo localHostInfo(); void addOverride(const QString& key, const QString& value); @@ -72,7 +66,7 @@ public: private: QStringList orides; - bool adHoc; + bool adHoc = true; friend QDataStream & operator<< (QDataStream &stream, const PlatformInfo &pi); friend QDataStream & operator>> (QDataStream &stream, PlatformInfo& pi); }; |