summaryrefslogtreecommitdiffstats
path: root/tests/testqPrefDisplay.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/testqPrefDisplay.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/testqPrefDisplay.cpp')
-rw-r--r--tests/testqPrefDisplay.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/testqPrefDisplay.cpp b/tests/testqPrefDisplay.cpp
index 32fe1b927..5992b1bf2 100644
--- a/tests/testqPrefDisplay.cpp
+++ b/tests/testqPrefDisplay.cpp
@@ -154,15 +154,13 @@ void TestQPrefDisplay::test_struct_disk()
void TestQPrefDisplay::test_multiple()
{
// test multiple instances have the same information
- auto display_direct = qPrefDisplay::instance();
prefs.divelist_font = copy_qstring("comic");
-
auto display = qPrefDisplay::instance();
prefs.font_size = 15.0;
- QCOMPARE(display->divelist_font(), display_direct->divelist_font());
+ QCOMPARE(display->divelist_font(), qPrefDisplay::divelist_font());
QCOMPARE(display->divelist_font(), QString("comic"));
- QCOMPARE(display->font_size(), display_direct->font_size());
+ QCOMPARE(display->font_size(), qPrefDisplay::font_size());
QCOMPARE(display->font_size(), 15.0);
}