From a1b22797cac64925cd8a8a06b176aa40b99c1fc1 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 11 Aug 2016 11:52:49 -0300 Subject: [PATCH] Settings update: Remove uneeded includes and comment out questionable code. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- core/divelogexportlogic.cpp | 1 - desktop-widgets/preferences/preferences_defaults.cpp | 1 - .../preferences/preferences_georeference.cpp | 1 - desktop-widgets/preferences/preferences_graph.cpp | 1 - desktop-widgets/preferences/preferences_language.cpp | 1 - desktop-widgets/preferences/preferences_network.cpp | 1 - desktop-widgets/preferences/preferences_units.cpp | 2 -- desktop-widgets/preferences/preferencesdialog.cpp | 10 +++++----- 8 files changed, 5 insertions(+), 13 deletions(-) diff --git a/core/divelogexportlogic.cpp b/core/divelogexportlogic.cpp index af5157f4a..11c1485b0 100644 --- a/core/divelogexportlogic.cpp +++ b/core/divelogexportlogic.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include "divelogexportlogic.h" #include "helpers.h" diff --git a/desktop-widgets/preferences/preferences_defaults.cpp b/desktop-widgets/preferences/preferences_defaults.cpp index 12771e04a..2ebbe5467 100644 --- a/desktop-widgets/preferences/preferences_defaults.cpp +++ b/desktop-widgets/preferences/preferences_defaults.cpp @@ -4,7 +4,6 @@ #include "core/prefs-macros.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" -#include #include PreferencesDefaults::PreferencesDefaults(): AbstractPreferencesWidget(tr("Defaults"), QIcon(":defaults"), 0 ), ui(new Ui::PreferencesDefaults()) diff --git a/desktop-widgets/preferences/preferences_georeference.cpp b/desktop-widgets/preferences/preferences_georeference.cpp index f626b3141..dfa841c88 100644 --- a/desktop-widgets/preferences/preferences_georeference.cpp +++ b/desktop-widgets/preferences/preferences_georeference.cpp @@ -6,7 +6,6 @@ #include "qt-models/divelocationmodel.h" #include -#include PreferencesGeoreference::PreferencesGeoreference() : AbstractPreferencesWidget(tr("Georeference"), QIcon(":/georeference"), 9) { diff --git a/desktop-widgets/preferences/preferences_graph.cpp b/desktop-widgets/preferences/preferences_graph.cpp index d94eae9a7..36951ef22 100644 --- a/desktop-widgets/preferences/preferences_graph.cpp +++ b/desktop-widgets/preferences/preferences_graph.cpp @@ -2,7 +2,6 @@ #include "ui_preferences_graph.h" #include "core/prefs-macros.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" -#include #include #include "qt-models/models.h" diff --git a/desktop-widgets/preferences/preferences_language.cpp b/desktop-widgets/preferences/preferences_language.cpp index 408b48b66..75297a8ff 100644 --- a/desktop-widgets/preferences/preferences_language.cpp +++ b/desktop-widgets/preferences/preferences_language.cpp @@ -4,7 +4,6 @@ #include "core/subsurface-qt/SettingsObjectWrapper.h" #include -#include #include #include diff --git a/desktop-widgets/preferences/preferences_network.cpp b/desktop-widgets/preferences/preferences_network.cpp index 2e0ebbd32..68c8a9427 100644 --- a/desktop-widgets/preferences/preferences_network.cpp +++ b/desktop-widgets/preferences/preferences_network.cpp @@ -6,7 +6,6 @@ #include "core/cloudstorage.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" #include -#include PreferencesNetwork::PreferencesNetwork() : AbstractPreferencesWidget(tr("Network"),QIcon(":network"), 9), ui(new Ui::PreferencesNetwork()) { diff --git a/desktop-widgets/preferences/preferences_units.cpp b/desktop-widgets/preferences/preferences_units.cpp index c62fb1cdc..aa324ec59 100644 --- a/desktop-widgets/preferences/preferences_units.cpp +++ b/desktop-widgets/preferences/preferences_units.cpp @@ -4,8 +4,6 @@ #include "core/qthelper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h" -#include - PreferencesUnits::PreferencesUnits(): AbstractPreferencesWidget(tr("Units"),QIcon(":units"),1), ui(new Ui::PreferencesUnits()) { ui->setupUi(this); diff --git a/desktop-widgets/preferences/preferencesdialog.cpp b/desktop-widgets/preferences/preferencesdialog.cpp index 01d0aace4..3b92dff5e 100644 --- a/desktop-widgets/preferences/preferencesdialog.cpp +++ b/desktop-widgets/preferences/preferencesdialog.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include PreferencesDialog* PreferencesDialog::instance() @@ -34,10 +33,11 @@ PreferencesDialog::PreferencesDialog() { loadPreferences(); //TODO: Move this code out of the qthelper.cpp - QSettings s; - s.beginGroup("GeneralSettings"); - s.setValue("default_directory", system_default_directory()); - s.endGroup(); + //FIXME: This looks wrong. + //QSettings s; + //s.beginGroup("GeneralSettings"); + //s.setValue("default_directory", system_default_directory()); + //s.endGroup(); pagesList = new QListWidget(); pagesStack = new QStackedWidget();