Fix nonwegengine build.

This commit is contained in:
Martin Rotter 2017-09-25 12:40:39 +02:00
parent b84bdb306b
commit a6eaedb918
5 changed files with 41 additions and 26 deletions

View File

@ -2,6 +2,7 @@
————— —————
Added: Added:
▪ New plugin for Inoreader. This is supported only in full RSS Guard "web-engine" version, because of web OAuth 2.0.
▪ NextCloud plugin now allows to persistently set max number of messages to get downloaded per feed. ▪ NextCloud plugin now allows to persistently set max number of messages to get downloaded per feed.
▪ Added support for arbitrary external tools (settings category "Web browser & e-mail & proxy") which can open URLs of selected messages. (#136) ▪ Added support for arbitrary external tools (settings category "Web browser & e-mail & proxy") which can open URLs of selected messages. (#136)
▪ Standard account is now automatically added if RSS Guard is started with empty database. ▪ Standard account is now automatically added if RSS Guard is started with empty database.

View File

@ -331,15 +331,7 @@ HEADERS += src/core/feeddownloader.h \
src/gui/treeviewcolumnsmenu.h \ src/gui/treeviewcolumnsmenu.h \
src/services/abstract/labelsrootitem.h \ src/services/abstract/labelsrootitem.h \
src/services/abstract/label.h \ src/services/abstract/label.h \
src/miscellaneous/externaltool.h \ src/miscellaneous/externaltool.h
src/services/inoreader/definitions.h \
src/services/inoreader/inoreaderentrypoint.h \
src/services/inoreader/network/inoreadernetworkfactory.h \
src/services/inoreader/inoreaderserviceroot.h \
src/services/inoreader/gui/formeditinoreaderaccount.h \
src/services/inoreader/inoreaderfeed.h \
src/network-web/oauth2service.h \
src/gui/dialogs/oauthlogin.h
SOURCES += src/core/feeddownloader.cpp \ SOURCES += src/core/feeddownloader.cpp \
src/core/feedsmodel.cpp \ src/core/feedsmodel.cpp \
@ -461,14 +453,7 @@ SOURCES += src/core/feeddownloader.cpp \
src/gui/treeviewcolumnsmenu.cpp \ src/gui/treeviewcolumnsmenu.cpp \
src/services/abstract/labelsrootitem.cpp \ src/services/abstract/labelsrootitem.cpp \
src/services/abstract/label.cpp \ src/services/abstract/label.cpp \
src/miscellaneous/externaltool.cpp \ src/miscellaneous/externaltool.cpp
src/services/inoreader/inoreaderentrypoint.cpp \
src/services/inoreader/network/inoreadernetworkfactory.cpp \
src/services/inoreader/inoreaderserviceroot.cpp \
src/services/inoreader/gui/formeditinoreaderaccount.cpp \
src/services/inoreader/inoreaderfeed.cpp \
src/network-web/oauth2service.cpp \
src/gui/dialogs/oauthlogin.cpp
OBJECTIVE_SOURCES += src/miscellaneous/disablewindowtabbing.mm OBJECTIVE_SOURCES += src/miscellaneous/disablewindowtabbing.mm
@ -495,9 +480,7 @@ FORMS += src/gui/toolbareditor.ui \
src/gui/settings/settingsbrowsermail.ui \ src/gui/settings/settingsbrowsermail.ui \
src/gui/settings/settingsfeedsmessages.ui \ src/gui/settings/settingsfeedsmessages.ui \
src/gui/settings/settingsdownloads.ui \ src/gui/settings/settingsdownloads.ui \
src/services/tt-rss/gui/formeditttrssaccount.ui \ src/services/tt-rss/gui/formeditttrssaccount.ui
src/services/inoreader/gui/formeditinoreaderaccount.ui \
src/gui/dialogs/oauthlogin.ui
equals(USE_WEBENGINE, true) { equals(USE_WEBENGINE, true) {
HEADERS += src/gui/locationlineedit.h \ HEADERS += src/gui/locationlineedit.h \
@ -506,7 +489,15 @@ equals(USE_WEBENGINE, true) {
src/gui/discoverfeedsbutton.h \ src/gui/discoverfeedsbutton.h \
src/network-web/googlesuggest.h \ src/network-web/googlesuggest.h \
src/network-web/webpage.h \ src/network-web/webpage.h \
src/network-web/rssguardschemehandler.h src/network-web/rssguardschemehandler.h \
src/services/inoreader/definitions.h \
src/services/inoreader/inoreaderentrypoint.h \
src/services/inoreader/network/inoreadernetworkfactory.h \
src/services/inoreader/inoreaderserviceroot.h \
src/services/inoreader/gui/formeditinoreaderaccount.h \
src/services/inoreader/inoreaderfeed.h \
src/network-web/oauth2service.h \
src/gui/dialogs/oauthlogin.h
SOURCES += src/gui/locationlineedit.cpp \ SOURCES += src/gui/locationlineedit.cpp \
src/gui/webviewer.cpp \ src/gui/webviewer.cpp \
@ -514,7 +505,14 @@ equals(USE_WEBENGINE, true) {
src/gui/discoverfeedsbutton.cpp \ src/gui/discoverfeedsbutton.cpp \
src/network-web/googlesuggest.cpp \ src/network-web/googlesuggest.cpp \
src/network-web/webpage.cpp \ src/network-web/webpage.cpp \
src/network-web/rssguardschemehandler.cpp src/network-web/rssguardschemehandler.cpp \
src/services/inoreader/inoreaderentrypoint.cpp \
src/services/inoreader/network/inoreadernetworkfactory.cpp \
src/services/inoreader/inoreaderserviceroot.cpp \
src/services/inoreader/gui/formeditinoreaderaccount.cpp \
src/services/inoreader/inoreaderfeed.cpp \
src/network-web/oauth2service.cpp \
src/gui/dialogs/oauthlogin.cpp
# Add AdBlock sources. # Add AdBlock sources.
HEADERS += src/network-web/adblock/adblockaddsubscriptiondialog.h \ HEADERS += src/network-web/adblock/adblockaddsubscriptiondialog.h \
@ -547,7 +545,9 @@ equals(USE_WEBENGINE, true) {
src/gui/treewidget.cpp src/gui/treewidget.cpp
FORMS += src/network-web/adblock/adblockaddsubscriptiondialog.ui \ FORMS += src/network-web/adblock/adblockaddsubscriptiondialog.ui \
src/network-web/adblock/adblockdialog.ui src/network-web/adblock/adblockdialog.ui \
src/services/inoreader/gui/formeditinoreaderaccount.ui \
src/gui/dialogs/oauthlogin.ui
} }
else { else {
HEADERS += src/gui/messagepreviewer.h \ HEADERS += src/gui/messagepreviewer.h \

View File

@ -22,9 +22,6 @@
#include "miscellaneous/iconfactory.h" #include "miscellaneous/iconfactory.h"
#include "miscellaneous/textfactory.h" #include "miscellaneous/textfactory.h"
#include "services/abstract/category.h" #include "services/abstract/category.h"
#include "services/inoreader/inoreaderfeed.h"
#include "services/inoreader/inoreaderserviceroot.h"
#include "services/inoreader/network/inoreadernetworkfactory.h"
#include "services/owncloud/definitions.h" #include "services/owncloud/definitions.h"
#include "services/owncloud/network/owncloudnetworkfactory.h" #include "services/owncloud/network/owncloudnetworkfactory.h"
#include "services/owncloud/owncloudfeed.h" #include "services/owncloud/owncloudfeed.h"
@ -36,6 +33,12 @@
#include "services/tt-rss/ttrssfeed.h" #include "services/tt-rss/ttrssfeed.h"
#include "services/tt-rss/ttrssserviceroot.h" #include "services/tt-rss/ttrssserviceroot.h"
#if defined(USE_WEBENGINE)
#include "services/inoreader/inoreaderfeed.h"
#include "services/inoreader/inoreaderserviceroot.h"
#include "services/inoreader/network/inoreadernetworkfactory.h"
#endif
#include <QSqlError> #include <QSqlError>
#include <QUrl> #include <QUrl>
#include <QVariant> #include <QVariant>
@ -1483,6 +1486,7 @@ Assignment DatabaseQueries::getCategories(QSqlDatabase db, int account_id, bool*
return categories; return categories;
} }
#if defined(USE_WEBENGINE)
Assignment DatabaseQueries::getInoreaderFeeds(QSqlDatabase db, int account_id, bool* ok) { Assignment DatabaseQueries::getInoreaderFeeds(QSqlDatabase db, int account_id, bool* ok) {
Assignment feeds; Assignment feeds;
QSqlQuery q(db); QSqlQuery q(db);
@ -1591,6 +1595,8 @@ bool DatabaseQueries::createInoreaderAccount(QSqlDatabase db, int id_to_assign,
} }
} }
#endif
Assignment DatabaseQueries::getTtRssFeeds(QSqlDatabase db, int account_id, bool* ok) { Assignment DatabaseQueries::getTtRssFeeds(QSqlDatabase db, int account_id, bool* ok) {
Assignment feeds; Assignment feeds;

View File

@ -79,12 +79,14 @@ class DatabaseQueries {
static Assignment getCategories(QSqlDatabase db, int account_id, bool* ok = nullptr); static Assignment getCategories(QSqlDatabase db, int account_id, bool* ok = nullptr);
// Inoreader account. // Inoreader account.
#if defined(USE_WEBENGINE)
static Assignment getInoreaderFeeds(QSqlDatabase db, int account_id, bool* ok = nullptr); static Assignment getInoreaderFeeds(QSqlDatabase db, int account_id, bool* ok = nullptr);
static QList<ServiceRoot*> getInoreaderAccounts(QSqlDatabase db, bool* ok = nullptr); static QList<ServiceRoot*> getInoreaderAccounts(QSqlDatabase db, bool* ok = nullptr);
static bool overwriteInoreaderAccount(QSqlDatabase db, const QString& username, const QString& access_token, static bool overwriteInoreaderAccount(QSqlDatabase db, const QString& username, const QString& access_token,
const QString& refresh_token, int batch_size, int account_id); const QString& refresh_token, int batch_size, int account_id);
static bool createInoreaderAccount(QSqlDatabase db, int id_to_assign, const QString& username, static bool createInoreaderAccount(QSqlDatabase db, int id_to_assign, const QString& username,
const QString& access_token, const QString& refresh_token, int batch_size); const QString& access_token, const QString& refresh_token, int batch_size);
#endif
// ownCloud account. // ownCloud account.
static QList<ServiceRoot*> getOwnCloudAccounts(QSqlDatabase db, bool* ok = nullptr); static QList<ServiceRoot*> getOwnCloudAccounts(QSqlDatabase db, bool* ok = nullptr);

View File

@ -19,7 +19,11 @@
#include "miscellaneous/feedreader.h" #include "miscellaneous/feedreader.h"
#include "services/abstract/serviceroot.h" #include "services/abstract/serviceroot.h"
#if defined(USE_WEBENGINE)
#include "services/inoreader/inoreaderentrypoint.h" #include "services/inoreader/inoreaderentrypoint.h"
#endif
#include "services/owncloud/owncloudserviceentrypoint.h" #include "services/owncloud/owncloudserviceentrypoint.h"
#include "services/standard/standardserviceentrypoint.h" #include "services/standard/standardserviceentrypoint.h"
#include "services/tt-rss/ttrssserviceentrypoint.h" #include "services/tt-rss/ttrssserviceentrypoint.h"
@ -65,7 +69,9 @@ FeedReader::~FeedReader() {
QList<ServiceEntryPoint*> FeedReader::feedServices() { QList<ServiceEntryPoint*> FeedReader::feedServices() {
if (m_feedServices.isEmpty()) { if (m_feedServices.isEmpty()) {
// NOTE: All installed services create their entry points here. // NOTE: All installed services create their entry points here.
#if defined(USE_WEBENGINE)
m_feedServices.append(new InoreaderEntryPoint()); m_feedServices.append(new InoreaderEntryPoint());
#endif
m_feedServices.append(new OwnCloudServiceEntryPoint()); m_feedServices.append(new OwnCloudServiceEntryPoint());
m_feedServices.append(new StandardServiceEntryPoint()); m_feedServices.append(new StandardServiceEntryPoint());
m_feedServices.append(new TtRssServiceEntryPoint()); m_feedServices.append(new TtRssServiceEntryPoint());