summaryrefslogtreecommitdiffstats
path: root/subsurface-helper.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-31 11:57:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-11 17:22:58 -0700
commita71afd31ee66edf45c8970dcbd6514d7c4b5e9f0 (patch)
treef37c28d33c80aee2f0169f140d62ae751d46a9ed /subsurface-helper.cpp
parent7940e45c4c56594a0fe43dda28f6126cb2ceb555 (diff)
downloadsubsurface-a71afd31ee66edf45c8970dcbd6514d7c4b5e9f0.tar.gz
core: add auto registration to qPref*
Instead of having all register calls in subsurface-helper.cpp let qPref.cpp handle all qPref registration, since they also need to be different update subsurface-helper and testqml accordingly. Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'subsurface-helper.cpp')
-rw-r--r--subsurface-helper.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp
index 389d47cbf..38601ddf3 100644
--- a/subsurface-helper.cpp
+++ b/subsurface-helper.cpp
@@ -155,21 +155,11 @@ static void register_meta_types()
void register_qml_types()
{
int rc;
- REGISTER_TYPE(qPref, "SsrfPrefs");
- REGISTER_TYPE(qPrefCloudStorage, "SsrfCloudStoragePrefs");
- REGISTER_TYPE(qPrefDisplay, "SsrfDisplayPrefs");
- REGISTER_TYPE(qPrefDiveComputer, "SsrfDiveComputerPrefs");
- REGISTER_TYPE(qPrefDivePlanner, "SsrfDivePlannerPrefs");
- REGISTER_TYPE(qPrefFacebook, "SsrfFacebookPrefs");
- REGISTER_TYPE(qPrefGeneral, "SsrfGeneralPrefs");
- REGISTER_TYPE(qPrefGeocoding, "SsrfGeocodingPrefs");
- REGISTER_TYPE(qPrefLanguage, "SsrfLanguagePrefs");
- REGISTER_TYPE(qPrefLocationService, "SsrfLocationServicePrefs");
- REGISTER_TYPE(qPrefPartialPressureGas, "SsrfPartialPressureGasPrefs");
- REGISTER_TYPE(qPrefProxy, "SsrfProxyPrefs");
- REGISTER_TYPE(qPrefTechnicalDetails, "SsrfTechnicalDetailsPrefs");
- REGISTER_TYPE(qPrefUnits, "SsrfUnitPrefs");
- REGISTER_TYPE(qPrefUpdateManager, "SsrfUpdateManagerPrefs");
+
+ (void)rc;
+
+ // register qPref*
+ qPref::instance()->registerQML();
#ifndef SUBSURFACE_TEST_DATA
#ifdef SUBSURFACE_MOBILE