diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2018-10-11 13:57:19 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2018-10-11 13:57:19 +0200 |
commit | 6315d1e9371864f0ed6b3854a4b50561b062befe (patch) | |
tree | 757628b1e101e182cd63b3e2c6d475ad7a1000d3 /tests | |
parent | 5f7046e495db863f17d42f61c5feb9d405055a13 (diff) |
Some cleanup with help of Clang-Tidy and Clazy (part 1 of x)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/ui/tst_ui.cpp | 14 | ||||
-rw-r--r-- | tests/auto/util/tst_util.cpp | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/ui/tst_ui.cpp b/tests/auto/ui/tst_ui.cpp index 065a2143..ae05fac7 100644 --- a/tests/auto/ui/tst_ui.cpp +++ b/tests/auto/ui/tst_ui.cpp @@ -20,40 +20,40 @@ private Q_SLOTS: */ void tst_ui::contentRemainsSame() { QScopedPointer<PasswordDialog> d( - new PasswordDialog(PasswordConfiguration{}, NULL)); + new PasswordDialog(PasswordConfiguration{}, nullptr)); d->setTemplate("", false); QString input = "pw\n"; d->setPass(input); QCOMPARE(d->getPassword(), input); - d.reset(new PasswordDialog(PasswordConfiguration{}, NULL)); + d.reset(new PasswordDialog(PasswordConfiguration{}, nullptr)); input = "pw\nname: value\n"; d->setPass(input); QCOMPARE(d->getPassword(), input); - d.reset(new PasswordDialog(PasswordConfiguration{}, NULL)); + d.reset(new PasswordDialog(PasswordConfiguration{}, nullptr)); d->setTemplate("name", false); d->setPass(input); QCOMPARE(d->getPassword(), input); - d.reset(new PasswordDialog(PasswordConfiguration{}, NULL)); + d.reset(new PasswordDialog(PasswordConfiguration{}, nullptr)); d->setTemplate("name", true); d->setPass(input); QCOMPARE(d->getPassword(), input); - d.reset(new PasswordDialog(PasswordConfiguration{}, NULL)); + d.reset(new PasswordDialog(PasswordConfiguration{}, nullptr)); d->setTemplate("", false); d->templateAll(true); d->setPass(input); QCOMPARE(d->getPassword(), input); - d.reset(new PasswordDialog(PasswordConfiguration{}, NULL)); + d.reset(new PasswordDialog(PasswordConfiguration{}, nullptr)); d->setTemplate("", true); d->templateAll(true); d->setPass(input); QCOMPARE(d->getPassword(), input); - d.reset(new PasswordDialog(PasswordConfiguration{}, NULL)); + d.reset(new PasswordDialog(PasswordConfiguration{}, nullptr)); d->setTemplate("name", true); d->templateAll(true); d->setPass(input); diff --git a/tests/auto/util/tst_util.cpp b/tests/auto/util/tst_util.cpp index cce06664..ae2bd9e1 100644 --- a/tests/auto/util/tst_util.cpp +++ b/tests/auto/util/tst_util.cpp @@ -12,7 +12,7 @@ class tst_util : public QObject { public: tst_util(); - ~tst_util(); + ~tst_util() override; public Q_SLOTS: void init(); @@ -32,12 +32,12 @@ bool operator==(const NamedValue &a, const NamedValue &b) { /** * @brief tst_util::tst_util basic constructor */ -tst_util::tst_util() {} +tst_util::tst_util() = default; /** * @brief tst_util::~tst_util basic destructor */ -tst_util::~tst_util() {} +tst_util::~tst_util() = default; /** * @brief tst_util::init unit test init method |