mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-02 23:20:20 +00:00
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:
parent
f2c302284b
commit
f251faa501
3 changed files with 1 additions and 34 deletions
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue