core: use qPref::load/sync

use qPref instead of SettingsObjectWrapper for load/sync
(seems sync is only used for testing)

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-08-14 10:07:22 +02:00 committed by Dirk Hohndel
parent f2c302284b
commit f251faa501
3 changed files with 1 additions and 34 deletions

View file

@ -49,7 +49,7 @@ void init_qt_late()
QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton); QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
#endif #endif
// find plugins installed in the application directory (without this SVGs don't work on Windows) // find plugins installed in the application directory (without this SVGs don't work on Windows)
SettingsObjectWrapper::instance()->load(); qPref::load();
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath()); QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath());
QLocale loc; QLocale loc;

View file

@ -29,37 +29,6 @@ QObject(parent),
{ {
} }
void SettingsObjectWrapper::load()
{
QSettings s;
QVariant v;
uiLanguage(NULL);
qPrefUnits::instance()->load();
qPrefPartialPressureGas::instance()->load();
qPrefGeneral::instance()->load();
qPrefAnimations::instance()->load();
qPrefCloudStorage::instance()->load();
qPrefDisplay::instance()->load();
qPrefProxy::instance()->load();
qPrefGeocoding::instance()->load();
// GPS service time and distance thresholds
qPrefLocationService::instance()->load();
qPrefDivePlanner::instance()->load();
qPrefDiveComputer::instance()->load();
qPrefUpdateManager::instance()->load();
qPrefLanguage::instance()->load();
}
void SettingsObjectWrapper::sync()
{
qPrefDisplay::instance()->sync();
}
SettingsObjectWrapper* SettingsObjectWrapper::instance() SettingsObjectWrapper* SettingsObjectWrapper::instance()
{ {
static SettingsObjectWrapper settings; static SettingsObjectWrapper settings;

View file

@ -51,8 +51,6 @@ public:
qPrefUpdateManager *update_manager_settings; qPrefUpdateManager *update_manager_settings;
qPrefDiveComputer *dive_computer_settings; qPrefDiveComputer *dive_computer_settings;
void sync();
void load();
private: private:
SettingsObjectWrapper(QObject *parent = NULL); SettingsObjectWrapper(QObject *parent = NULL);
}; };