mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-29 08:39:41 +01:00
Load gmail accs.
This commit is contained in:
parent
29be179ea1
commit
9e6a5d00be
@ -22,7 +22,6 @@
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/inoreader/definitions.h"
|
||||
#include "services/owncloud/definitions.h"
|
||||
#include "services/owncloud/network/owncloudnetworkfactory.h"
|
||||
#include "services/owncloud/owncloudfeed.h"
|
||||
@ -36,6 +35,9 @@
|
||||
|
||||
#if defined(USE_WEBENGINE)
|
||||
#include "network-web/oauth2service.h"
|
||||
#include "services/gmail/gmailserviceroot.h"
|
||||
#include "services/gmail/network/gmailnetworkfactory.h"
|
||||
#include "services/inoreader/definitions.h"
|
||||
#include "services/inoreader/inoreaderfeed.h"
|
||||
#include "services/inoreader/inoreaderserviceroot.h"
|
||||
#include "services/inoreader/network/inoreadernetworkfactory.h"
|
||||
@ -1499,18 +1501,18 @@ QList<ServiceRoot*> DatabaseQueries::getGmailAccounts(QSqlDatabase db, bool* ok)
|
||||
|
||||
if (query.exec("SELECT * FROM GmailAccounts;")) {
|
||||
while (query.next()) {
|
||||
/*GmailServiceRoot* root = new GmailServiceRoot(nullptr);
|
||||
GmailServiceRoot* root = new GmailServiceRoot(nullptr);
|
||||
|
||||
root->setId(query.value(0).toInt());
|
||||
root->setAccountId(query.value(0).toInt());
|
||||
root->network()->setUsername(query.value(1).toString());
|
||||
root->network()->oauth()->setClientId(query.value(2).toString());
|
||||
root->network()->oauth()->setClientSecret(query.value(3).toString());
|
||||
root->network()->oauth()->setRedirectUrl(query.value(4).toString());
|
||||
root->network()->oauth()->setRefreshToken(query.value(5).toString());
|
||||
root->network()->setBatchSize(query.value(6).toInt());
|
||||
root->updateTitle();
|
||||
roots.append(root);*/
|
||||
root->setId(query.value(0).toInt());
|
||||
root->setAccountId(query.value(0).toInt());
|
||||
root->network()->setUsername(query.value(1).toString());
|
||||
root->network()->oauth()->setClientId(query.value(2).toString());
|
||||
root->network()->oauth()->setClientSecret(query.value(3).toString());
|
||||
root->network()->oauth()->setRedirectUrl(query.value(4).toString());
|
||||
root->network()->oauth()->setRefreshToken(query.value(5).toString());
|
||||
root->network()->setBatchSize(query.value(6).toInt());
|
||||
root->updateTitle();
|
||||
roots.append(root);
|
||||
}
|
||||
|
||||
if (ok != nullptr) {
|
||||
|
@ -17,8 +17,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef INOREADERSERVICEROOT_H
|
||||
#define INOREADERSERVICEROOT_H
|
||||
#ifndef GMAILSERVICEROOT_H
|
||||
#define GMAILSERVICEROOT_H
|
||||
|
||||
#include "services/abstract/cacheforserviceroot.h"
|
||||
#include "services/abstract/serviceroot.h"
|
||||
@ -75,4 +75,4 @@ inline GmailNetworkFactory* GmailServiceRoot::network() const {
|
||||
return m_network;
|
||||
}
|
||||
|
||||
#endif // INOREADERSERVICEROOT_H
|
||||
#endif // GMAILSERVICEROOT_H
|
||||
|
@ -16,8 +16,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef INOREADERNETWORKFACTORY_H
|
||||
#define INOREADERNETWORKFACTORY_H
|
||||
#ifndef GMAILNETWORKFACTORY_H
|
||||
#define GMAILNETWORKFACTORY_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -75,4 +75,4 @@ class GmailNetworkFactory : public QObject {
|
||||
OAuth2Service* m_oauth2;
|
||||
};
|
||||
|
||||
#endif // INOREADERNETWORKFACTORY_H
|
||||
#endif // GMAILNETWORKFACTORY_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user