subsurface/tests
Berthold Stoeger 75767c456a Turn application state into enum
The application state was encoded in a QByteArray. Thus, there was
no compile-time checking. Typos would lead to silent failures.

Turn the application state into an enum. Use the enum-class construct,
so that the values don't polute the global namespace. Moreover,
this makes them strongly typed, i.e. they don't auto-convert to
integers.

A disadvantage is that the enums now have to be cast to int
explicitly when used to index an array.

Replace two hash-maps in MainWindow to arrays of fixed sizes.

Move the application-state details into their own files.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-05-12 12:33:55 -07:00
..
.gitignore tests: add .gitignore to ignore qmlc files 2018-07-12 17:12:56 +02:00
CMakeLists.txt CMake: move enable_testing() to the top level 2019-04-12 12:59:17 +03:00
testdivesiteduplication.cpp Cleanup: move parse-function declarations out of "dive.h" 2019-04-12 18:19:07 +03:00
testdivesiteduplication.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testgitstorage.cpp Dive sites: prepare for dive site ref-counting 2019-04-12 18:19:07 +03:00
testgitstorage.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testgpscoords.cpp Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testgpscoords.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testhelper.cpp Tests: allow compilation with older Qt versions 2018-10-12 08:22:44 -07:00
testhelper.h Bluetooth: add helper to separate BT name and address 2018-10-12 08:22:44 -07:00
testmerge.cpp Dive site: fix merging tests 2019-04-12 18:19:07 +03:00
testmerge.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testparse.cpp Dive sites: prepare for dive site ref-counting 2019-04-12 18:19:07 +03:00
testparse.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testparseperformance.cpp Dive sites: prepare for dive site ref-counting 2019-04-12 18:19:07 +03:00
testparseperformance.h Add performance test case 2018-08-31 06:33:46 -07:00
testpicture.cpp Dive sites: prepare for dive site ref-counting 2019-04-12 18:19:07 +03:00
testpicture.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testplan.cpp Turn application state into enum 2019-05-12 12:33:55 -07:00
testplan.h A test for gases used in the planner 2018-10-30 15:33:43 +01:00
testprofile.cpp Dive sites: prepare for dive site ref-counting 2019-04-12 18:19:07 +03:00
testprofile.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testqml.cpp Cleanup: make qPref::registerQML() static 2019-04-04 09:29:45 -07:00
testqml.h tests: change testqml to allow direct register of C++ objects 2018-09-11 17:22:58 -07:00
testqPrefCloudStorage.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefCloudStorage.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefDisplay.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefDisplay.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefDiveComputer.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefDiveComputer.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefDivePlanner.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefDivePlanner.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefGeneral.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefGeneral.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefGeocoding.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefGeocoding.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefLanguage.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefLanguage.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefLocationService.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefLocationService.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefPartialPressureGas.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefPartialPressureGas.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefProxy.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefProxy.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefTechnicalDetails.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefTechnicalDetails.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefUnits.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefUnits.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testqPrefUpdateManager.cpp tests: use new style syntax to connect QSignalSpy 2019-04-12 12:59:17 +03:00
testqPrefUpdateManager.h tests: add signal test to call testqPref*cpp 2018-09-11 17:25:00 -07:00
testrenumber.cpp Dive sites: prepare for dive site ref-counting 2019-04-12 18:19:07 +03:00
testrenumber.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testtaglist.cpp Change taglist_get_tagstring to support 'unlimited' tag list size 2018-04-09 07:59:51 -07:00
testtaglist.h Change taglist_get_tagstring to support 'unlimited' tag list size 2018-04-09 07:59:51 -07:00
testunitconversion.cpp Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
testunitconversion.h Whitespace cleanup tests 2018-07-26 16:32:51 +03:00
tst_qPrefCloudStorage.qml Clean up merge issues 2018-09-11 18:00:44 -07:00
tst_qPrefDisplay.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefDiveComputer.qml Tests: remove testing of download_mode 2018-10-15 19:46:18 +02:00
tst_qPrefDivePlanner.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefGeneral.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefGeocoding.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefLanguage.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefLocationService.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefPartialPressureGas.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefProxy.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefTechnicalDetails.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefUnits.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00
tst_qPrefUpdateManager.qml tests: add signal test to call tst_qPref*qml 2018-09-11 17:25:00 -07:00