2018-07-23 13:10:40 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2018-08-14 10:25:15 +00:00
|
|
|
#include "qPrefFacebook.h"
|
2018-07-23 13:10:40 +00:00
|
|
|
#include "qPrefPrivate.h"
|
|
|
|
|
|
|
|
static const QString group = QStringLiteral("WebApps/Facebook");
|
|
|
|
|
|
|
|
qPrefFacebook::qPrefFacebook(QObject *parent) : QObject(parent)
|
|
|
|
{
|
|
|
|
}
|
2018-09-02 09:50:55 +00:00
|
|
|
|
2018-07-23 13:10:40 +00:00
|
|
|
qPrefFacebook*qPrefFacebook::instance()
|
|
|
|
{
|
|
|
|
static qPrefFacebook *self = new qPrefFacebook;
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
void qPrefFacebook::loadSync(bool doSync)
|
|
|
|
{
|
|
|
|
// Empty, because FB probs are not loaded/synced to disk
|
|
|
|
}
|
|
|
|
|
|
|
|
void qPrefFacebook::set_access_token(const QString &value)
|
|
|
|
{
|
|
|
|
if (value != prefs.facebook.access_token) {
|
2018-08-15 11:26:09 +00:00
|
|
|
qPrefPrivate::copy_txt(&prefs.facebook.access_token, value);
|
2018-09-02 11:58:04 +00:00
|
|
|
emit instance()->access_tokenChanged(value);
|
2018-07-23 13:10:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void qPrefFacebook::set_album_id(const QString &value)
|
|
|
|
{
|
|
|
|
if (value != prefs.facebook.album_id) {
|
2018-08-15 11:26:09 +00:00
|
|
|
qPrefPrivate::copy_txt(&prefs.facebook.album_id, value);
|
2018-09-02 11:58:04 +00:00
|
|
|
emit instance()->album_idChanged(value);
|
2018-07-23 13:10:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void qPrefFacebook::set_user_id(const QString &value)
|
|
|
|
{
|
|
|
|
if (value != prefs.facebook.user_id) {
|
2018-08-15 11:26:09 +00:00
|
|
|
qPrefPrivate::copy_txt(&prefs.facebook.user_id, value);
|
2018-09-08 12:43:59 +00:00
|
|
|
emit instance()->user_idChanged(value);
|
2018-07-23 13:10:40 +00:00
|
|
|
}
|
|
|
|
}
|