summaryrefslogtreecommitdiffstats
path: root/tests/testqPrefUpdateManager.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-11-23 17:40:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-05 11:48:26 -0800
commit6e846eb4c0c5755ddddbd696aeb6531eab5488d8 (patch)
tree08fb31f179eb2f254f0457b4fa06b22d09ef675d /tests/testqPrefUpdateManager.cpp
parent54f8217eec0df1876086849c8dcc594da709201a (diff)
downloadsubsurface-6e846eb4c0c5755ddddbd696aeb6531eab5488d8.tar.gz
tests: correct testqPref*.cpp to use static qPref* functions.
qPref* set/get functions are static. remove creation of qPref* instances, reference static functions. Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'tests/testqPrefUpdateManager.cpp')
-rw-r--r--tests/testqPrefUpdateManager.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/testqPrefUpdateManager.cpp b/tests/testqPrefUpdateManager.cpp
index 259813cbe..8e3047fdb 100644
--- a/tests/testqPrefUpdateManager.cpp
+++ b/tests/testqPrefUpdateManager.cpp
@@ -114,15 +114,14 @@ void TestQPrefUpdateManager::test_multiple()
// test multiple instances have the same information
prefs.update_manager.dont_check_for_updates = false;
- auto tst_direct = new qPrefUpdateManager;
prefs.update_manager.dont_check_exists = false;
auto tst = qPrefUpdateManager::instance();
- QCOMPARE(tst->dont_check_for_updates(), tst_direct->dont_check_for_updates());
+ QCOMPARE(tst->dont_check_for_updates(), qPrefUpdateManager::dont_check_for_updates());
QCOMPARE(tst->dont_check_for_updates(), false);
- QCOMPARE(tst->dont_check_exists(), tst_direct->dont_check_exists());
- QCOMPARE(tst_direct->dont_check_exists(), false);
+ QCOMPARE(tst->dont_check_exists(), qPrefUpdateManager::dont_check_exists());
+ QCOMPARE(qPrefUpdateManager::dont_check_exists(), false);
}
void TestQPrefUpdateManager::test_next_check()