diff options
author | jan Iversen <jan@casacondor.com> | 2019-11-23 17:40:56 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-05 11:48:26 -0800 |
commit | 6e846eb4c0c5755ddddbd696aeb6531eab5488d8 (patch) | |
tree | 08fb31f179eb2f254f0457b4fa06b22d09ef675d /tests/testqPrefLanguage.cpp | |
parent | 54f8217eec0df1876086849c8dcc594da709201a (diff) | |
download | subsurface-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/testqPrefLanguage.cpp')
-rw-r--r-- | tests/testqPrefLanguage.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/testqPrefLanguage.cpp b/tests/testqPrefLanguage.cpp index 96caebd0f..6a5ac1e92 100644 --- a/tests/testqPrefLanguage.cpp +++ b/tests/testqPrefLanguage.cpp @@ -141,15 +141,14 @@ void TestQPrefLanguage::test_multiple() // test multiple instances have the same information prefs.locale.use_system_language = false; - auto tst_direct = new qPrefLanguage; prefs.time_format_override = true; auto tst = qPrefLanguage::instance(); - QCOMPARE(tst->use_system_language(), tst_direct->use_system_language()); - QCOMPARE(tst->time_format_override(), tst_direct->time_format_override()); - QCOMPARE(tst_direct->use_system_language(), false); - QCOMPARE(tst_direct->time_format_override(), true); + QCOMPARE(tst->use_system_language(), qPrefLanguage::use_system_language()); + QCOMPARE(tst->time_format_override(), qPrefLanguage::time_format_override()); + QCOMPARE(qPrefLanguage::use_system_language(), false); + QCOMPARE(qPrefLanguage::time_format_override(), true); } #define TEST(METHOD, VALUE) \ |