Commit graph

11 commits

Author SHA1 Message Date
jan Iversen
6e06550631 core/settings:: remove string functions for units
Remove string version of unit_system, duration_units, length, pressure,
temperature, vertical_speed_time, and volume, including tests and make signals
strongly typed in C++

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-20 09:55:26 -08:00
jan Iversen
13b2b9f19c core/settings: allow signals to be strongly typed in C++
Register enums to allow them to be used in signal handlers instead of int.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-20 09:49:49 -08:00
Dirk Hohndel
18fe7b8e9a tests: fix TestQPrefUnits
This clearly never was tested.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29 12:31:20 -08:00
jan Iversen
fc7aec5402 core/settings: make qPrefUnit accesable from QML
Use string literals to communicate with QML.

Instead of passing arounds enum/int value, it seems easier to pass string literals to QML and have that code respond to those

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-27 04:03:25 +09:00
jan Iversen
6e846eb4c0 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>
2019-12-05 11:48:26 -08:00
Rolf Eike Beer
2b9ca488fd tests: use new style syntax to connect QSignalSpy
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-04-12 12:59:17 +03:00
jan Iversen
c01d9f60c1 tests: add signal test to call testqPref*cpp
Add signal testing of all variables
this commit contains all qPref* that work directly
followup commit will do changes to qPref* to make signals work

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
2385f48c6a core/settings ... : remove qPref* includes in qPref.h
reduce number of includes by removing qPref* includes in qPref.h

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
a93ecf3912 tests: update qPref* to the shadow variable
The shadow variable causes properties only to be saved when
actual changed, therefore some test cases need update

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-07 14:37:18 -07:00
jan Iversen
ccfd14211a tests: move Units test from testpreferences
Remove Units test in testpreferences
add the same Units tests to testqPrefUnits

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02 08:59:56 -07:00
jan Iversen
d9b7aaef76 tests: add qPrefUnits testcases
add test cases to secure struct preferences and qPrefUnits work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02 08:59:56 -07:00