From ad4c0ac5fb1c9cd5bb79fd1050581dc6332d1ede Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 17 Jan 2022 23:24:11 +0100 Subject: [PATCH] Baseline test framework: follow rule of zero for PlatformInfo type The compiler generated special functions are just fine. Pick-to: 6.3 6.2 Change-Id: I64fba1fac59f55d2a82ab18e32c1a2b854df72f0 Reviewed-by: Eirik Aavitsland Reviewed-by: Axel Spoerl --- tests/baseline/shared/baselineprotocol.cpp | 22 ---------------------- tests/baseline/shared/baselineprotocol.h | 8 +------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/tests/baseline/shared/baselineprotocol.cpp b/tests/baseline/shared/baselineprotocol.cpp index 9f4c3721fcc..ab6ced204a1 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(), adHoc(true) -{ -} - PlatformInfo PlatformInfo::localHostInfo() { PlatformInfo pi; @@ -105,23 +100,6 @@ PlatformInfo PlatformInfo::localHostInfo() } -PlatformInfo::PlatformInfo(const PlatformInfo &other) - : QMap(other) -{ - orides = other.orides; - adHoc = other.adHoc; -} - - -PlatformInfo &PlatformInfo::operator=(const PlatformInfo &other) -{ - QMap::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 e03fdb7e040..a5cc6ba6618 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 { 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); };