diff --git a/src/miscellaneous/databasequeries.cpp b/src/miscellaneous/databasequeries.cpp index 76e556431..a4606bbf6 100755 --- a/src/miscellaneous/databasequeries.cpp +++ b/src/miscellaneous/databasequeries.cpp @@ -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 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) { diff --git a/src/services/gmail/gmailserviceroot.h b/src/services/gmail/gmailserviceroot.h index 99a892508..88569d857 100755 --- a/src/services/gmail/gmailserviceroot.h +++ b/src/services/gmail/gmailserviceroot.h @@ -17,8 +17,8 @@ // You should have received a copy of the GNU General Public License // along with RSS Guard. If not, see . -#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 diff --git a/src/services/gmail/network/gmailnetworkfactory.h b/src/services/gmail/network/gmailnetworkfactory.h index b86e31e34..d720a2623 100755 --- a/src/services/gmail/network/gmailnetworkfactory.h +++ b/src/services/gmail/network/gmailnetworkfactory.h @@ -16,8 +16,8 @@ // You should have received a copy of the GNU General Public License // along with RSS Guard. If not, see . -#ifndef INOREADERNETWORKFACTORY_H -#define INOREADERNETWORKFACTORY_H +#ifndef GMAILNETWORKFACTORY_H +#define GMAILNETWORKFACTORY_H #include @@ -75,4 +75,4 @@ class GmailNetworkFactory : public QObject { OAuth2Service* m_oauth2; }; -#endif // INOREADERNETWORKFACTORY_H +#endif // GMAILNETWORKFACTORY_H