summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/SettingsObjectWrapper.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-07-23 17:49:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-27 12:36:20 -0700
commitf175890632d5845d57066b0669c347b4c0992ff9 (patch)
treeefe856eb90e077c64f990b5ec5681c95eed7c866 /core/subsurface-qt/SettingsObjectWrapper.cpp
parente0f1817fdc3b0024c5e97cfa0db048384aae6d78 (diff)
downloadsubsurface-f175890632d5845d57066b0669c347b4c0992ff9.tar.gz
core: activate qPrefFacebook
remove Facebook from SettingsObjectWrapper and reference qPrefFacebook update files using SettingsObjectWrapper/Facebook to use qPrefFacebook this activated qPrefFacebook and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.cpp')
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp68
1 files changed, 1 insertions, 67 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp
index 9e0e8992c..3085216c7 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -662,72 +662,6 @@ void TechnicalDetailsSettings::setShowIcd(bool value)
emit showIcdChanged(value);
}
-FacebookSettings::FacebookSettings(QObject *parent) :
- QObject(parent),
- group(QStringLiteral("WebApps")),
- subgroup(QStringLiteral("Facebook"))
-{
-}
-
-QString FacebookSettings::accessToken() const
-{
- return QString(prefs.facebook.access_token);
-}
-
-QString FacebookSettings::userId() const
-{
- return QString(prefs.facebook.user_id);
-}
-
-QString FacebookSettings::albumId() const
-{
- return QString(prefs.facebook.album_id);
-}
-
-void FacebookSettings::setAccessToken (const QString& value)
-{
-#if SAVE_FB_CREDENTIALS
- QSettings s;
- s.beginGroup(group);
- s.beginGroup(subgroup);
- s.setValue("ConnectToken", value);
-#endif
- free((void *)prefs.facebook.access_token);
- prefs.facebook.access_token = copy_qstring(value);
- emit accessTokenChanged(value);
-}
-
-void FacebookSettings::setUserId(const QString& value)
-{
- if (value == prefs.facebook.user_id)
- return;
-#if SAVE_FB_CREDENTIALS
- QSettings s;
- s.beginGroup(group);
- s.beginGroup(subgroup);
- s.setValue("UserId", value);
-#endif
- free((void *)prefs.facebook.user_id);
- prefs.facebook.user_id = copy_qstring(value);
- emit userIdChanged(value);
-}
-
-void FacebookSettings::setAlbumId(const QString& value)
-{
- if (value == prefs.facebook.album_id)
- return;
-#if SAVE_FB_CREDENTIALS
- QSettings s;
- s.beginGroup(group);
- s.beginGroup(subgroup);
- s.setValue("AlbumId", value);
-#endif
- free((void *)prefs.facebook.album_id);
- prefs.facebook.album_id = copy_qstring(value);
- emit albumIdChanged(value);
-}
-
-
GeocodingPreferences::GeocodingPreferences(QObject *parent) :
QObject(parent)
{
@@ -1829,7 +1763,7 @@ SettingsObjectWrapper::SettingsObjectWrapper(QObject* parent):
QObject(parent),
techDetails(new TechnicalDetailsSettings(this)),
pp_gas(new PartialPressureGasSettings(this)),
- facebook(new FacebookSettings(this)),
+ facebook(new qPrefFacebook(this)),
geocoding(new GeocodingPreferences(this)),
proxy(new ProxySettings(this)),
cloud_storage(new qPrefCloudStorage(this)),