save
This commit is contained in:
parent
7d709dcc81
commit
fdc3a81d73
@ -1,9 +1,7 @@
|
||||
if(NOT DEFINED LIBRSSGUARD_BINARY_PATH)
|
||||
set(LIBRSSGUARD_SOURCE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../librssguard")
|
||||
set(LIBRSSGUARD_SOURCE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
endif()
|
||||
|
||||
#set(LIBRSSGUARD_BINARY_PATH "${CMAKE_BINARY_DIR}/src/librssguard")
|
||||
|
||||
set(SOURCES
|
||||
src/definitions.h
|
||||
src/gui/formdiscoverfeeds.cpp
|
||||
@ -51,6 +49,21 @@ set(UI_FILES
|
||||
src/gui/standardfeeddetails.ui
|
||||
)
|
||||
|
||||
# Add ZLIB.
|
||||
if(ENABLE_COMPRESSED_SITEMAP)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
# Add qcompressor.
|
||||
list(APPEND SOURCES
|
||||
src/3rd-party/qcompressor/qcompressor.cpp
|
||||
src/3rd-party/qcompressor/qcompressor.h
|
||||
)
|
||||
endif(ENABLE_COMPRESSED_SITEMAP)
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
message(STATUS "Using system zlib ${ZLIB_VERSION_STRING}.")
|
||||
endif(ZLIB_FOUND)
|
||||
|
||||
# Deal with .ui files.
|
||||
qt_wrap_ui(SOURCES ${UI_FILES})
|
||||
|
||||
@ -71,7 +84,6 @@ target_compile_definitions(rssguard-standard
|
||||
|
||||
target_include_directories(rssguard-standard
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBRSSGUARD_SOURCE_PATH}
|
||||
)
|
||||
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
#include "src/gui/formdiscoverfeeds.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "database/databasequeries.h"
|
||||
#include "gui/guiutilities.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/abstract/serviceroot.h"
|
||||
#include "librssguard/3rd-party/boolinq/boolinq.h"
|
||||
#include "librssguard/database/databasequeries.h"
|
||||
#include "librssguard/gui/guiutilities.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "librssguard/miscellaneous/iconfactory.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/services/abstract/category.h"
|
||||
#include "librssguard/services/abstract/serviceroot.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/gui/formstandardfeeddetails.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
@ -7,9 +7,10 @@
|
||||
|
||||
#include "ui_formdiscoverfeeds.h"
|
||||
|
||||
#include "services/abstract/accountcheckmodel.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include <librssguard/services/abstract/accountcheckmodel.h>
|
||||
|
||||
#include <QFutureWatcher>
|
||||
|
||||
class ServiceRoot;
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef FORMEDITSTANDARDACCOUNT_H
|
||||
#define FORMEDITSTANDARDACCOUNT_H
|
||||
|
||||
#include "services/abstract/gui/formaccountdetails.h"
|
||||
#include <librssguard/services/abstract/gui/formaccountdetails.h>
|
||||
|
||||
class StandardAccountDetails;
|
||||
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
#include "src/gui/formstandardfeeddetails.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "network-web/webfactory.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/abstract/gui/authenticationdetails.h"
|
||||
#include "services/abstract/serviceroot.h"
|
||||
#include "librssguard/database/databasequeries.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "librssguard/network-web/networkfactory.h"
|
||||
#include "librssguard/network-web/webfactory.h"
|
||||
#include "librssguard/services/abstract/category.h"
|
||||
#include "librssguard/services/abstract/gui/authenticationdetails.h"
|
||||
#include "librssguard/services/abstract/serviceroot.h"
|
||||
#include "src/gui/standardfeeddetails.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef FORMSSFEEDDETAILS_H
|
||||
#define FORMSSFEEDDETAILS_H
|
||||
|
||||
#include "services/abstract/gui/formfeeddetails.h"
|
||||
#include "librssguard/services/abstract/gui/formfeeddetails.h"
|
||||
|
||||
class StandardFeedDetails;
|
||||
class StandardServiceRoot;
|
||||
@ -11,11 +11,13 @@ class AuthenticationDetails;
|
||||
class StandardFeed;
|
||||
|
||||
class FormStandardFeedDetails : public FormFeedDetails {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormStandardFeedDetails(ServiceRoot* service_root, RootItem* parent_to_select = nullptr,
|
||||
const QString& url = QString(), QWidget* parent = nullptr);
|
||||
explicit FormStandardFeedDetails(ServiceRoot* service_root,
|
||||
RootItem* parent_to_select = nullptr,
|
||||
const QString& url = QString(),
|
||||
QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void guessFeed();
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
#include "src/gui/formstandardimportexport.h"
|
||||
|
||||
#include "exceptions/ioexception.h"
|
||||
#include "gui/guiutilities.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "librssguard/exceptions/ioexception.h"
|
||||
#include "librssguard/gui/guiutilities.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "librssguard/miscellaneous/iconfactory.h"
|
||||
#include "librssguard/services/abstract/category.h"
|
||||
#include "src/standardfeedsimportexportmodel.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include "src/gui/standardaccountdetails.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "librssguard/3rd-party/boolinq/boolinq.h"
|
||||
#include "librssguard/miscellaneous/iconfactory.h"
|
||||
#include "src/standardserviceentrypoint.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
#include "src/gui/standardfeeddetails.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "exceptions/networkexception.h"
|
||||
#include "exceptions/scriptexception.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "librssguard/3rd-party/boolinq/boolinq.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/exceptions/networkexception.h"
|
||||
#include "librssguard/exceptions/scriptexception.h"
|
||||
#include "librssguard/miscellaneous/iconfactory.h"
|
||||
#include "librssguard/miscellaneous/textfactory.h"
|
||||
#include "librssguard/network-web/networkfactory.h"
|
||||
#include "librssguard/services/abstract/category.h"
|
||||
#include "src/definitions.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
#include "src/parsers/atomparser.h"
|
||||
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/miscellaneous/textfactory.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "core/message.h"
|
||||
#include "librssguard/core/message.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QList>
|
||||
|
@ -4,12 +4,11 @@
|
||||
|
||||
#include "src/definitions.h"
|
||||
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "exceptions/feedfetchexception.h"
|
||||
// #include "miscellaneous/application.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "miscellaneous/iofactory.h"
|
||||
#include "network-web/webfactory.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/exceptions/feedfetchexception.h"
|
||||
#include "librssguard/miscellaneous/iofactory.h"
|
||||
#include "librssguard/network-web/webfactory.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
|
||||
#include "core/message.h"
|
||||
#include "definitions/typedefs.h"
|
||||
#include "librssguard/core/message.h"
|
||||
#include "librssguard/definitions/typedefs.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
// Base class for all XML-based feed parsers.
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
#include "src/parsers/icalparser.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "librssguard/3rd-party/boolinq/boolinq.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/miscellaneous/textfactory.h"
|
||||
#include "src/definitions.h"
|
||||
|
||||
IcalParser::IcalParser(const QString& data)
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
#include "src/parsers/jsonparser.h"
|
||||
|
||||
#include "definitions/definitions.h"
|
||||
#include "definitions/typedefs.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/definitions/typedefs.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/miscellaneous/textfactory.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "core/message.h"
|
||||
#include "librssguard/core/message.h"
|
||||
|
||||
class JsonParser : public FeedParser {
|
||||
public:
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
#include "src/parsers/rdfparser.h"
|
||||
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/miscellaneous/textfactory.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "core/message.h"
|
||||
#include "librssguard/core/message.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
#include "src/parsers/rssparser.h"
|
||||
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/miscellaneous/textfactory.h"
|
||||
#include "librssguard/network-web/networkfactory.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "core/message.h"
|
||||
#include "librssguard/core/message.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
|
@ -3,14 +3,14 @@
|
||||
#include "src/parsers/sitemapparser.h"
|
||||
|
||||
#if defined(ENABLE_COMPRESSED_SITEMAP)
|
||||
#include "3rd-party/qcompressor/qcompressor.h"
|
||||
#include "librssguard/3rd-party/qcompressor/qcompressor.h"
|
||||
#endif
|
||||
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/miscellaneous/textfactory.h"
|
||||
#include "src/definitions.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
#include "src/standardcategory.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "services/abstract/gui/formcategorydetails.h"
|
||||
#include "librssguard/database/databasequeries.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/services/abstract/gui/formcategorydetails.h"
|
||||
#include "src/standardfeed.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef FEEDSMODELCATEGORY_H
|
||||
#define FEEDSMODELCATEGORY_H
|
||||
|
||||
#include "services/abstract/category.h"
|
||||
#include "librssguard/services/abstract/category.h"
|
||||
|
||||
#include <QSqlRecord>
|
||||
|
||||
|
@ -2,20 +2,20 @@
|
||||
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "exceptions/networkexception.h"
|
||||
#include "exceptions/scriptexception.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "librssguard/database/databasequeries.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "librssguard/exceptions/networkexception.h"
|
||||
#include "librssguard/exceptions/scriptexception.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/miscellaneous/textfactory.h"
|
||||
#include "src/gui/formstandardfeeddetails.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
#if defined(NO_LITE)
|
||||
#include "gui/webviewers/webengine/webengineviewer.h"
|
||||
#include "network-web/webengine/webenginepage.h"
|
||||
#include "librssguard/gui/webviewers/webengine/webengineviewer.h"
|
||||
#include "librssguard/network-web/webengine/webenginepage.h"
|
||||
#endif
|
||||
|
||||
#include "src/parsers/atomparser.h"
|
||||
@ -26,7 +26,7 @@
|
||||
#include "src/parsers/sitemapparser.h"
|
||||
|
||||
#if defined(ENABLE_COMPRESSED_SITEMAP)
|
||||
#include "3rd-party/qcompressor/qcompressor.h"
|
||||
#include "librssguard/3rd-party/qcompressor/qcompressor.h"
|
||||
#endif
|
||||
|
||||
#include <QCommandLineParser>
|
||||
|
@ -3,9 +3,9 @@
|
||||
#ifndef FEEDSMODELFEED_H
|
||||
#define FEEDSMODELFEED_H
|
||||
|
||||
#include "services/abstract/feed.h"
|
||||
#include "librssguard/services/abstract/feed.h"
|
||||
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "librssguard/network-web/networkfactory.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
#include "src/standardfeedsimportexportmodel.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "librssguard/3rd-party/boolinq/boolinq.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "librssguard/miscellaneous/iconfactory.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardcategory.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef STANDARDFEEDSIMPORTEXPORTMODEL_H
|
||||
#define STANDARDFEEDSIMPORTEXPORTMODEL_H
|
||||
|
||||
#include "services/abstract/accountcheckmodel.h"
|
||||
#include "librssguard/services/abstract/accountcheckmodel.h"
|
||||
|
||||
#include <QDomElement>
|
||||
#include <QFutureWatcher>
|
||||
@ -27,7 +27,10 @@ class FeedsImportExportModel : public AccountCheckSortedModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class Mode { Import, Export };
|
||||
enum class Mode {
|
||||
Import,
|
||||
Export
|
||||
};
|
||||
|
||||
explicit FeedsImportExportModel(StandardServiceRoot* account, QObject* parent = nullptr);
|
||||
virtual ~FeedsImportExportModel();
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
#include "src/standardserviceentrypoint.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "librssguard/database/databasequeries.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "src/gui/formeditstandardaccount.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef STANDARDSERVICEENTRYPOINT_H
|
||||
#define STANDARDSERVICEENTRYPOINT_H
|
||||
|
||||
#include "services/abstract/serviceentrypoint.h"
|
||||
#include "librssguard/services/abstract/serviceentrypoint.h"
|
||||
|
||||
class RSSGUARD_DLLSPEC_EXPORT StandardServiceEntryPoint : public QObject, public ServiceEntryPoint {
|
||||
Q_OBJECT
|
||||
|
@ -2,19 +2,19 @@
|
||||
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "exceptions/feedfetchexception.h"
|
||||
#include "exceptions/scriptexception.h"
|
||||
#include "gui/messagebox.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "miscellaneous/mutex.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "librssguard/database/databasequeries.h"
|
||||
#include "librssguard/definitions/definitions.h"
|
||||
#include "librssguard/exceptions/applicationexception.h"
|
||||
#include "librssguard/exceptions/feedfetchexception.h"
|
||||
#include "librssguard/exceptions/scriptexception.h"
|
||||
#include "librssguard/gui/messagebox.h"
|
||||
#include "librssguard/miscellaneous/application.h"
|
||||
#include "librssguard/miscellaneous/iconfactory.h"
|
||||
#include "librssguard/miscellaneous/mutex.h"
|
||||
#include "librssguard/miscellaneous/settings.h"
|
||||
#include "librssguard/network-web/networkfactory.h"
|
||||
#include "librssguard/services/abstract/gui/formcategorydetails.h"
|
||||
|
||||
#include "services/abstract/gui/formcategorydetails.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/gui/formdiscoverfeeds.h"
|
||||
#include "src/gui/formeditstandardaccount.h"
|
||||
@ -32,12 +32,12 @@
|
||||
#include "src/standardserviceentrypoint.h"
|
||||
|
||||
#if defined(NO_LITE)
|
||||
#include "gui/webviewers/webengine/webengineviewer.h"
|
||||
#include "network-web/webengine/webenginepage.h"
|
||||
#include "librssguard/gui/webviewers/webengine/webengineviewer.h"
|
||||
#include "librssguard/network-web/webengine/webenginepage.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_COMPRESSED_SITEMAP)
|
||||
#include "3rd-party/qcompressor/qcompressor.h"
|
||||
#include "librssguard/3rd-party/qcompressor/qcompressor.h"
|
||||
#endif
|
||||
|
||||
#include <QAction>
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef STANDARDSERVICEROOT_H
|
||||
#define STANDARDSERVICEROOT_H
|
||||
|
||||
#include "services/abstract/serviceroot.h"
|
||||
#include "librssguard/services/abstract/serviceroot.h"
|
||||
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
|
@ -1,196 +0,0 @@
|
||||
#include "qcompressor.h"
|
||||
|
||||
/**
|
||||
* @brief Compresses the given buffer using the standard GZIP algorithm
|
||||
* @param input The buffer to be compressed
|
||||
* @param output The result of the compression
|
||||
* @param level The compression level to be used (@c 0 = no compression, @c 9 = max, @c -1 = default)
|
||||
* @return @c true if the compression was successful, @c false otherwise
|
||||
*/
|
||||
bool QCompressor::gzipCompress(QByteArray input, QByteArray &output, int level)
|
||||
{
|
||||
// Prepare output
|
||||
output.clear();
|
||||
|
||||
// Is there something to do?
|
||||
if(input.length())
|
||||
{
|
||||
// Declare vars
|
||||
int flush = 0;
|
||||
|
||||
// Prepare deflater status
|
||||
z_stream strm;
|
||||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
strm.avail_in = 0;
|
||||
strm.next_in = Z_NULL;
|
||||
|
||||
// Initialize deflater
|
||||
int ret = deflateInit2(&strm, qMax(-1, qMin(9, level)), Z_DEFLATED, GZIP_WINDOWS_BIT, 8, Z_DEFAULT_STRATEGY);
|
||||
|
||||
if (ret != Z_OK)
|
||||
return(false);
|
||||
|
||||
// Prepare output
|
||||
output.clear();
|
||||
|
||||
// Extract pointer to input data
|
||||
char *input_data = input.data();
|
||||
int input_data_left = input.length();
|
||||
|
||||
// Compress data until available
|
||||
do {
|
||||
// Determine current chunk size
|
||||
int chunk_size = qMin(GZIP_CHUNK_SIZE, input_data_left);
|
||||
|
||||
// Set deflater references
|
||||
strm.next_in = (unsigned char*)input_data;
|
||||
strm.avail_in = chunk_size;
|
||||
|
||||
// Update interval variables
|
||||
input_data += chunk_size;
|
||||
input_data_left -= chunk_size;
|
||||
|
||||
// Determine if it is the last chunk
|
||||
flush = (input_data_left <= 0 ? Z_FINISH : Z_NO_FLUSH);
|
||||
|
||||
// Deflate chunk and cumulate output
|
||||
do {
|
||||
|
||||
// Declare vars
|
||||
char out[GZIP_CHUNK_SIZE];
|
||||
|
||||
// Set deflater references
|
||||
strm.next_out = (unsigned char*)out;
|
||||
strm.avail_out = GZIP_CHUNK_SIZE;
|
||||
|
||||
// Try to deflate chunk
|
||||
ret = deflate(&strm, flush);
|
||||
|
||||
// Check errors
|
||||
if(ret == Z_STREAM_ERROR)
|
||||
{
|
||||
// Clean-up
|
||||
deflateEnd(&strm);
|
||||
|
||||
// Return
|
||||
return(false);
|
||||
}
|
||||
|
||||
// Determine compressed size
|
||||
int have = (GZIP_CHUNK_SIZE - strm.avail_out);
|
||||
|
||||
// Cumulate result
|
||||
if(have > 0)
|
||||
output.append((char*)out, have);
|
||||
|
||||
} while (strm.avail_out == 0);
|
||||
|
||||
} while (flush != Z_FINISH);
|
||||
|
||||
// Clean-up
|
||||
(void)deflateEnd(&strm);
|
||||
|
||||
// Return
|
||||
return(ret == Z_STREAM_END);
|
||||
}
|
||||
else
|
||||
return(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decompresses the given buffer using the standard GZIP algorithm
|
||||
* @param input The buffer to be decompressed
|
||||
* @param output The result of the decompression
|
||||
* @return @c true if the decompression was successfull, @c false otherwise
|
||||
*/
|
||||
bool QCompressor::gzipDecompress(QByteArray input, QByteArray &output)
|
||||
{
|
||||
// Prepare output
|
||||
output.clear();
|
||||
|
||||
// Is there something to do?
|
||||
if(input.length() > 0)
|
||||
{
|
||||
// Prepare inflater status
|
||||
z_stream strm;
|
||||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
strm.avail_in = 0;
|
||||
strm.next_in = Z_NULL;
|
||||
|
||||
// Initialize inflater
|
||||
int ret = inflateInit2(&strm, GZIP_WINDOWS_BIT);
|
||||
|
||||
if (ret != Z_OK)
|
||||
return(false);
|
||||
|
||||
// Extract pointer to input data
|
||||
char *input_data = input.data();
|
||||
int input_data_left = input.length();
|
||||
|
||||
// Decompress data until available
|
||||
do {
|
||||
// Determine current chunk size
|
||||
int chunk_size = qMin(GZIP_CHUNK_SIZE, input_data_left);
|
||||
|
||||
// Check for termination
|
||||
if(chunk_size <= 0)
|
||||
break;
|
||||
|
||||
// Set inflater references
|
||||
strm.next_in = (unsigned char*)input_data;
|
||||
strm.avail_in = chunk_size;
|
||||
|
||||
// Update interval variables
|
||||
input_data += chunk_size;
|
||||
input_data_left -= chunk_size;
|
||||
|
||||
// Inflate chunk and cumulate output
|
||||
do {
|
||||
|
||||
// Declare vars
|
||||
char out[GZIP_CHUNK_SIZE];
|
||||
|
||||
// Set inflater references
|
||||
strm.next_out = (unsigned char*)out;
|
||||
strm.avail_out = GZIP_CHUNK_SIZE;
|
||||
|
||||
// Try to inflate chunk
|
||||
ret = inflate(&strm, Z_NO_FLUSH);
|
||||
|
||||
switch (ret) {
|
||||
case Z_NEED_DICT:
|
||||
ret = Z_DATA_ERROR;
|
||||
case Z_DATA_ERROR:
|
||||
case Z_MEM_ERROR:
|
||||
case Z_STREAM_ERROR:
|
||||
// Clean-up
|
||||
inflateEnd(&strm);
|
||||
|
||||
// Return
|
||||
return(false);
|
||||
}
|
||||
|
||||
// Determine decompressed size
|
||||
int have = (GZIP_CHUNK_SIZE - strm.avail_out);
|
||||
|
||||
// Cumulate result
|
||||
if(have > 0)
|
||||
output.append((char*)out, have);
|
||||
|
||||
} while (strm.avail_out == 0);
|
||||
|
||||
} while (ret != Z_STREAM_END);
|
||||
|
||||
// Clean-up
|
||||
inflateEnd(&strm);
|
||||
|
||||
// Return
|
||||
return (ret == Z_STREAM_END);
|
||||
}
|
||||
else
|
||||
return(true);
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#ifndef QCOMPRESSOR_H
|
||||
#define QCOMPRESSOR_H
|
||||
|
||||
#include <zlib.h>
|
||||
#include <QByteArray>
|
||||
|
||||
#define GZIP_WINDOWS_BIT 15 + 16
|
||||
#define GZIP_CHUNK_SIZE 32 * 1024
|
||||
|
||||
class QCompressor
|
||||
{
|
||||
public:
|
||||
static bool gzipCompress(QByteArray input, QByteArray &output, int level = -1);
|
||||
static bool gzipDecompress(QByteArray input, QByteArray &output);
|
||||
};
|
||||
|
||||
#endif // QCOMPRESSOR_H
|
@ -584,21 +584,6 @@ else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1")
|
||||
endif()
|
||||
|
||||
# Add ZLIB.
|
||||
if(ENABLE_COMPRESSED_SITEMAP)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
# Add qcompressor.
|
||||
list(APPEND SOURCES
|
||||
3rd-party/qcompressor/qcompressor.cpp
|
||||
3rd-party/qcompressor/qcompressor.h
|
||||
)
|
||||
endif(ENABLE_COMPRESSED_SITEMAP)
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
message(STATUS "Using system zlib ${ZLIB_VERSION_STRING}.")
|
||||
endif(ZLIB_FOUND)
|
||||
|
||||
# Add SimpleCrypt.
|
||||
list(APPEND SOURCES
|
||||
3rd-party/sc/simplecrypt.cpp
|
||||
|
Loading…
x
Reference in New Issue
Block a user