summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-10-22 11:43:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-29 11:07:52 -0700
commit4e320cca5bae6d3d625c91e48ff2635d9b167aa2 (patch)
tree8bf1ba516b7aada89132c679350f496bb86a339a /core
parentc78a864e15c7e070a7233d09c805f66490de7e27 (diff)
downloadsubsurface-4e320cca5bae6d3d625c91e48ff2635d9b167aa2.tar.gz
Remove three obsolete preferences options for geocoding
These options are not used any longer/were never used and can be removed to not confuse the users. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core')
-rw-r--r--core/pref.h3
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp52
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.h12
-rw-r--r--core/subsurfacestartup.c3
4 files changed, 0 insertions, 70 deletions
diff --git a/core/pref.h b/core/pref.h
index 515225dd4..2d835dda1 100644
--- a/core/pref.h
+++ b/core/pref.h
@@ -28,9 +28,6 @@ typedef struct {
} facebook_prefs_t;
typedef struct {
- bool enable_geocoding;
- bool parse_dive_without_gps;
- bool tag_existing_dives;
enum taxonomy_category category[3];
} geocoding_prefs_t;
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp
index eb7cf0960..bc941f58d 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -770,21 +770,6 @@ GeocodingPreferences::GeocodingPreferences(QObject *parent) :
}
-bool GeocodingPreferences::enableGeocoding() const
-{
- return prefs.geocoding.enable_geocoding;
-}
-
-bool GeocodingPreferences::parseDiveWithoutGps() const
-{
- return prefs.geocoding.parse_dive_without_gps;
-}
-
-bool GeocodingPreferences::tagExistingDives() const
-{
- return prefs.geocoding.tag_existing_dives;
-}
-
taxonomy_category GeocodingPreferences::firstTaxonomyCategory() const
{
return prefs.geocoding.category[0];
@@ -800,39 +785,6 @@ taxonomy_category GeocodingPreferences::thirdTaxonomyCategory() const
return prefs.geocoding.category[2];
}
-void GeocodingPreferences::setEnableGeocoding(bool value)
-{
- if (value == prefs.geocoding.enable_geocoding)
- return;
- QSettings s;
- s.beginGroup(group);
- s.setValue("enable_geocoding", value);
- prefs.geocoding.enable_geocoding = value;
- emit enableGeocodingChanged(value);
-}
-
-void GeocodingPreferences::setParseDiveWithoutGps(bool value)
-{
- if (value == prefs.geocoding.parse_dive_without_gps)
- return;
- QSettings s;
- s.beginGroup(group);
- s.setValue("parse_dives_without_gps", value);
- prefs.geocoding.parse_dive_without_gps = value;
- emit parseDiveWithoutGpsChanged(value);
-}
-
-void GeocodingPreferences::setTagExistingDives(bool value)
-{
- if (value == prefs.geocoding.tag_existing_dives)
- return;
- QSettings s;
- s.beginGroup(group);
- s.setValue("tag_existing_dives", value);
- prefs.geocoding.tag_existing_dives = value;
- emit tagExistingDivesChanged(value);
-}
-
void GeocodingPreferences::setFirstTaxonomyCategory(taxonomy_category value)
{
if (value == prefs.geocoding.category[0])
@@ -2335,10 +2287,6 @@ void SettingsObjectWrapper::load()
// GeoManagement
s.beginGroup("geocoding");
- GET_BOOL("enable_geocoding", geocoding.enable_geocoding);
- GET_BOOL("parse_dives_without_gps", geocoding.parse_dive_without_gps);
- GET_BOOL("tag_existing_dives", geocoding.tag_existing_dives);
-
GET_ENUM("cat0", taxonomy_category, geocoding.category[0]);
GET_ENUM("cat1", taxonomy_category, geocoding.category[1]);
GET_ENUM("cat2", taxonomy_category, geocoding.category[2]);
diff --git a/core/subsurface-qt/SettingsObjectWrapper.h b/core/subsurface-qt/SettingsObjectWrapper.h
index 146acfcce..622bb7efb 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.h
+++ b/core/subsurface-qt/SettingsObjectWrapper.h
@@ -256,33 +256,21 @@ private:
/* Control the state of the Geocoding preferences */
class GeocodingPreferences : public QObject {
Q_OBJECT
- Q_PROPERTY(bool enable_geocoding READ enableGeocoding WRITE setEnableGeocoding NOTIFY enableGeocodingChanged)
- Q_PROPERTY(bool parse_dive_without_gps READ parseDiveWithoutGps WRITE setParseDiveWithoutGps NOTIFY parseDiveWithoutGpsChanged)
- Q_PROPERTY(bool tag_existing_dives READ tagExistingDives WRITE setTagExistingDives NOTIFY tagExistingDivesChanged)
Q_PROPERTY(taxonomy_category first_category READ firstTaxonomyCategory WRITE setFirstTaxonomyCategory NOTIFY firstTaxonomyCategoryChanged)
Q_PROPERTY(taxonomy_category second_category READ secondTaxonomyCategory WRITE setSecondTaxonomyCategory NOTIFY secondTaxonomyCategoryChanged)
Q_PROPERTY(taxonomy_category third_category READ thirdTaxonomyCategory WRITE setThirdTaxonomyCategory NOTIFY thirdTaxonomyCategoryChanged)
public:
GeocodingPreferences(QObject *parent);
- bool enableGeocoding() const;
- bool parseDiveWithoutGps() const;
- bool tagExistingDives() const;
taxonomy_category firstTaxonomyCategory() const;
taxonomy_category secondTaxonomyCategory() const;
taxonomy_category thirdTaxonomyCategory() const;
public slots:
- void setEnableGeocoding(bool value);
- void setParseDiveWithoutGps(bool value);
- void setTagExistingDives(bool value);
void setFirstTaxonomyCategory(taxonomy_category value);
void setSecondTaxonomyCategory(taxonomy_category value);
void setThirdTaxonomyCategory(taxonomy_category value);
signals:
- void enableGeocodingChanged(bool value);
- void parseDiveWithoutGpsChanged(bool value);
- void tagExistingDivesChanged(bool value);
void firstTaxonomyCategoryChanged(taxonomy_category value);
void secondTaxonomyCategoryChanged(taxonomy_category value);
void thirdTaxonomyCategoryChanged(taxonomy_category value);
diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c
index 5147b3c37..91d2098fd 100644
--- a/core/subsurfacestartup.c
+++ b/core/subsurfacestartup.c
@@ -83,9 +83,6 @@ struct preferences default_prefs = {
.defaultsetpoint = 1100,
.cloud_background_sync = true,
.geocoding = {
- .enable_geocoding = true,
- .parse_dive_without_gps = false,
- .tag_existing_dives = false,
.category = { 0 }
},
.locale = {