diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-12 11:52:59 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-12 11:52:59 -0700 |
commit | 21be237b0e5608dc506bb0a09dcf8000c5a821ca (patch) | |
tree | 05f5f1bcadf0f19a22bacc989f5c79800f895941 /qt-gui.cpp | |
parent | 6227372c2f71c98c8cf84e2cbb34cb6619e9ec75 (diff) | |
download | subsurface-21be237b0e5608dc506bb0a09dcf8000c5a821ca.tar.gz |
Delay loading of some settings until later
This early in init_ui() the settings may not be available, yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r-- | qt-gui.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp index ba7fb4994..f8b6b8637 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -49,16 +49,6 @@ static MainWindow *window = NULL; int error_count; const char *existing_filename; -const char *getSetting(QSettings &s, QString name) -{ - QVariant v; - v = s.value(name); - if (v.isValid()) { - return strdup(v.toString().toUtf8().data()); - } - return NULL; -} - #if defined(Q_OS_WIN) && QT_VERSION < 0x050000 static QByteArray encodeUtf8(const QString &fname) { @@ -103,9 +93,6 @@ QString uiLanguage(QLocale *callerLoc) void init_ui(void) { - QVariant v; - QSettings s; - // tell Qt to use system proxies // note: on Linux, "system" == "environment variables" QNetworkProxyFactory::setUseSystemConfiguration(true); @@ -151,15 +138,7 @@ void init_ui(void) qDebug() << "can't find Subsurface localization for locale" << uiLang; } } - - s.beginGroup("DiveComputer"); - default_dive_computer_vendor = getSetting(s, "dive_computer_vendor"); - default_dive_computer_product = getSetting(s, "dive_computer_product"); - default_dive_computer_device = getSetting(s, "dive_computer_device"); - s.endGroup(); - window = new MainWindow(); - window->loadRecentFiles(&s); if (existing_filename && existing_filename[0] != '\0') window->setTitle(MWTF_FILENAME); else |