initial poc - plugins are now loaded from their own DLL/SO/DYLIB files
This commit is contained in:
parent
d56fbd7539
commit
f585398a64
@ -308,7 +308,12 @@ elseif(UNIX AND NOT ANDROID)
|
||||
)
|
||||
endif()
|
||||
|
||||
# Generate localizations, build library and application.
|
||||
# Common libraries.
|
||||
add_subdirectory(src/librssguard)
|
||||
add_subdirectory(localization)
|
||||
|
||||
# Plugins.
|
||||
add_subdirectory(src/librssguard-standard)
|
||||
|
||||
# GUI executable.
|
||||
add_subdirectory(src/rssguard)
|
||||
|
148
src/librssguard-standard/CMakeLists.txt
Normal file
148
src/librssguard-standard/CMakeLists.txt
Normal file
@ -0,0 +1,148 @@
|
||||
set(LIBRSSGUARD_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../librssguard")
|
||||
|
||||
set(SOURCES
|
||||
src/definitions.h
|
||||
src/gui/formdiscoverfeeds.cpp
|
||||
src/gui/formdiscoverfeeds.h
|
||||
src/gui/formeditstandardaccount.cpp
|
||||
src/gui/formeditstandardaccount.h
|
||||
src/gui/formstandardfeeddetails.cpp
|
||||
src/gui/formstandardfeeddetails.h
|
||||
src/gui/formstandardimportexport.cpp
|
||||
src/gui/formstandardimportexport.h
|
||||
src/gui/standardaccountdetails.cpp
|
||||
src/gui/standardaccountdetails.h
|
||||
src/gui/standardfeeddetails.cpp
|
||||
src/gui/standardfeeddetails.h
|
||||
src/parsers/atomparser.cpp
|
||||
src/parsers/atomparser.h
|
||||
src/parsers/feedparser.cpp
|
||||
src/parsers/feedparser.h
|
||||
src/parsers/icalparser.cpp
|
||||
src/parsers/icalparser.h
|
||||
src/parsers/jsonparser.cpp
|
||||
src/parsers/jsonparser.h
|
||||
src/parsers/rdfparser.cpp
|
||||
src/parsers/rdfparser.h
|
||||
src/parsers/rssparser.cpp
|
||||
src/parsers/rssparser.h
|
||||
src/parsers/sitemapparser.cpp
|
||||
src/parsers/sitemapparser.h
|
||||
src/standardcategory.cpp
|
||||
src/standardcategory.h
|
||||
src/standardfeed.cpp
|
||||
src/standardfeed.h
|
||||
src/standardfeedsimportexportmodel.cpp
|
||||
src/standardfeedsimportexportmodel.h
|
||||
src/standardserviceentrypoint.cpp
|
||||
src/standardserviceentrypoint.h
|
||||
src/standardserviceroot.cpp
|
||||
src/standardserviceroot.h
|
||||
)
|
||||
|
||||
set(UI_FILES
|
||||
src/gui/formdiscoverfeeds.ui
|
||||
src/gui/formstandardimportexport.ui
|
||||
src/gui/standardaccountdetails.ui
|
||||
src/gui/standardfeeddetails.ui
|
||||
)
|
||||
|
||||
# Add mimesis.
|
||||
list(APPEND SOURCES
|
||||
${LIBRSSGUARD_PATH}/3rd-party/mimesis/mimesis.hpp
|
||||
${LIBRSSGUARD_PATH}/3rd-party/mimesis/quoted-printable.hpp
|
||||
)
|
||||
|
||||
# Add boolinq.
|
||||
list(APPEND SOURCES
|
||||
${LIBRSSGUARD_PATH}/3rd-party/boolinq/boolinq.h
|
||||
)
|
||||
|
||||
# Deal with .ui files.
|
||||
qt_wrap_ui(SOURCES ${UI_FILES})
|
||||
|
||||
# Bundle version info.
|
||||
if(WIN32)
|
||||
enable_language("RC")
|
||||
list(APPEND SOURCES "${CMAKE_BINARY_DIR}/rssguard.rc")
|
||||
endif()
|
||||
|
||||
add_library(rssguard-standard SHARED ${SOURCES} ${QM_FILES})
|
||||
|
||||
# Add specific definitions.
|
||||
target_compile_definitions(rssguard-standard
|
||||
PRIVATE
|
||||
RSSGUARD_DLLSPEC=Q_DECL_IMPORT
|
||||
RSSGUARD_DLLSPEC_EXPORT=Q_DECL_EXPORT
|
||||
|
||||
APP_AUTHOR="${APP_AUTHOR}"
|
||||
APP_DONATE_URL="${APP_DONATE_URL}"
|
||||
APP_EMAIL="${APP_EMAIL}"
|
||||
APP_LOW_H_NAME=".${CMAKE_PROJECT_NAME}"
|
||||
APP_REVISION="${APP_REVISION}"
|
||||
APP_SYSTEM_NAME="${CMAKE_SYSTEM_NAME}"
|
||||
APP_SYSTEM_VERSION="${CMAKE_SYSTEM_PROCESSOR}"
|
||||
|
||||
APP_URL_DOCUMENTATION="${APP_URL_DOCUMENTATION}"
|
||||
APP_URL_ISSUES_NEW="${APP_URL_ISSUES_NEW}"
|
||||
APP_USERAGENT="${APP_NAME}/${CMAKE_PROJECT_VERSION}")
|
||||
|
||||
target_include_directories(rssguard-standard
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}/src/librssguard
|
||||
${LIBRSSGUARD_PATH}
|
||||
${LIBRSSGUARD_PATH}/gui/dialogs
|
||||
${LIBRSSGUARD_PATH}/gui/reusable
|
||||
${LIBRSSGUARD_PATH}/services/abstract/gui
|
||||
${LIBRSSGUARD_PATH}/dynamic-shortcuts
|
||||
|
||||
PRIVATE
|
||||
${LIBRSSGUARD_PATH}/gui/notifications
|
||||
${LIBRSSGUARD_PATH}/gui/toolbars
|
||||
${LIBRSSGUARD_PATH}/gui/richtexteditor
|
||||
)
|
||||
|
||||
# Qt.
|
||||
target_link_libraries(rssguard-standard PUBLIC
|
||||
rssguard
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Qml
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::Xml
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
)
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 6)
|
||||
target_link_libraries(rssguard-standard PUBLIC
|
||||
Qt${QT_VERSION_MAJOR}::Core5Compat
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(rssguard-standard PUBLIC
|
||||
Qt${QT_VERSION_MAJOR}::GuiPrivate
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NO_LITE)
|
||||
target_link_libraries(rssguard-standard PUBLIC
|
||||
Qt${QT_VERSION_MAJOR}::WebEngineWidgets
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32 OR OS2)
|
||||
install(TARGETS rssguard-standard DESTINATION .)
|
||||
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
include (GNUInstallDirs)
|
||||
install(TARGETS rssguard-standard
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
elseif(APPLE)
|
||||
install(TARGETS rssguard-standard
|
||||
DESTINATION Contents/MacOS
|
||||
)
|
||||
endif()
|
5
src/librssguard-standard/plugin.json
Normal file
5
src/librssguard-standard/plugin.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Standard RSS/ATOM/JSON plugin",
|
||||
"author": "Martin Rotter",
|
||||
"website": "https://github.com/martinrotter/rssguard"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/gui/formdiscoverfeeds.h"
|
||||
#include "src/gui/formdiscoverfeeds.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "database/databasequeries.h"
|
||||
@ -10,16 +10,16 @@
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/abstract/serviceroot.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "services/standard/gui/formstandardfeeddetails.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/gui/formstandardfeeddetails.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include "services/standard/parsers/atomparser.h"
|
||||
#include "services/standard/parsers/icalparser.h"
|
||||
#include "services/standard/parsers/jsonparser.h"
|
||||
#include "services/standard/parsers/rdfparser.h"
|
||||
#include "services/standard/parsers/rssparser.h"
|
||||
#include "services/standard/parsers/sitemapparser.h"
|
||||
#include "src/parsers/atomparser.h"
|
||||
#include "src/parsers/icalparser.h"
|
||||
#include "src/parsers/jsonparser.h"
|
||||
#include "src/parsers/rdfparser.h"
|
||||
#include "src/parsers/rssparser.h"
|
||||
#include "src/parsers/sitemapparser.h"
|
||||
|
||||
#include <QtConcurrentMap>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "ui_formdiscoverfeeds.h"
|
||||
|
||||
#include "services/abstract/accountcheckmodel.h"
|
||||
#include "services/standard/parsers/feedparser.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include <QFutureWatcher>
|
||||
|
@ -1,10 +1,10 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/gui/formeditstandardaccount.h"
|
||||
#include "src/gui/formeditstandardaccount.h"
|
||||
|
||||
#include "services/standard/gui/standardaccountdetails.h"
|
||||
#include "services/standard/standardserviceentrypoint.h"
|
||||
#include "services/standard/standardserviceroot.h"
|
||||
#include "src/gui/standardaccountdetails.h"
|
||||
#include "src/standardserviceentrypoint.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
FormEditStandardAccount::FormEditStandardAccount(QWidget* parent)
|
||||
: FormAccountDetails(StandardServiceEntryPoint().icon(), parent),
|
@ -1,6 +1,6 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/gui/formstandardfeeddetails.h"
|
||||
#include "src/gui/formstandardfeeddetails.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
@ -10,8 +10,8 @@
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/abstract/gui/authenticationdetails.h"
|
||||
#include "services/abstract/serviceroot.h"
|
||||
#include "services/standard/gui/standardfeeddetails.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/gui/standardfeeddetails.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QNetworkCookie>
|
@ -1,14 +1,14 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/gui/formstandardimportexport.h"
|
||||
#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 "services/standard/standardfeedsimportexportmodel.h"
|
||||
#include "services/standard/standardserviceroot.h"
|
||||
#include "src/standardfeedsimportexportmodel.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QTextStream>
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "services/standard/standardfeedsimportexportmodel.h"
|
||||
#include "src/standardfeedsimportexportmodel.h"
|
||||
#include "ui_formstandardimportexport.h"
|
||||
|
||||
namespace Ui {
|
@ -1,10 +1,10 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/gui/standardaccountdetails.h"
|
||||
#include "src/gui/standardaccountdetails.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "services/standard/standardserviceentrypoint.h"
|
||||
#include "src/standardserviceentrypoint.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QImageReader>
|
@ -1,6 +1,6 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/gui/standardfeeddetails.h"
|
||||
#include "src/gui/standardfeeddetails.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
@ -10,7 +10,7 @@
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "src/definitions.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QImageReader>
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "ui_standardfeeddetails.h"
|
||||
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include <QNetworkProxy>
|
||||
|
@ -1,14 +1,14 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/parsers/atomparser.h"
|
||||
#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 "services/standard/definitions.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include <QTextCodec>
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef ATOMPARSER_H
|
||||
#define ATOMPARSER_H
|
||||
|
||||
#include "services/standard/parsers/feedparser.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "core/message.h"
|
||||
|
@ -1,14 +1,18 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/parsers/feedparser.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "src/definitions.h"
|
||||
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "exceptions/feedfetchexception.h"
|
||||
#include "miscellaneous/application.h"
|
||||
// #include "miscellaneous/application.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "miscellaneous/iofactory.h"
|
||||
#include "network-web/webfactory.h"
|
||||
#include "services/standard/definitions.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include <utility>
|
||||
@ -344,7 +348,7 @@ QString FeedParser::xmlRawChild(const QDomElement& container) const {
|
||||
QTextStream str(&raw_ch);
|
||||
|
||||
children.at(i).save(str, 0);
|
||||
raw += qApp->web()->unescapeHtml(raw_ch);
|
||||
raw += WebFactory::unescapeHtml(raw_ch);
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "core/message.h"
|
||||
#include "definitions/typedefs.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
// Base class for all XML-based feed parsers.
|
||||
class FeedParser {
|
@ -1,6 +1,6 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/parsers/icalparser.h"
|
||||
#include "src/parsers/icalparser.h"
|
||||
|
||||
#include "3rd-party/boolinq/boolinq.h"
|
||||
#include "definitions/definitions.h"
|
||||
@ -9,7 +9,7 @@
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "src/definitions.h"
|
||||
|
||||
IcalParser::IcalParser(const QString& data)
|
||||
: FeedParser(data, DataType::Other), m_iCalendar(Icalendar(m_data.toUtf8())) {}
|
@ -3,7 +3,7 @@
|
||||
#ifndef ICALPARSER_H
|
||||
#define ICALPARSER_H
|
||||
|
||||
#include "services/standard/parsers/feedparser.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include <QTimeZone>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/parsers/jsonparser.h"
|
||||
#include "src/parsers/jsonparser.h"
|
||||
|
||||
#include "definitions/definitions.h"
|
||||
#include "definitions/typedefs.h"
|
||||
@ -8,8 +8,8 @@
|
||||
#include "exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
@ -3,7 +3,7 @@
|
||||
#ifndef JSONPARSER_H
|
||||
#define JSONPARSER_H
|
||||
|
||||
#include "services/standard/parsers/feedparser.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "core/message.h"
|
||||
|
@ -1,12 +1,12 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/parsers/rdfparser.h"
|
||||
#include "src/parsers/rdfparser.h"
|
||||
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QTextCodec>
|
@ -3,7 +3,7 @@
|
||||
#ifndef RDFPARSER_H
|
||||
#define RDFPARSER_H
|
||||
|
||||
#include "services/standard/parsers/feedparser.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "core/message.h"
|
||||
|
@ -1,14 +1,14 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/parsers/rssparser.h"
|
||||
#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 "services/standard/definitions.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QTextCodec>
|
@ -3,7 +3,7 @@
|
||||
#ifndef RSSPARSER_H
|
||||
#define RSSPARSER_H
|
||||
|
||||
#include "services/standard/parsers/feedparser.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "core/message.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/parsers/sitemapparser.h"
|
||||
#include "src/parsers/sitemapparser.h"
|
||||
|
||||
#if defined(ENABLE_COMPRESSED_SITEMAP)
|
||||
#include "3rd-party/qcompressor/qcompressor.h"
|
||||
@ -11,7 +11,7 @@
|
||||
#include "exceptions/feedrecognizedbutfailedexception.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "src/definitions.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QTextCodec>
|
@ -3,9 +3,9 @@
|
||||
#ifndef SITEMAPPARSER_H
|
||||
#define SITEMAPPARSER_H
|
||||
|
||||
#include "services/standard/parsers/feedparser.h"
|
||||
#include "src/parsers/feedparser.h"
|
||||
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
class SitemapParser : public FeedParser {
|
||||
public:
|
@ -1,13 +1,13 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/standardcategory.h"
|
||||
#include "src/standardcategory.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "services/abstract/gui/formcategorydetails.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "services/standard/standardserviceroot.h"
|
||||
#include "src/standardfeed.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
@ -10,20 +10,20 @@
|
||||
#include "exceptions/scriptexception.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "services/standard/gui/formstandardfeeddetails.h"
|
||||
#include "services/standard/standardserviceroot.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"
|
||||
#endif
|
||||
|
||||
#include "services/standard/parsers/atomparser.h"
|
||||
#include "services/standard/parsers/icalparser.h"
|
||||
#include "services/standard/parsers/jsonparser.h"
|
||||
#include "services/standard/parsers/rdfparser.h"
|
||||
#include "services/standard/parsers/rssparser.h"
|
||||
#include "services/standard/parsers/sitemapparser.h"
|
||||
#include "src/parsers/atomparser.h"
|
||||
#include "src/parsers/icalparser.h"
|
||||
#include "src/parsers/jsonparser.h"
|
||||
#include "src/parsers/rdfparser.h"
|
||||
#include "src/parsers/rssparser.h"
|
||||
#include "src/parsers/sitemapparser.h"
|
||||
|
||||
#if defined(ENABLE_COMPRESSED_SITEMAP)
|
||||
#include "3rd-party/qcompressor/qcompressor.h"
|
@ -1,16 +1,16 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/standardfeedsimportexportmodel.h"
|
||||
#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 "services/standard/definitions.h"
|
||||
#include "services/standard/standardcategory.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "services/standard/standardserviceroot.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/standardcategory.h"
|
||||
#include "src/standardfeed.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
#include <QDomAttr>
|
||||
#include <QDomDocument>
|
@ -1,12 +1,14 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/standardserviceentrypoint.h"
|
||||
#include "src/standardserviceentrypoint.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "services/standard/gui/formeditstandardaccount.h"
|
||||
#include "services/standard/standardserviceroot.h"
|
||||
#include "src/gui/formeditstandardaccount.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
StandardServiceEntryPoint::StandardServiceEntryPoint(QObject* parent) : QObject(parent) {}
|
||||
|
||||
QString StandardServiceEntryPoint::name() const {
|
||||
return QSL("RSS/RDF/ATOM/JSON");
|
@ -5,8 +5,14 @@
|
||||
|
||||
#include "services/abstract/serviceentrypoint.h"
|
||||
|
||||
class StandardServiceEntryPoint : public ServiceEntryPoint {
|
||||
class RSSGUARD_DLLSPEC_EXPORT StandardServiceEntryPoint : public QObject, public ServiceEntryPoint {
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "io.github.martinrotter.rssguard.standard" FILE "plugin.json")
|
||||
Q_INTERFACES(ServiceEntryPoint)
|
||||
|
||||
public:
|
||||
explicit StandardServiceEntryPoint(QObject* parent = nullptr);
|
||||
|
||||
virtual QString name() const;
|
||||
virtual QString description() const;
|
||||
virtual QString author() const;
|
@ -1,6 +1,6 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "services/standard/standardserviceroot.h"
|
||||
#include "src/standardserviceroot.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
@ -15,21 +15,21 @@
|
||||
#include "network-web/networkfactory.h"
|
||||
|
||||
#include "services/abstract/gui/formcategorydetails.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "services/standard/gui/formdiscoverfeeds.h"
|
||||
#include "services/standard/gui/formeditstandardaccount.h"
|
||||
#include "services/standard/gui/formstandardfeeddetails.h"
|
||||
#include "services/standard/gui/formstandardimportexport.h"
|
||||
#include "services/standard/parsers/atomparser.h"
|
||||
#include "services/standard/parsers/icalparser.h"
|
||||
#include "services/standard/parsers/jsonparser.h"
|
||||
#include "services/standard/parsers/rdfparser.h"
|
||||
#include "services/standard/parsers/rssparser.h"
|
||||
#include "services/standard/parsers/sitemapparser.h"
|
||||
#include "services/standard/standardcategory.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "services/standard/standardfeedsimportexportmodel.h"
|
||||
#include "services/standard/standardserviceentrypoint.h"
|
||||
#include "src/definitions.h"
|
||||
#include "src/gui/formdiscoverfeeds.h"
|
||||
#include "src/gui/formeditstandardaccount.h"
|
||||
#include "src/gui/formstandardfeeddetails.h"
|
||||
#include "src/gui/formstandardimportexport.h"
|
||||
#include "src/parsers/atomparser.h"
|
||||
#include "src/parsers/icalparser.h"
|
||||
#include "src/parsers/jsonparser.h"
|
||||
#include "src/parsers/rdfparser.h"
|
||||
#include "src/parsers/rssparser.h"
|
||||
#include "src/parsers/sitemapparser.h"
|
||||
#include "src/standardcategory.h"
|
||||
#include "src/standardfeed.h"
|
||||
#include "src/standardfeedsimportexportmodel.h"
|
||||
#include "src/standardserviceentrypoint.h"
|
||||
|
||||
#if defined(NO_LITE)
|
||||
#include "gui/webviewers/webengine/webengineviewer.h"
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "services/abstract/serviceroot.h"
|
||||
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "src/standardfeed.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QPair>
|
@ -231,6 +231,8 @@ set(SOURCES
|
||||
miscellaneous/notification.h
|
||||
miscellaneous/notificationfactory.cpp
|
||||
miscellaneous/notificationfactory.h
|
||||
miscellaneous/pluginfactory.cpp
|
||||
miscellaneous/pluginfactory.h
|
||||
miscellaneous/regexfactory.cpp
|
||||
miscellaneous/regexfactory.h
|
||||
miscellaneous/settings.cpp
|
||||
@ -399,43 +401,6 @@ set(SOURCES
|
||||
services/reddit/redditserviceroot.h
|
||||
services/reddit/redditsubscription.cpp
|
||||
services/reddit/redditsubscription.h
|
||||
services/standard/definitions.h
|
||||
services/standard/gui/formdiscoverfeeds.cpp
|
||||
services/standard/gui/formdiscoverfeeds.h
|
||||
services/standard/gui/formeditstandardaccount.cpp
|
||||
services/standard/gui/formeditstandardaccount.h
|
||||
services/standard/gui/formstandardfeeddetails.cpp
|
||||
services/standard/gui/formstandardfeeddetails.h
|
||||
services/standard/gui/formstandardimportexport.cpp
|
||||
services/standard/gui/formstandardimportexport.h
|
||||
services/standard/gui/standardaccountdetails.cpp
|
||||
services/standard/gui/standardaccountdetails.h
|
||||
services/standard/gui/standardfeeddetails.cpp
|
||||
services/standard/gui/standardfeeddetails.h
|
||||
services/standard/parsers/atomparser.cpp
|
||||
services/standard/parsers/atomparser.h
|
||||
services/standard/parsers/feedparser.cpp
|
||||
services/standard/parsers/feedparser.h
|
||||
services/standard/parsers/icalparser.cpp
|
||||
services/standard/parsers/icalparser.h
|
||||
services/standard/parsers/jsonparser.cpp
|
||||
services/standard/parsers/jsonparser.h
|
||||
services/standard/parsers/rdfparser.cpp
|
||||
services/standard/parsers/rdfparser.h
|
||||
services/standard/parsers/rssparser.cpp
|
||||
services/standard/parsers/rssparser.h
|
||||
services/standard/parsers/sitemapparser.cpp
|
||||
services/standard/parsers/sitemapparser.h
|
||||
services/standard/standardcategory.cpp
|
||||
services/standard/standardcategory.h
|
||||
services/standard/standardfeed.cpp
|
||||
services/standard/standardfeed.h
|
||||
services/standard/standardfeedsimportexportmodel.cpp
|
||||
services/standard/standardfeedsimportexportmodel.h
|
||||
services/standard/standardserviceentrypoint.cpp
|
||||
services/standard/standardserviceentrypoint.h
|
||||
services/standard/standardserviceroot.cpp
|
||||
services/standard/standardserviceroot.h
|
||||
services/tt-rss/definitions.h
|
||||
services/tt-rss/gui/formeditttrssaccount.cpp
|
||||
services/tt-rss/gui/formeditttrssaccount.h
|
||||
@ -508,10 +473,6 @@ set(UI_FILES
|
||||
services/greader/gui/greaderfeeddetails.ui
|
||||
services/owncloud/gui/owncloudaccountdetails.ui
|
||||
services/reddit/gui/redditaccountdetails.ui
|
||||
services/standard/gui/formdiscoverfeeds.ui
|
||||
services/standard/gui/formstandardimportexport.ui
|
||||
services/standard/gui/standardaccountdetails.ui
|
||||
services/standard/gui/standardfeeddetails.ui
|
||||
services/tt-rss/gui/formttrssnote.ui
|
||||
services/tt-rss/gui/ttrssaccountdetails.ui
|
||||
services/tt-rss/gui/ttrssfeeddetails.ui
|
||||
|
@ -11,8 +11,8 @@
|
||||
#include <QJSEngine>
|
||||
|
||||
// Class which represents one message filter.
|
||||
class MessageFilter : public QObject {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC MessageFilter : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MessageFilter(int id = -1, QObject* parent = nullptr);
|
||||
|
@ -8,15 +8,22 @@
|
||||
#include <QSqlDatabase>
|
||||
#include <QSqlQuery>
|
||||
|
||||
class DatabaseDriver : public QObject {
|
||||
class RSSGUARD_DLLSPEC DatabaseDriver : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// Describes available types of database backend.
|
||||
enum class DriverType { SQLite, MySQL };
|
||||
enum class DriverType {
|
||||
SQLite,
|
||||
MySQL
|
||||
};
|
||||
|
||||
// Describes what type of database user wants.
|
||||
enum class DesiredStorageType { StrictlyFileBased, StrictlyInMemory, FromSettings };
|
||||
enum class DesiredStorageType {
|
||||
StrictlyFileBased,
|
||||
StrictlyInMemory,
|
||||
FromSettings
|
||||
};
|
||||
|
||||
explicit DatabaseDriver(QObject* parent = nullptr);
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
#include <QSqlDatabase>
|
||||
|
||||
class DatabaseFactory : public QObject {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC DatabaseFactory : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DatabaseFactory(QObject* parent = nullptr);
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <QSqlError>
|
||||
#include <QSqlQuery>
|
||||
|
||||
class DatabaseQueries {
|
||||
class RSSGUARD_DLLSPEC DatabaseQueries {
|
||||
public:
|
||||
static QMap<int, QString> messageTableAttributes(bool only_msg_table, bool is_sqlite);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
class ApplicationException {
|
||||
class RSSGUARD_DLLSPEC ApplicationException {
|
||||
public:
|
||||
explicit ApplicationException(QString message = {});
|
||||
virtual ~ApplicationException();
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "exceptions/applicationexception.h"
|
||||
#include "services/abstract/feed.h"
|
||||
|
||||
class FeedFetchException : public ApplicationException {
|
||||
class RSSGUARD_DLLSPEC FeedFetchException : public ApplicationException {
|
||||
public:
|
||||
explicit FeedFetchException(Feed::Status feed_status, const QString& message = {});
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
class FeedRecognizedButFailedException : public ApplicationException {
|
||||
class RSSGUARD_DLLSPEC FeedRecognizedButFailedException : public ApplicationException {
|
||||
public:
|
||||
explicit FeedRecognizedButFailedException(const QString& message = {}, const QVariant& arbitrary_data = {});
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <QJSValue>
|
||||
|
||||
class FilteringException : public ApplicationException {
|
||||
class RSSGUARD_DLLSPEC FilteringException : public ApplicationException {
|
||||
public:
|
||||
explicit FilteringException(QJSValue::ErrorType js_error, QString message = QString());
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "exceptions/applicationexception.h"
|
||||
|
||||
class IOException : public ApplicationException {
|
||||
class RSSGUARD_DLLSPEC IOException : public ApplicationException {
|
||||
public:
|
||||
explicit IOException(const QString& message = QString());
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <QNetworkReply>
|
||||
|
||||
class NetworkException : public ApplicationException {
|
||||
class RSSGUARD_DLLSPEC NetworkException : public ApplicationException {
|
||||
public:
|
||||
explicit NetworkException(QNetworkReply::NetworkError error, const QString& message = QString());
|
||||
|
||||
|
@ -7,10 +7,12 @@
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
class ProcessException : public ApplicationException {
|
||||
class RSSGUARD_DLLSPEC ProcessException : public ApplicationException {
|
||||
public:
|
||||
ProcessException(int exit_code, QProcess::ExitStatus exit_status,
|
||||
QProcess::ProcessError error, const QString& message = QString());
|
||||
ProcessException(int exit_code,
|
||||
QProcess::ExitStatus exit_status,
|
||||
QProcess::ProcessError error,
|
||||
const QString& message = QString());
|
||||
|
||||
QProcess::ExitStatus exitStatus() const;
|
||||
int exitCode() const;
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
class ScriptException : public ApplicationException {
|
||||
class RSSGUARD_DLLSPEC ScriptException : public ApplicationException {
|
||||
Q_DECLARE_TR_FUNCTIONS(ScriptException)
|
||||
|
||||
public:
|
||||
|
@ -17,6 +17,10 @@
|
||||
#include <QPlainTextEdit>
|
||||
#include <QTextStream>
|
||||
|
||||
#if defined(NO_LITE)
|
||||
#include <QWebEngineProfile>
|
||||
#endif
|
||||
|
||||
FormAbout::FormAbout(bool go_to_changelog, QWidget* parent) : QDialog(parent) {
|
||||
m_ui.setupUi(this);
|
||||
m_ui.m_lblIcon->setPixmap(QPixmap(APP_ICON_PATH));
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <QLabel>
|
||||
#include <QWidget>
|
||||
|
||||
class GuiUtilities {
|
||||
class RSSGUARD_DLLSPEC GuiUtilities {
|
||||
public:
|
||||
static void setLabelAsNotice(QLabel& label, bool is_warning, bool set_margins = true);
|
||||
static void applyDialogProperties(QWidget& widget, const QIcon& icon = QIcon(), const QString& title = QString());
|
||||
|
@ -8,11 +8,10 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
class MsgBox : public QMessageBox {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC MsgBox : public QMessageBox {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
// Constructors and destructors.
|
||||
explicit MsgBox(QWidget* parent = nullptr);
|
||||
|
||||
|
@ -5,7 +5,9 @@
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QCloseEvent>
|
||||
#include <QLabel>
|
||||
#include <QTimerEvent>
|
||||
|
||||
#include <chrono>
|
||||
|
@ -12,7 +12,7 @@ class QParallelAnimationGroup;
|
||||
class QScrollArea;
|
||||
class PlainToolButton;
|
||||
|
||||
class HelpSpoiler : public QWidget {
|
||||
class RSSGUARD_DLLSPEC HelpSpoiler : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
class LabelWithStatus : public WidgetWithStatus {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC LabelWithStatus : public WidgetWithStatus {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LabelWithStatus(QWidget* parent = nullptr);
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
#include <QPlainTextEdit>
|
||||
|
||||
class LineEditWithStatus : public WidgetWithStatus {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC LineEditWithStatus : public WidgetWithStatus {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LineEditWithStatus(QWidget* parent = nullptr);
|
||||
@ -23,8 +23,8 @@ inline BaseLineEdit* LineEditWithStatus::lineEdit() const {
|
||||
return static_cast<BaseLineEdit*>(m_wdgInput);
|
||||
}
|
||||
|
||||
class TextEditWithStatus : public WidgetWithStatus {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC TextEditWithStatus : public WidgetWithStatus {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TextEditWithStatus(QWidget* parent = nullptr);
|
||||
|
@ -9,8 +9,8 @@
|
||||
class PlainToolButton;
|
||||
class QHBoxLayout;
|
||||
|
||||
class WidgetWithStatus : public QWidget {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC WidgetWithStatus : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class StatusType {
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "network-web/webfactory.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QProgressBar>
|
||||
#include <QScrollBar>
|
||||
#include <QTimer>
|
||||
#include <QToolBar>
|
||||
|
@ -21,7 +21,7 @@ class Downloader;
|
||||
|
||||
class TextBrowserViewer;
|
||||
|
||||
class TextBrowserDocument : public QTextDocument {
|
||||
class RSSGUARD_DLLSPEC TextBrowserDocument : public QTextDocument {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -34,7 +34,7 @@ class TextBrowserDocument : public QTextDocument {
|
||||
QPointer<TextBrowserViewer> m_viewer;
|
||||
};
|
||||
|
||||
class TextBrowserViewer : public QTextBrowser, public WebViewer {
|
||||
class RSSGUARD_DLLSPEC TextBrowserViewer : public QTextBrowser, public WebViewer {
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(WebViewer)
|
||||
|
||||
|
@ -26,6 +26,9 @@
|
||||
#include <QWebEngineContextMenuData>
|
||||
#endif
|
||||
|
||||
#include <QWebEngineProfile>
|
||||
#include <QWebEngineSettings>
|
||||
|
||||
WebEngineViewer::WebEngineViewer(QWidget* parent) : QWebEngineView(parent), m_browser(nullptr), m_root(nullptr) {
|
||||
WebEnginePage* page = new WebEnginePage(this);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
class RootItem;
|
||||
class WebBrowser;
|
||||
|
||||
class WebEngineViewer : public QWebEngineView, public WebViewer {
|
||||
class RSSGUARD_DLLSPEC WebEngineViewer : public QWebEngineView, public WebViewer {
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(WebViewer)
|
||||
|
||||
|
@ -62,6 +62,9 @@
|
||||
#else
|
||||
#include <QWebEngineDownloadItem>
|
||||
#endif
|
||||
|
||||
#include <QWebEngineProfile>
|
||||
#include <QWebEngineSettings>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "gui/dialogs/formmessagefiltersmanager.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/mutex.h"
|
||||
#include "miscellaneous/pluginfactory.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "services/abstract/cacheforserviceroot.h"
|
||||
#include "services/abstract/serviceroot.h"
|
||||
@ -20,7 +21,6 @@
|
||||
#include "services/greader/greaderentrypoint.h"
|
||||
#include "services/owncloud/owncloudserviceentrypoint.h"
|
||||
#include "services/reddit/redditentrypoint.h"
|
||||
#include "services/standard/standardserviceentrypoint.h"
|
||||
#include "services/tt-rss/ttrssserviceentrypoint.h"
|
||||
|
||||
#include <QThread>
|
||||
@ -68,8 +68,12 @@ QList<ServiceEntryPoint*> FeedReader::feedServices() {
|
||||
m_feedServices.append(new RedditEntryPoint());
|
||||
#endif
|
||||
|
||||
m_feedServices.append(new StandardServiceEntryPoint());
|
||||
m_feedServices.append(new TtRssServiceEntryPoint());
|
||||
|
||||
PluginFactory plugin_loader;
|
||||
|
||||
// Add dynamically loaded plugins.
|
||||
m_feedServices.append(plugin_loader.loadPlugins());
|
||||
}
|
||||
|
||||
return m_feedServices;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <QProcessEnvironment>
|
||||
#include <QStandardPaths>
|
||||
|
||||
class IOFactory {
|
||||
class RSSGUARD_DLLSPEC IOFactory {
|
||||
Q_DECLARE_TR_FUNCTIONS(IOFactory)
|
||||
|
||||
private:
|
||||
|
@ -6,8 +6,8 @@
|
||||
#include <QMutex>
|
||||
#include <QObject>
|
||||
|
||||
class Mutex : public QObject {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC Mutex : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Mutex(QObject* parent = nullptr);
|
||||
@ -20,14 +20,13 @@ class Mutex : public QObject {
|
||||
// Identifies if mutes is locked or not.
|
||||
bool isLocked() const;
|
||||
|
||||
operator QMutex* () const;
|
||||
operator QMutex*() const;
|
||||
|
||||
public slots:
|
||||
void lock();
|
||||
void unlock();
|
||||
|
||||
protected:
|
||||
|
||||
// These methods set proper value for m_isLocked and emit signals.
|
||||
void setLocked();
|
||||
void setUnlocked();
|
||||
|
88
src/librssguard/miscellaneous/pluginfactory.cpp
Normal file
88
src/librssguard/miscellaneous/pluginfactory.cpp
Normal file
@ -0,0 +1,88 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#include "miscellaneous/pluginfactory.h"
|
||||
|
||||
#include "definitions/definitions.h"
|
||||
#include "services/abstract/serviceentrypoint.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QDirIterator>
|
||||
#include <QPluginLoader>
|
||||
|
||||
PluginFactory::PluginFactory() {}
|
||||
|
||||
QList<ServiceEntryPoint*> PluginFactory::loadPlugins() const {
|
||||
QList<ServiceEntryPoint*> plugins;
|
||||
|
||||
const QString plugin_name_wildcard = pluginNameWildCard() + pluginSuffix();
|
||||
const auto plugins_paths = pluginPaths();
|
||||
const auto backup_current_dir = QDir::currentPath();
|
||||
|
||||
for (const QString& plugin_folder : plugins_paths) {
|
||||
QDirIterator dir_iter(plugin_folder,
|
||||
{plugin_name_wildcard},
|
||||
QDir::Filter::Files,
|
||||
QDirIterator::IteratorFlag::Subdirectories);
|
||||
|
||||
while (dir_iter.hasNext()) {
|
||||
dir_iter.next();
|
||||
const QFileInfo& plugin_file = dir_iter.fileInfo();
|
||||
|
||||
qApp->addLibraryPath(plugin_file.absolutePath());
|
||||
QDir::setCurrent(plugin_file.absolutePath());
|
||||
|
||||
qDebugNN << LOGSEC_CORE << "Loading plugin"
|
||||
<< QUOTE_W_SPACE_DOT(QDir::toNativeSeparators(plugin_file.absoluteFilePath()));
|
||||
|
||||
QPluginLoader loader(plugin_file.absoluteFilePath());
|
||||
ServiceEntryPoint* plugin_instance = qobject_cast<ServiceEntryPoint*>(loader.instance());
|
||||
|
||||
if (plugin_instance == nullptr) {
|
||||
qCriticalNN << LOGSEC_CORE
|
||||
<< "The plugin was not loaded successfully:" << QUOTE_W_SPACE_DOT(loader.errorString());
|
||||
}
|
||||
else {
|
||||
qDebugNN << LOGSEC_CORE << "Plugin" << QUOTE_W_SPACE(plugin_instance->code()) << "loaded.";
|
||||
|
||||
plugins.append(plugin_instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QDir::setCurrent(backup_current_dir);
|
||||
|
||||
return plugins;
|
||||
}
|
||||
|
||||
QStringList PluginFactory::pluginPaths() const {
|
||||
QStringList paths;
|
||||
#if defined(Q_OS_LINUX)
|
||||
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("..") + QDir::separator() + QL1S("lib") +
|
||||
QDir::separator() + QL1S(APP_LOW_NAME) + QDir::separator() + QL1S("plugins");
|
||||
#else
|
||||
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("plugins");
|
||||
#endif
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
paths << QCoreApplication::applicationDirPath() + QDir::separator() + QL1S("..") + QDir::separator();
|
||||
#endif
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
QString PluginFactory::pluginSuffix() const {
|
||||
#if defined(Q_OS_LINUX)
|
||||
return QSL(".so");
|
||||
#elif defined(Q_OS_WIN)
|
||||
return QSL(".dll");
|
||||
#elif defined(Q_OS_MACOS)
|
||||
return QSL(".dylib");
|
||||
#else
|
||||
return QSL("");
|
||||
#endif
|
||||
}
|
||||
|
||||
QString PluginFactory::pluginNameWildCard() const {
|
||||
return QSL("*rssguard-*");
|
||||
}
|
22
src/librssguard/miscellaneous/pluginfactory.h
Normal file
22
src/librssguard/miscellaneous/pluginfactory.h
Normal file
@ -0,0 +1,22 @@
|
||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||
|
||||
#ifndef PLUGINFACTORY_H
|
||||
#define PLUGINFACTORY_H
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
class ServiceEntryPoint;
|
||||
|
||||
class PluginFactory {
|
||||
public:
|
||||
explicit PluginFactory();
|
||||
|
||||
QList<ServiceEntryPoint*> loadPlugins() const;
|
||||
|
||||
private:
|
||||
QStringList pluginPaths() const;
|
||||
QString pluginSuffix() const;
|
||||
QString pluginNameWildCard() const;
|
||||
};
|
||||
|
||||
#endif // PLUGINFACTORY_H
|
@ -19,15 +19,18 @@
|
||||
#include <QStringList>
|
||||
#include <QWriteLocker>
|
||||
|
||||
#define KEY extern const QString
|
||||
#define DKEY const QString
|
||||
#define VALUE(x) extern const x
|
||||
#define NON_CONST_VALUE(x) extern x
|
||||
#define KEY RSSGUARD_DLLSPEC extern const QString
|
||||
#define DKEY const QString
|
||||
|
||||
#define VALUE(x) RSSGUARD_DLLSPEC extern const x
|
||||
#define NON_CONST_VALUE(x) extern x
|
||||
|
||||
#define DVALUE(x) const x
|
||||
#define NON_CONST_DVALUE(x) x
|
||||
#define SETTING(x) x, x##Def
|
||||
#define DEFAULT_VALUE(x) x##Def
|
||||
#define GROUP(x) x::ID
|
||||
|
||||
#define SETTING(x) x, x##Def
|
||||
#define DEFAULT_VALUE(x) x##Def
|
||||
#define GROUP(x) x::ID
|
||||
|
||||
#if defined(NO_LITE)
|
||||
namespace WebEngineAttributes {
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <QMetaEnum>
|
||||
#include <QMetaObject>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QStyle>
|
||||
#include <QStyleFactory>
|
||||
#include <QStyleHints>
|
||||
#include <QTextDocument>
|
||||
|
@ -13,17 +13,15 @@
|
||||
#include <QPair>
|
||||
#include <QRegularExpression>
|
||||
|
||||
class UpdateUrl {
|
||||
class RSSGUARD_DLLSPEC UpdateUrl {
|
||||
public:
|
||||
|
||||
QString m_fileUrl;
|
||||
QString m_name;
|
||||
QString m_size;
|
||||
};
|
||||
|
||||
class UpdateInfo {
|
||||
class RSSGUARD_DLLSPEC UpdateInfo {
|
||||
public:
|
||||
|
||||
QString m_availableVersion;
|
||||
QString m_changes;
|
||||
QDateTime m_date;
|
||||
@ -32,11 +30,10 @@ class UpdateInfo {
|
||||
|
||||
Q_DECLARE_METATYPE(UpdateInfo)
|
||||
|
||||
class SystemFactory : public QObject {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC SystemFactory : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
// Specifies possible states of auto-start functionality.
|
||||
enum class AutoStartStatus {
|
||||
Enabled,
|
||||
@ -81,7 +78,6 @@ class SystemFactory : public QObject {
|
||||
void updatesChecked(QPair<QList<UpdateInfo>, QNetworkReply::NetworkError> updates) const;
|
||||
|
||||
private:
|
||||
|
||||
// Performs parsing of downloaded file with list of updates.
|
||||
QList<UpdateInfo> parseUpdatesFile(const QByteArray& updates_file) const;
|
||||
};
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QFontMetrics>
|
||||
|
||||
class TextFactory {
|
||||
class RSSGUARD_DLLSPEC TextFactory {
|
||||
private:
|
||||
// Constructors and destructors.
|
||||
TextFactory();
|
||||
|
@ -10,6 +10,11 @@
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
|
||||
#if defined(NO_LITE)
|
||||
#include <QWebEngineProfile>
|
||||
#include <QWebEngineSettings>
|
||||
#endif
|
||||
|
||||
BaseNetworkAccessManager::BaseNetworkAccessManager(QObject* parent)
|
||||
: QNetworkAccessManager(parent), m_enableHttp2(false) {
|
||||
connect(this, &BaseNetworkAccessManager::sslErrors, this, &BaseNetworkAccessManager::onSslErrors);
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#if defined(NO_LITE)
|
||||
#include <QWebEngineCookieStore>
|
||||
#include <QWebEngineProfile>
|
||||
#endif
|
||||
|
||||
CookieJar::CookieJar(QObject* parent)
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
#include "network-web/downloadmanager.h"
|
||||
|
||||
#include "ui_downloaditem.h"
|
||||
#include "ui_downloadmanager.h"
|
||||
|
||||
#include "gui/dialogs/formmain.h"
|
||||
#include "gui/messagebox.h"
|
||||
#include "gui/tabwidget.h"
|
||||
|
@ -3,11 +3,9 @@
|
||||
#ifndef DOWNLOADMANAGER_H
|
||||
#define DOWNLOADMANAGER_H
|
||||
|
||||
#include "ui_downloaditem.h"
|
||||
#include "ui_downloadmanager.h"
|
||||
|
||||
#include "gui/tabcontent.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QDateTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QFile>
|
||||
@ -18,16 +16,24 @@ class DownloadModel;
|
||||
class QFileIconProvider;
|
||||
class QMimeData;
|
||||
|
||||
class DownloadItem : public QWidget {
|
||||
Q_OBJECT
|
||||
namespace Ui {
|
||||
class DownloadItem;
|
||||
}
|
||||
|
||||
friend class DownloadManager;
|
||||
friend class DownloadModel;
|
||||
namespace Ui {
|
||||
class DownloadManager;
|
||||
}
|
||||
|
||||
class DownloadItem : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
friend class DownloadManager;
|
||||
friend class DownloadModel;
|
||||
|
||||
public:
|
||||
explicit DownloadItem(QNetworkReply* reply = nullptr,
|
||||
const QString& preferred_file_name = {},
|
||||
const std::function<void (DownloadItem*)>& run_on_finish = {},
|
||||
const std::function<void(DownloadItem*)>& run_on_finish = {},
|
||||
QWidget* parent = nullptr);
|
||||
virtual ~DownloadItem();
|
||||
|
||||
@ -69,7 +75,7 @@ class DownloadItem : public QWidget {
|
||||
QFile m_output;
|
||||
QNetworkReply* m_reply;
|
||||
QString m_preferredFileName;
|
||||
std::function<void (DownloadItem*)> m_runOnFinish;
|
||||
std::function<void(DownloadItem*)> m_runOnFinish;
|
||||
qint64 m_bytesReceived;
|
||||
QElapsedTimer m_downloadTime;
|
||||
QTime m_lastProgressTime;
|
||||
@ -84,10 +90,10 @@ class WebBrowser;
|
||||
class SilentNetworkAccessManager;
|
||||
|
||||
class DownloadManager : public TabContent {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(RemovePolicy removePolicy READ removePolicy WRITE setRemovePolicy NOTIFY removePolicyChanged)
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(RemovePolicy removePolicy READ removePolicy WRITE setRemovePolicy NOTIFY removePolicyChanged)
|
||||
|
||||
friend class DownloadModel;
|
||||
friend class DownloadModel;
|
||||
|
||||
public:
|
||||
enum class RemovePolicy {
|
||||
@ -142,7 +148,7 @@ class DownloadManager : public TabContent {
|
||||
private:
|
||||
void handleUnsupportedContent(QNetworkReply* reply,
|
||||
const QString& preferred_file_name,
|
||||
const std::function<void (DownloadItem*)>& run_on_finish);
|
||||
const std::function<void(DownloadItem*)>& run_on_finish);
|
||||
void addItem(DownloadItem* item);
|
||||
|
||||
QScopedPointer<Ui::DownloadManager> m_ui;
|
||||
@ -160,9 +166,9 @@ inline WebBrowser* DownloadManager::webBrowser() const {
|
||||
}
|
||||
|
||||
class DownloadModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
friend class DownloadManager;
|
||||
friend class DownloadManager;
|
||||
|
||||
public:
|
||||
explicit DownloadModel(DownloadManager* download_manager, QObject* parent = nullptr);
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <QPair>
|
||||
#include <QVariant>
|
||||
|
||||
struct NetworkResult {
|
||||
struct RSSGUARD_DLLSPEC NetworkResult {
|
||||
QNetworkReply::NetworkError m_networkError;
|
||||
int m_httpCode;
|
||||
QString m_contentType;
|
||||
@ -32,7 +32,7 @@ struct NetworkResult {
|
||||
|
||||
class Downloader;
|
||||
|
||||
class NetworkFactory {
|
||||
class RSSGUARD_DLLSPEC NetworkFactory {
|
||||
Q_DECLARE_TR_FUNCTIONS(NetworkFactory)
|
||||
|
||||
private:
|
||||
|
@ -23,9 +23,11 @@
|
||||
#else
|
||||
#include <QWebEngineDownloadItem>
|
||||
#endif
|
||||
|
||||
#include <QWebEngineProfile>
|
||||
#include <QWebEngineScript>
|
||||
#include <QWebEngineScriptCollection>
|
||||
#include <QWebEngineSettings>
|
||||
#include <QWebEngineUrlScheme>
|
||||
#endif
|
||||
|
||||
@ -179,9 +181,7 @@ QString WebFactory::unescapeHtml(const QString& html) {
|
||||
return html;
|
||||
}
|
||||
|
||||
if (m_htmlNamedEntities.isEmpty()) {
|
||||
generateUnescapes();
|
||||
}
|
||||
static QMap<QString, char16_t> entities = generateUnescapes();
|
||||
|
||||
QString output;
|
||||
output.reserve(html.size());
|
||||
@ -236,9 +236,9 @@ QString WebFactory::unescapeHtml(const QString& html) {
|
||||
// We have named entity.
|
||||
auto entity_name = html.mid(pos + 1, pos_end - pos - 1);
|
||||
|
||||
if (m_htmlNamedEntities.contains(entity_name)) {
|
||||
if (entities.contains(entity_name)) {
|
||||
// Entity found, proceed.
|
||||
output.append(m_htmlNamedEntities.value(entity_name));
|
||||
output.append(entities.value(entity_name));
|
||||
}
|
||||
else {
|
||||
// Entity NOT found, leave intact.
|
||||
@ -539,7 +539,10 @@ void WebFactory::webEngineSettingChanged(bool enabled) {
|
||||
m_engineProfile->settings()->setAttribute(attribute, act->isChecked());
|
||||
}
|
||||
|
||||
QAction* WebFactory::createEngineSettingsAction(const QString& title, QWebEngineSettings::WebAttribute attribute) {
|
||||
QAction* WebFactory::createEngineSettingsAction(const QString& title, int web_attribute) {
|
||||
// TODO: ověřit že cast je funkční
|
||||
QWebEngineSettings::WebAttribute attribute = QWebEngineSettings::WebAttribute(web_attribute);
|
||||
|
||||
auto* act = new QAction(title, m_engineSettings->menu());
|
||||
|
||||
act->setData(attribute);
|
||||
@ -581,265 +584,268 @@ void WebFactory::stopApiServer() {
|
||||
}
|
||||
}
|
||||
|
||||
void WebFactory::generateUnescapes() {
|
||||
m_htmlNamedEntities[QSL("AElig")] = 0x00c6;
|
||||
m_htmlNamedEntities[QSL("AMP")] = 38;
|
||||
m_htmlNamedEntities[QSL("Aacute")] = 0x00c1;
|
||||
m_htmlNamedEntities[QSL("Acirc")] = 0x00c2;
|
||||
m_htmlNamedEntities[QSL("Agrave")] = 0x00c0;
|
||||
m_htmlNamedEntities[QSL("Alpha")] = 0x0391;
|
||||
m_htmlNamedEntities[QSL("Aring")] = 0x00c5;
|
||||
m_htmlNamedEntities[QSL("Atilde")] = 0x00c3;
|
||||
m_htmlNamedEntities[QSL("Auml")] = 0x00c4;
|
||||
m_htmlNamedEntities[QSL("Beta")] = 0x0392;
|
||||
m_htmlNamedEntities[QSL("Ccedil")] = 0x00c7;
|
||||
m_htmlNamedEntities[QSL("Chi")] = 0x03a7;
|
||||
m_htmlNamedEntities[QSL("Dagger")] = 0x2021;
|
||||
m_htmlNamedEntities[QSL("Delta")] = 0x0394;
|
||||
m_htmlNamedEntities[QSL("ETH")] = 0x00d0;
|
||||
m_htmlNamedEntities[QSL("Eacute")] = 0x00c9;
|
||||
m_htmlNamedEntities[QSL("Ecirc")] = 0x00ca;
|
||||
m_htmlNamedEntities[QSL("Egrave")] = 0x00c8;
|
||||
m_htmlNamedEntities[QSL("Epsilon")] = 0x0395;
|
||||
m_htmlNamedEntities[QSL("Eta")] = 0x0397;
|
||||
m_htmlNamedEntities[QSL("Euml")] = 0x00cb;
|
||||
m_htmlNamedEntities[QSL("GT")] = 62;
|
||||
m_htmlNamedEntities[QSL("Gamma")] = 0x0393;
|
||||
m_htmlNamedEntities[QSL("Iacute")] = 0x00cd;
|
||||
m_htmlNamedEntities[QSL("Icirc")] = 0x00ce;
|
||||
m_htmlNamedEntities[QSL("Igrave")] = 0x00cc;
|
||||
m_htmlNamedEntities[QSL("Iota")] = 0x0399;
|
||||
m_htmlNamedEntities[QSL("Iuml")] = 0x00cf;
|
||||
m_htmlNamedEntities[QSL("Kappa")] = 0x039a;
|
||||
m_htmlNamedEntities[QSL("LT")] = 60;
|
||||
m_htmlNamedEntities[QSL("Lambda")] = 0x039b;
|
||||
m_htmlNamedEntities[QSL("Mu")] = 0x039c;
|
||||
m_htmlNamedEntities[QSL("Ntilde")] = 0x00d1;
|
||||
m_htmlNamedEntities[QSL("Nu")] = 0x039d;
|
||||
m_htmlNamedEntities[QSL("OElig")] = 0x0152;
|
||||
m_htmlNamedEntities[QSL("Oacute")] = 0x00d3;
|
||||
m_htmlNamedEntities[QSL("Ocirc")] = 0x00d4;
|
||||
m_htmlNamedEntities[QSL("Ograve")] = 0x00d2;
|
||||
m_htmlNamedEntities[QSL("Omega")] = 0x03a9;
|
||||
m_htmlNamedEntities[QSL("Omicron")] = 0x039f;
|
||||
m_htmlNamedEntities[QSL("Oslash")] = 0x00d8;
|
||||
m_htmlNamedEntities[QSL("Otilde")] = 0x00d5;
|
||||
m_htmlNamedEntities[QSL("Ouml")] = 0x00d6;
|
||||
m_htmlNamedEntities[QSL("Phi")] = 0x03a6;
|
||||
m_htmlNamedEntities[QSL("Pi")] = 0x03a0;
|
||||
m_htmlNamedEntities[QSL("Prime")] = 0x2033;
|
||||
m_htmlNamedEntities[QSL("Psi")] = 0x03a8;
|
||||
m_htmlNamedEntities[QSL("QUOT")] = 34;
|
||||
m_htmlNamedEntities[QSL("Rho")] = 0x03a1;
|
||||
m_htmlNamedEntities[QSL("Scaron")] = 0x0160;
|
||||
m_htmlNamedEntities[QSL("Sigma")] = 0x03a3;
|
||||
m_htmlNamedEntities[QSL("THORN")] = 0x00de;
|
||||
m_htmlNamedEntities[QSL("Tau")] = 0x03a4;
|
||||
m_htmlNamedEntities[QSL("Theta")] = 0x0398;
|
||||
m_htmlNamedEntities[QSL("Uacute")] = 0x00da;
|
||||
m_htmlNamedEntities[QSL("Ucirc")] = 0x00db;
|
||||
m_htmlNamedEntities[QSL("Ugrave")] = 0x00d9;
|
||||
m_htmlNamedEntities[QSL("Upsilon")] = 0x03a5;
|
||||
m_htmlNamedEntities[QSL("Uuml")] = 0x00dc;
|
||||
m_htmlNamedEntities[QSL("Xi")] = 0x039e;
|
||||
m_htmlNamedEntities[QSL("Yacute")] = 0x00dd;
|
||||
m_htmlNamedEntities[QSL("Yuml")] = 0x0178;
|
||||
m_htmlNamedEntities[QSL("Zeta")] = 0x0396;
|
||||
m_htmlNamedEntities[QSL("aacute")] = 0x00e1;
|
||||
m_htmlNamedEntities[QSL("acirc")] = 0x00e2;
|
||||
m_htmlNamedEntities[QSL("acute")] = 0x00b4;
|
||||
m_htmlNamedEntities[QSL("aelig")] = 0x00e6;
|
||||
m_htmlNamedEntities[QSL("agrave")] = 0x00e0;
|
||||
m_htmlNamedEntities[QSL("alefsym")] = 0x2135;
|
||||
m_htmlNamedEntities[QSL("alpha")] = 0x03b1;
|
||||
m_htmlNamedEntities[QSL("amp")] = 38;
|
||||
m_htmlNamedEntities[QSL("and")] = 0x22a5;
|
||||
m_htmlNamedEntities[QSL("ang")] = 0x2220;
|
||||
m_htmlNamedEntities[QSL("apos")] = 0x0027;
|
||||
m_htmlNamedEntities[QSL("aring")] = 0x00e5;
|
||||
m_htmlNamedEntities[QSL("asymp")] = 0x2248;
|
||||
m_htmlNamedEntities[QSL("atilde")] = 0x00e3;
|
||||
m_htmlNamedEntities[QSL("auml")] = 0x00e4;
|
||||
m_htmlNamedEntities[QSL("bdquo")] = 0x201e;
|
||||
m_htmlNamedEntities[QSL("beta")] = 0x03b2;
|
||||
m_htmlNamedEntities[QSL("brvbar")] = 0x00a6;
|
||||
m_htmlNamedEntities[QSL("bull")] = 0x2022;
|
||||
m_htmlNamedEntities[QSL("cap")] = 0x2229;
|
||||
m_htmlNamedEntities[QSL("ccedil")] = 0x00e7;
|
||||
m_htmlNamedEntities[QSL("cedil")] = 0x00b8;
|
||||
m_htmlNamedEntities[QSL("cent")] = 0x00a2;
|
||||
m_htmlNamedEntities[QSL("chi")] = 0x03c7;
|
||||
m_htmlNamedEntities[QSL("circ")] = 0x02c6;
|
||||
m_htmlNamedEntities[QSL("clubs")] = 0x2663;
|
||||
m_htmlNamedEntities[QSL("cong")] = 0x2245;
|
||||
m_htmlNamedEntities[QSL("copy")] = 0x00a9;
|
||||
m_htmlNamedEntities[QSL("crarr")] = 0x21b5;
|
||||
m_htmlNamedEntities[QSL("cup")] = 0x222a;
|
||||
m_htmlNamedEntities[QSL("curren")] = 0x00a4;
|
||||
m_htmlNamedEntities[QSL("dArr")] = 0x21d3;
|
||||
m_htmlNamedEntities[QSL("dagger")] = 0x2020;
|
||||
m_htmlNamedEntities[QSL("darr")] = 0x2193;
|
||||
m_htmlNamedEntities[QSL("deg")] = 0x00b0;
|
||||
m_htmlNamedEntities[QSL("delta")] = 0x03b4;
|
||||
m_htmlNamedEntities[QSL("diams")] = 0x2666;
|
||||
m_htmlNamedEntities[QSL("divide")] = 0x00f7;
|
||||
m_htmlNamedEntities[QSL("eacute")] = 0x00e9;
|
||||
m_htmlNamedEntities[QSL("ecirc")] = 0x00ea;
|
||||
m_htmlNamedEntities[QSL("egrave")] = 0x00e8;
|
||||
m_htmlNamedEntities[QSL("empty")] = 0x2205;
|
||||
m_htmlNamedEntities[QSL("emsp")] = 0x2003;
|
||||
m_htmlNamedEntities[QSL("ensp")] = 0x2002;
|
||||
m_htmlNamedEntities[QSL("epsilon")] = 0x03b5;
|
||||
m_htmlNamedEntities[QSL("equiv")] = 0x2261;
|
||||
m_htmlNamedEntities[QSL("eta")] = 0x03b7;
|
||||
m_htmlNamedEntities[QSL("eth")] = 0x00f0;
|
||||
m_htmlNamedEntities[QSL("euml")] = 0x00eb;
|
||||
m_htmlNamedEntities[QSL("euro")] = 0x20ac;
|
||||
m_htmlNamedEntities[QSL("exist")] = 0x2203;
|
||||
m_htmlNamedEntities[QSL("fnof")] = 0x0192;
|
||||
m_htmlNamedEntities[QSL("forall")] = 0x2200;
|
||||
m_htmlNamedEntities[QSL("frac12")] = 0x00bd;
|
||||
m_htmlNamedEntities[QSL("frac14")] = 0x00bc;
|
||||
m_htmlNamedEntities[QSL("frac34")] = 0x00be;
|
||||
m_htmlNamedEntities[QSL("frasl")] = 0x2044;
|
||||
m_htmlNamedEntities[QSL("gamma")] = 0x03b3;
|
||||
m_htmlNamedEntities[QSL("ge")] = 0x2265;
|
||||
m_htmlNamedEntities[QSL("gt")] = 62;
|
||||
m_htmlNamedEntities[QSL("hArr")] = 0x21d4;
|
||||
m_htmlNamedEntities[QSL("harr")] = 0x2194;
|
||||
m_htmlNamedEntities[QSL("hearts")] = 0x2665;
|
||||
m_htmlNamedEntities[QSL("hellip")] = 0x2026;
|
||||
m_htmlNamedEntities[QSL("iacute")] = 0x00ed;
|
||||
m_htmlNamedEntities[QSL("icirc")] = 0x00ee;
|
||||
m_htmlNamedEntities[QSL("iexcl")] = 0x00a1;
|
||||
m_htmlNamedEntities[QSL("igrave")] = 0x00ec;
|
||||
m_htmlNamedEntities[QSL("image")] = 0x2111;
|
||||
m_htmlNamedEntities[QSL("infin")] = 0x221e;
|
||||
m_htmlNamedEntities[QSL("int")] = 0x222b;
|
||||
m_htmlNamedEntities[QSL("iota")] = 0x03b9;
|
||||
m_htmlNamedEntities[QSL("iquest")] = 0x00bf;
|
||||
m_htmlNamedEntities[QSL("isin")] = 0x2208;
|
||||
m_htmlNamedEntities[QSL("iuml")] = 0x00ef;
|
||||
m_htmlNamedEntities[QSL("kappa")] = 0x03ba;
|
||||
m_htmlNamedEntities[QSL("lArr")] = 0x21d0;
|
||||
m_htmlNamedEntities[QSL("lambda")] = 0x03bb;
|
||||
m_htmlNamedEntities[QSL("lang")] = 0x2329;
|
||||
m_htmlNamedEntities[QSL("laquo")] = 0x00ab;
|
||||
m_htmlNamedEntities[QSL("larr")] = 0x2190;
|
||||
m_htmlNamedEntities[QSL("lceil")] = 0x2308;
|
||||
m_htmlNamedEntities[QSL("ldquo")] = 0x201c;
|
||||
m_htmlNamedEntities[QSL("le")] = 0x2264;
|
||||
m_htmlNamedEntities[QSL("lfloor")] = 0x230a;
|
||||
m_htmlNamedEntities[QSL("lowast")] = 0x2217;
|
||||
m_htmlNamedEntities[QSL("loz")] = 0x25ca;
|
||||
m_htmlNamedEntities[QSL("lrm")] = 0x200e;
|
||||
m_htmlNamedEntities[QSL("lsaquo")] = 0x2039;
|
||||
m_htmlNamedEntities[QSL("lsquo")] = 0x2018;
|
||||
m_htmlNamedEntities[QSL("lt")] = 60;
|
||||
m_htmlNamedEntities[QSL("macr")] = 0x00af;
|
||||
m_htmlNamedEntities[QSL("mdash")] = 0x2014;
|
||||
m_htmlNamedEntities[QSL("micro")] = 0x00b5;
|
||||
m_htmlNamedEntities[QSL("middot")] = 0x00b7;
|
||||
m_htmlNamedEntities[QSL("minus")] = 0x2212;
|
||||
m_htmlNamedEntities[QSL("mu")] = 0x03bc;
|
||||
m_htmlNamedEntities[QSL("nabla")] = 0x2207;
|
||||
m_htmlNamedEntities[QSL("nbsp")] = 0x00a0;
|
||||
m_htmlNamedEntities[QSL("ndash")] = 0x2013;
|
||||
m_htmlNamedEntities[QSL("ne")] = 0x2260;
|
||||
m_htmlNamedEntities[QSL("ni")] = 0x220b;
|
||||
m_htmlNamedEntities[QSL("not")] = 0x00ac;
|
||||
m_htmlNamedEntities[QSL("notin")] = 0x2209;
|
||||
m_htmlNamedEntities[QSL("nsub")] = 0x2284;
|
||||
m_htmlNamedEntities[QSL("ntilde")] = 0x00f1;
|
||||
m_htmlNamedEntities[QSL("nu")] = 0x03bd;
|
||||
m_htmlNamedEntities[QSL("oacute")] = 0x00f3;
|
||||
m_htmlNamedEntities[QSL("ocirc")] = 0x00f4;
|
||||
m_htmlNamedEntities[QSL("oelig")] = 0x0153;
|
||||
m_htmlNamedEntities[QSL("ograve")] = 0x00f2;
|
||||
m_htmlNamedEntities[QSL("oline")] = 0x203e;
|
||||
m_htmlNamedEntities[QSL("omega")] = 0x03c9;
|
||||
m_htmlNamedEntities[QSL("omicron")] = 0x03bf;
|
||||
m_htmlNamedEntities[QSL("oplus")] = 0x2295;
|
||||
m_htmlNamedEntities[QSL("or")] = 0x22a6;
|
||||
m_htmlNamedEntities[QSL("ordf")] = 0x00aa;
|
||||
m_htmlNamedEntities[QSL("ordm")] = 0x00ba;
|
||||
m_htmlNamedEntities[QSL("oslash")] = 0x00f8;
|
||||
m_htmlNamedEntities[QSL("otilde")] = 0x00f5;
|
||||
m_htmlNamedEntities[QSL("otimes")] = 0x2297;
|
||||
m_htmlNamedEntities[QSL("ouml")] = 0x00f6;
|
||||
m_htmlNamedEntities[QSL("para")] = 0x00b6;
|
||||
m_htmlNamedEntities[QSL("part")] = 0x2202;
|
||||
m_htmlNamedEntities[QSL("percnt")] = 0x0025;
|
||||
m_htmlNamedEntities[QSL("permil")] = 0x2030;
|
||||
m_htmlNamedEntities[QSL("perp")] = 0x22a5;
|
||||
m_htmlNamedEntities[QSL("phi")] = 0x03c6;
|
||||
m_htmlNamedEntities[QSL("pi")] = 0x03c0;
|
||||
m_htmlNamedEntities[QSL("piv")] = 0x03d6;
|
||||
m_htmlNamedEntities[QSL("plusmn")] = 0x00b1;
|
||||
m_htmlNamedEntities[QSL("pound")] = 0x00a3;
|
||||
m_htmlNamedEntities[QSL("prime")] = 0x2032;
|
||||
m_htmlNamedEntities[QSL("prod")] = 0x220f;
|
||||
m_htmlNamedEntities[QSL("prop")] = 0x221d;
|
||||
m_htmlNamedEntities[QSL("psi")] = 0x03c8;
|
||||
m_htmlNamedEntities[QSL("quot")] = 34;
|
||||
m_htmlNamedEntities[QSL("rArr")] = 0x21d2;
|
||||
m_htmlNamedEntities[QSL("radic")] = 0x221a;
|
||||
m_htmlNamedEntities[QSL("rang")] = 0x232a;
|
||||
m_htmlNamedEntities[QSL("raquo")] = 0x00bb;
|
||||
m_htmlNamedEntities[QSL("rarr")] = 0x2192;
|
||||
m_htmlNamedEntities[QSL("rceil")] = 0x2309;
|
||||
m_htmlNamedEntities[QSL("rdquo")] = 0x201d;
|
||||
m_htmlNamedEntities[QSL("real")] = 0x211c;
|
||||
m_htmlNamedEntities[QSL("reg")] = 0x00ae;
|
||||
m_htmlNamedEntities[QSL("rfloor")] = 0x230b;
|
||||
m_htmlNamedEntities[QSL("rho")] = 0x03c1;
|
||||
m_htmlNamedEntities[QSL("rlm")] = 0x200f;
|
||||
m_htmlNamedEntities[QSL("rsaquo")] = 0x203a;
|
||||
m_htmlNamedEntities[QSL("rsquo")] = 0x2019;
|
||||
m_htmlNamedEntities[QSL("sbquo")] = 0x201a;
|
||||
m_htmlNamedEntities[QSL("scaron")] = 0x0161;
|
||||
m_htmlNamedEntities[QSL("sdot")] = 0x22c5;
|
||||
m_htmlNamedEntities[QSL("sect")] = 0x00a7;
|
||||
m_htmlNamedEntities[QSL("shy")] = 0x00ad;
|
||||
m_htmlNamedEntities[QSL("sigma")] = 0x03c3;
|
||||
m_htmlNamedEntities[QSL("sigmaf")] = 0x03c2;
|
||||
m_htmlNamedEntities[QSL("sim")] = 0x223c;
|
||||
m_htmlNamedEntities[QSL("spades")] = 0x2660;
|
||||
m_htmlNamedEntities[QSL("sub")] = 0x2282;
|
||||
m_htmlNamedEntities[QSL("sube")] = 0x2286;
|
||||
m_htmlNamedEntities[QSL("sum")] = 0x2211;
|
||||
m_htmlNamedEntities[QSL("sup")] = 0x2283;
|
||||
m_htmlNamedEntities[QSL("sup1")] = 0x00b9;
|
||||
m_htmlNamedEntities[QSL("sup2")] = 0x00b2;
|
||||
m_htmlNamedEntities[QSL("sup3")] = 0x00b3;
|
||||
m_htmlNamedEntities[QSL("supe")] = 0x2287;
|
||||
m_htmlNamedEntities[QSL("szlig")] = 0x00df;
|
||||
m_htmlNamedEntities[QSL("tau")] = 0x03c4;
|
||||
m_htmlNamedEntities[QSL("there4")] = 0x2234;
|
||||
m_htmlNamedEntities[QSL("theta")] = 0x03b8;
|
||||
m_htmlNamedEntities[QSL("thetasym")] = 0x03d1;
|
||||
m_htmlNamedEntities[QSL("thinsp")] = 0x2009;
|
||||
m_htmlNamedEntities[QSL("thorn")] = 0x00fe;
|
||||
m_htmlNamedEntities[QSL("tilde")] = 0x02dc;
|
||||
m_htmlNamedEntities[QSL("times")] = 0x00d7;
|
||||
m_htmlNamedEntities[QSL("trade")] = 0x2122;
|
||||
m_htmlNamedEntities[QSL("uArr")] = 0x21d1;
|
||||
m_htmlNamedEntities[QSL("uacute")] = 0x00fa;
|
||||
m_htmlNamedEntities[QSL("uarr")] = 0x2191;
|
||||
m_htmlNamedEntities[QSL("ucirc")] = 0x00fb;
|
||||
m_htmlNamedEntities[QSL("ugrave")] = 0x00f9;
|
||||
m_htmlNamedEntities[QSL("uml")] = 0x00a8;
|
||||
m_htmlNamedEntities[QSL("upsih")] = 0x03d2;
|
||||
m_htmlNamedEntities[QSL("upsilon")] = 0x03c5;
|
||||
m_htmlNamedEntities[QSL("uuml")] = 0x00fc;
|
||||
m_htmlNamedEntities[QSL("weierp")] = 0x2118;
|
||||
m_htmlNamedEntities[QSL("xi")] = 0x03be;
|
||||
m_htmlNamedEntities[QSL("yacute")] = 0x00fd;
|
||||
m_htmlNamedEntities[QSL("yen")] = 0x00a5;
|
||||
m_htmlNamedEntities[QSL("yuml")] = 0x00ff;
|
||||
m_htmlNamedEntities[QSL("zeta")] = 0x03b6;
|
||||
m_htmlNamedEntities[QSL("zwj")] = 0x200d;
|
||||
m_htmlNamedEntities[QSL("zwnj")] = 0x200c;
|
||||
QMap<QString, char16_t> WebFactory::generateUnescapes() {
|
||||
QMap<QString, char16_t> res;
|
||||
res[QSL("AElig")] = 0x00c6;
|
||||
res[QSL("AMP")] = 38;
|
||||
res[QSL("Aacute")] = 0x00c1;
|
||||
res[QSL("Acirc")] = 0x00c2;
|
||||
res[QSL("Agrave")] = 0x00c0;
|
||||
res[QSL("Alpha")] = 0x0391;
|
||||
res[QSL("Aring")] = 0x00c5;
|
||||
res[QSL("Atilde")] = 0x00c3;
|
||||
res[QSL("Auml")] = 0x00c4;
|
||||
res[QSL("Beta")] = 0x0392;
|
||||
res[QSL("Ccedil")] = 0x00c7;
|
||||
res[QSL("Chi")] = 0x03a7;
|
||||
res[QSL("Dagger")] = 0x2021;
|
||||
res[QSL("Delta")] = 0x0394;
|
||||
res[QSL("ETH")] = 0x00d0;
|
||||
res[QSL("Eacute")] = 0x00c9;
|
||||
res[QSL("Ecirc")] = 0x00ca;
|
||||
res[QSL("Egrave")] = 0x00c8;
|
||||
res[QSL("Epsilon")] = 0x0395;
|
||||
res[QSL("Eta")] = 0x0397;
|
||||
res[QSL("Euml")] = 0x00cb;
|
||||
res[QSL("GT")] = 62;
|
||||
res[QSL("Gamma")] = 0x0393;
|
||||
res[QSL("Iacute")] = 0x00cd;
|
||||
res[QSL("Icirc")] = 0x00ce;
|
||||
res[QSL("Igrave")] = 0x00cc;
|
||||
res[QSL("Iota")] = 0x0399;
|
||||
res[QSL("Iuml")] = 0x00cf;
|
||||
res[QSL("Kappa")] = 0x039a;
|
||||
res[QSL("LT")] = 60;
|
||||
res[QSL("Lambda")] = 0x039b;
|
||||
res[QSL("Mu")] = 0x039c;
|
||||
res[QSL("Ntilde")] = 0x00d1;
|
||||
res[QSL("Nu")] = 0x039d;
|
||||
res[QSL("OElig")] = 0x0152;
|
||||
res[QSL("Oacute")] = 0x00d3;
|
||||
res[QSL("Ocirc")] = 0x00d4;
|
||||
res[QSL("Ograve")] = 0x00d2;
|
||||
res[QSL("Omega")] = 0x03a9;
|
||||
res[QSL("Omicron")] = 0x039f;
|
||||
res[QSL("Oslash")] = 0x00d8;
|
||||
res[QSL("Otilde")] = 0x00d5;
|
||||
res[QSL("Ouml")] = 0x00d6;
|
||||
res[QSL("Phi")] = 0x03a6;
|
||||
res[QSL("Pi")] = 0x03a0;
|
||||
res[QSL("Prime")] = 0x2033;
|
||||
res[QSL("Psi")] = 0x03a8;
|
||||
res[QSL("QUOT")] = 34;
|
||||
res[QSL("Rho")] = 0x03a1;
|
||||
res[QSL("Scaron")] = 0x0160;
|
||||
res[QSL("Sigma")] = 0x03a3;
|
||||
res[QSL("THORN")] = 0x00de;
|
||||
res[QSL("Tau")] = 0x03a4;
|
||||
res[QSL("Theta")] = 0x0398;
|
||||
res[QSL("Uacute")] = 0x00da;
|
||||
res[QSL("Ucirc")] = 0x00db;
|
||||
res[QSL("Ugrave")] = 0x00d9;
|
||||
res[QSL("Upsilon")] = 0x03a5;
|
||||
res[QSL("Uuml")] = 0x00dc;
|
||||
res[QSL("Xi")] = 0x039e;
|
||||
res[QSL("Yacute")] = 0x00dd;
|
||||
res[QSL("Yuml")] = 0x0178;
|
||||
res[QSL("Zeta")] = 0x0396;
|
||||
res[QSL("aacute")] = 0x00e1;
|
||||
res[QSL("acirc")] = 0x00e2;
|
||||
res[QSL("acute")] = 0x00b4;
|
||||
res[QSL("aelig")] = 0x00e6;
|
||||
res[QSL("agrave")] = 0x00e0;
|
||||
res[QSL("alefsym")] = 0x2135;
|
||||
res[QSL("alpha")] = 0x03b1;
|
||||
res[QSL("amp")] = 38;
|
||||
res[QSL("and")] = 0x22a5;
|
||||
res[QSL("ang")] = 0x2220;
|
||||
res[QSL("apos")] = 0x0027;
|
||||
res[QSL("aring")] = 0x00e5;
|
||||
res[QSL("asymp")] = 0x2248;
|
||||
res[QSL("atilde")] = 0x00e3;
|
||||
res[QSL("auml")] = 0x00e4;
|
||||
res[QSL("bdquo")] = 0x201e;
|
||||
res[QSL("beta")] = 0x03b2;
|
||||
res[QSL("brvbar")] = 0x00a6;
|
||||
res[QSL("bull")] = 0x2022;
|
||||
res[QSL("cap")] = 0x2229;
|
||||
res[QSL("ccedil")] = 0x00e7;
|
||||
res[QSL("cedil")] = 0x00b8;
|
||||
res[QSL("cent")] = 0x00a2;
|
||||
res[QSL("chi")] = 0x03c7;
|
||||
res[QSL("circ")] = 0x02c6;
|
||||
res[QSL("clubs")] = 0x2663;
|
||||
res[QSL("cong")] = 0x2245;
|
||||
res[QSL("copy")] = 0x00a9;
|
||||
res[QSL("crarr")] = 0x21b5;
|
||||
res[QSL("cup")] = 0x222a;
|
||||
res[QSL("curren")] = 0x00a4;
|
||||
res[QSL("dArr")] = 0x21d3;
|
||||
res[QSL("dagger")] = 0x2020;
|
||||
res[QSL("darr")] = 0x2193;
|
||||
res[QSL("deg")] = 0x00b0;
|
||||
res[QSL("delta")] = 0x03b4;
|
||||
res[QSL("diams")] = 0x2666;
|
||||
res[QSL("divide")] = 0x00f7;
|
||||
res[QSL("eacute")] = 0x00e9;
|
||||
res[QSL("ecirc")] = 0x00ea;
|
||||
res[QSL("egrave")] = 0x00e8;
|
||||
res[QSL("empty")] = 0x2205;
|
||||
res[QSL("emsp")] = 0x2003;
|
||||
res[QSL("ensp")] = 0x2002;
|
||||
res[QSL("epsilon")] = 0x03b5;
|
||||
res[QSL("equiv")] = 0x2261;
|
||||
res[QSL("eta")] = 0x03b7;
|
||||
res[QSL("eth")] = 0x00f0;
|
||||
res[QSL("euml")] = 0x00eb;
|
||||
res[QSL("euro")] = 0x20ac;
|
||||
res[QSL("exist")] = 0x2203;
|
||||
res[QSL("fnof")] = 0x0192;
|
||||
res[QSL("forall")] = 0x2200;
|
||||
res[QSL("frac12")] = 0x00bd;
|
||||
res[QSL("frac14")] = 0x00bc;
|
||||
res[QSL("frac34")] = 0x00be;
|
||||
res[QSL("frasl")] = 0x2044;
|
||||
res[QSL("gamma")] = 0x03b3;
|
||||
res[QSL("ge")] = 0x2265;
|
||||
res[QSL("gt")] = 62;
|
||||
res[QSL("hArr")] = 0x21d4;
|
||||
res[QSL("harr")] = 0x2194;
|
||||
res[QSL("hearts")] = 0x2665;
|
||||
res[QSL("hellip")] = 0x2026;
|
||||
res[QSL("iacute")] = 0x00ed;
|
||||
res[QSL("icirc")] = 0x00ee;
|
||||
res[QSL("iexcl")] = 0x00a1;
|
||||
res[QSL("igrave")] = 0x00ec;
|
||||
res[QSL("image")] = 0x2111;
|
||||
res[QSL("infin")] = 0x221e;
|
||||
res[QSL("int")] = 0x222b;
|
||||
res[QSL("iota")] = 0x03b9;
|
||||
res[QSL("iquest")] = 0x00bf;
|
||||
res[QSL("isin")] = 0x2208;
|
||||
res[QSL("iuml")] = 0x00ef;
|
||||
res[QSL("kappa")] = 0x03ba;
|
||||
res[QSL("lArr")] = 0x21d0;
|
||||
res[QSL("lambda")] = 0x03bb;
|
||||
res[QSL("lang")] = 0x2329;
|
||||
res[QSL("laquo")] = 0x00ab;
|
||||
res[QSL("larr")] = 0x2190;
|
||||
res[QSL("lceil")] = 0x2308;
|
||||
res[QSL("ldquo")] = 0x201c;
|
||||
res[QSL("le")] = 0x2264;
|
||||
res[QSL("lfloor")] = 0x230a;
|
||||
res[QSL("lowast")] = 0x2217;
|
||||
res[QSL("loz")] = 0x25ca;
|
||||
res[QSL("lrm")] = 0x200e;
|
||||
res[QSL("lsaquo")] = 0x2039;
|
||||
res[QSL("lsquo")] = 0x2018;
|
||||
res[QSL("lt")] = 60;
|
||||
res[QSL("macr")] = 0x00af;
|
||||
res[QSL("mdash")] = 0x2014;
|
||||
res[QSL("micro")] = 0x00b5;
|
||||
res[QSL("middot")] = 0x00b7;
|
||||
res[QSL("minus")] = 0x2212;
|
||||
res[QSL("mu")] = 0x03bc;
|
||||
res[QSL("nabla")] = 0x2207;
|
||||
res[QSL("nbsp")] = 0x00a0;
|
||||
res[QSL("ndash")] = 0x2013;
|
||||
res[QSL("ne")] = 0x2260;
|
||||
res[QSL("ni")] = 0x220b;
|
||||
res[QSL("not")] = 0x00ac;
|
||||
res[QSL("notin")] = 0x2209;
|
||||
res[QSL("nsub")] = 0x2284;
|
||||
res[QSL("ntilde")] = 0x00f1;
|
||||
res[QSL("nu")] = 0x03bd;
|
||||
res[QSL("oacute")] = 0x00f3;
|
||||
res[QSL("ocirc")] = 0x00f4;
|
||||
res[QSL("oelig")] = 0x0153;
|
||||
res[QSL("ograve")] = 0x00f2;
|
||||
res[QSL("oline")] = 0x203e;
|
||||
res[QSL("omega")] = 0x03c9;
|
||||
res[QSL("omicron")] = 0x03bf;
|
||||
res[QSL("oplus")] = 0x2295;
|
||||
res[QSL("or")] = 0x22a6;
|
||||
res[QSL("ordf")] = 0x00aa;
|
||||
res[QSL("ordm")] = 0x00ba;
|
||||
res[QSL("oslash")] = 0x00f8;
|
||||
res[QSL("otilde")] = 0x00f5;
|
||||
res[QSL("otimes")] = 0x2297;
|
||||
res[QSL("ouml")] = 0x00f6;
|
||||
res[QSL("para")] = 0x00b6;
|
||||
res[QSL("part")] = 0x2202;
|
||||
res[QSL("percnt")] = 0x0025;
|
||||
res[QSL("permil")] = 0x2030;
|
||||
res[QSL("perp")] = 0x22a5;
|
||||
res[QSL("phi")] = 0x03c6;
|
||||
res[QSL("pi")] = 0x03c0;
|
||||
res[QSL("piv")] = 0x03d6;
|
||||
res[QSL("plusmn")] = 0x00b1;
|
||||
res[QSL("pound")] = 0x00a3;
|
||||
res[QSL("prime")] = 0x2032;
|
||||
res[QSL("prod")] = 0x220f;
|
||||
res[QSL("prop")] = 0x221d;
|
||||
res[QSL("psi")] = 0x03c8;
|
||||
res[QSL("quot")] = 34;
|
||||
res[QSL("rArr")] = 0x21d2;
|
||||
res[QSL("radic")] = 0x221a;
|
||||
res[QSL("rang")] = 0x232a;
|
||||
res[QSL("raquo")] = 0x00bb;
|
||||
res[QSL("rarr")] = 0x2192;
|
||||
res[QSL("rceil")] = 0x2309;
|
||||
res[QSL("rdquo")] = 0x201d;
|
||||
res[QSL("real")] = 0x211c;
|
||||
res[QSL("reg")] = 0x00ae;
|
||||
res[QSL("rfloor")] = 0x230b;
|
||||
res[QSL("rho")] = 0x03c1;
|
||||
res[QSL("rlm")] = 0x200f;
|
||||
res[QSL("rsaquo")] = 0x203a;
|
||||
res[QSL("rsquo")] = 0x2019;
|
||||
res[QSL("sbquo")] = 0x201a;
|
||||
res[QSL("scaron")] = 0x0161;
|
||||
res[QSL("sdot")] = 0x22c5;
|
||||
res[QSL("sect")] = 0x00a7;
|
||||
res[QSL("shy")] = 0x00ad;
|
||||
res[QSL("sigma")] = 0x03c3;
|
||||
res[QSL("sigmaf")] = 0x03c2;
|
||||
res[QSL("sim")] = 0x223c;
|
||||
res[QSL("spades")] = 0x2660;
|
||||
res[QSL("sub")] = 0x2282;
|
||||
res[QSL("sube")] = 0x2286;
|
||||
res[QSL("sum")] = 0x2211;
|
||||
res[QSL("sup")] = 0x2283;
|
||||
res[QSL("sup1")] = 0x00b9;
|
||||
res[QSL("sup2")] = 0x00b2;
|
||||
res[QSL("sup3")] = 0x00b3;
|
||||
res[QSL("supe")] = 0x2287;
|
||||
res[QSL("szlig")] = 0x00df;
|
||||
res[QSL("tau")] = 0x03c4;
|
||||
res[QSL("there4")] = 0x2234;
|
||||
res[QSL("theta")] = 0x03b8;
|
||||
res[QSL("thetasym")] = 0x03d1;
|
||||
res[QSL("thinsp")] = 0x2009;
|
||||
res[QSL("thorn")] = 0x00fe;
|
||||
res[QSL("tilde")] = 0x02dc;
|
||||
res[QSL("times")] = 0x00d7;
|
||||
res[QSL("trade")] = 0x2122;
|
||||
res[QSL("uArr")] = 0x21d1;
|
||||
res[QSL("uacute")] = 0x00fa;
|
||||
res[QSL("uarr")] = 0x2191;
|
||||
res[QSL("ucirc")] = 0x00fb;
|
||||
res[QSL("ugrave")] = 0x00f9;
|
||||
res[QSL("uml")] = 0x00a8;
|
||||
res[QSL("upsih")] = 0x03d2;
|
||||
res[QSL("upsilon")] = 0x03c5;
|
||||
res[QSL("uuml")] = 0x00fc;
|
||||
res[QSL("weierp")] = 0x2118;
|
||||
res[QSL("xi")] = 0x03be;
|
||||
res[QSL("yacute")] = 0x00fd;
|
||||
res[QSL("yen")] = 0x00a5;
|
||||
res[QSL("yuml")] = 0x00ff;
|
||||
res[QSL("zeta")] = 0x03b6;
|
||||
res[QSL("zwj")] = 0x200d;
|
||||
res[QSL("zwnj")] = 0x200c;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
QString WebFactory::customUserAgent() const {
|
||||
|
@ -10,9 +10,8 @@
|
||||
#include <QMap>
|
||||
|
||||
#if defined(NO_LITE)
|
||||
#include <QWebEngineProfile>
|
||||
#include <QWebEngineSettings>
|
||||
|
||||
class QWebEngineProfile;
|
||||
class QWebEngineSettings;
|
||||
class QAction;
|
||||
class NetworkUrlInterceptor;
|
||||
#endif
|
||||
@ -23,7 +22,7 @@ class CookieJar;
|
||||
class ApiServer;
|
||||
class Readability;
|
||||
|
||||
class WebFactory : public QObject {
|
||||
class RSSGUARD_DLLSPEC WebFactory : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -37,7 +36,7 @@ class WebFactory : public QObject {
|
||||
// converts both HTML entity names and numbers to UTF-8 string.
|
||||
// Example of entities are:
|
||||
// ∀ = ∀ (entity name), ∀ (base-10 entity), ∀ (base-16 entity)
|
||||
QString unescapeHtml(const QString& html);
|
||||
static QString unescapeHtml(const QString& html);
|
||||
|
||||
QString limitSizeOfHtmlImages(const QString& html, int desired_width, int images_max_height) const;
|
||||
QString processFeedUriScheme(const QString& url);
|
||||
@ -79,11 +78,11 @@ class WebFactory : public QObject {
|
||||
void webEngineSettingChanged(bool enabled);
|
||||
|
||||
private:
|
||||
QAction* createEngineSettingsAction(const QString& title, QWebEngineSettings::WebAttribute attribute);
|
||||
QAction* createEngineSettingsAction(const QString& title, int web_attribute);
|
||||
#endif
|
||||
|
||||
private:
|
||||
void generateUnescapes();
|
||||
static QMap<QString, char16_t> generateUnescapes();
|
||||
|
||||
private:
|
||||
AdBlockManager* m_adBlock;
|
||||
@ -97,7 +96,6 @@ class WebFactory : public QObject {
|
||||
ApiServer* m_apiServer;
|
||||
CookieJar* m_cookieJar;
|
||||
Readability* m_readability;
|
||||
QMap<QString, char16_t> m_htmlNamedEntities;
|
||||
QString m_customUserAgent;
|
||||
};
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
// This is common model which displays only categories/feeds
|
||||
// and allows user to place checkmarks.
|
||||
class AccountCheckModel : public QAbstractItemModel {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC AccountCheckModel : public QAbstractItemModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AccountCheckModel(QObject* parent = nullptr);
|
||||
@ -56,8 +56,8 @@ class AccountCheckModel : public QAbstractItemModel {
|
||||
bool m_recursiveChange;
|
||||
};
|
||||
|
||||
class AccountCheckSortedModel : public QSortFilterProxyModel {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC AccountCheckSortedModel : public QSortFilterProxyModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AccountCheckSortedModel(QObject* parent = nullptr);
|
||||
|
@ -10,14 +10,14 @@
|
||||
#include <QPair>
|
||||
#include <QStringList>
|
||||
|
||||
struct CacheSnapshot {
|
||||
QMap<QString, QStringList> m_cachedLabelAssignments;
|
||||
QMap<QString, QStringList> m_cachedLabelDeassignments;
|
||||
QMap<RootItem::ReadStatus, QStringList> m_cachedStatesRead;
|
||||
QMap<RootItem::Importance, QList<Message>> m_cachedStatesImportant;
|
||||
struct RSSGUARD_DLLSPEC CacheSnapshot {
|
||||
QMap<QString, QStringList> m_cachedLabelAssignments;
|
||||
QMap<QString, QStringList> m_cachedLabelDeassignments;
|
||||
QMap<RootItem::ReadStatus, QStringList> m_cachedStatesRead;
|
||||
QMap<RootItem::Importance, QList<Message>> m_cachedStatesImportant;
|
||||
};
|
||||
|
||||
class CacheForServiceRoot {
|
||||
class RSSGUARD_DLLSPEC CacheForServiceRoot {
|
||||
public:
|
||||
explicit CacheForServiceRoot();
|
||||
virtual ~CacheForServiceRoot();
|
||||
@ -34,7 +34,6 @@ class CacheForServiceRoot {
|
||||
bool isEmpty() const;
|
||||
|
||||
protected:
|
||||
|
||||
// Returns all cached data and clears the cache.
|
||||
// NOTE: If returned data are not successfuly passed back to
|
||||
// server then caller needs to re-add the data back to cache.
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "services/abstract/rootitem.h"
|
||||
|
||||
class Category : public RootItem {
|
||||
class RSSGUARD_DLLSPEC Category : public RootItem {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <QVariant>
|
||||
|
||||
// Base class for "feed" nodes.
|
||||
class Feed : public RootItem {
|
||||
class RSSGUARD_DLLSPEC Feed : public RootItem {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -11,7 +11,7 @@ namespace Ui {
|
||||
class AccountDetails;
|
||||
}
|
||||
|
||||
class AccountDetails : public QWidget {
|
||||
class RSSGUARD_DLLSPEC AccountDetails : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
friend class FormAccountDetails;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "services/abstract/feed.h"
|
||||
|
||||
class AuthenticationDetails : public QWidget, public Ui::AuthenticationDetails {
|
||||
class RSSGUARD_DLLSPEC AuthenticationDetails : public QWidget, public Ui::AuthenticationDetails {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
class RootItem;
|
||||
|
||||
class CustomMessagePreviewer : public QWidget {
|
||||
class RSSGUARD_DLLSPEC CustomMessagePreviewer : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include "services/abstract/gui/formaccountdetails.h"
|
||||
|
||||
#include "ui_formaccountdetails.h"
|
||||
|
||||
#include "gui/guiutilities.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
class ServiceRoot;
|
||||
|
||||
class FormAccountDetails : public QDialog {
|
||||
class RSSGUARD_DLLSPEC FormAccountDetails : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "services/abstract/label.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
FormAddEditLabel::FormAddEditLabel(QWidget* parent) : QDialog(parent), m_editableLabel(nullptr) {
|
||||
m_ui.setupUi(this);
|
||||
m_ui.m_txtName->lineEdit()->setPlaceholderText(tr("Name for your label"));
|
||||
|
@ -13,8 +13,8 @@ namespace Ui {
|
||||
|
||||
class Label;
|
||||
|
||||
class FormAddEditLabel : public QDialog {
|
||||
Q_OBJECT
|
||||
class RSSGUARD_DLLSPEC FormAddEditLabel : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormAddEditLabel(QWidget* parent = nullptr);
|
||||
|
@ -13,7 +13,7 @@ namespace Ui {
|
||||
|
||||
class Search;
|
||||
|
||||
class FormAddEditProbe : public QDialog {
|
||||
class RSSGUARD_DLLSPEC FormAddEditProbe : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -22,7 +22,7 @@ class QMenu;
|
||||
class QAction;
|
||||
class MultiFeedEditCheckBox;
|
||||
|
||||
class FormCategoryDetails : public QDialog {
|
||||
class RSSGUARD_DLLSPEC FormCategoryDetails : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include "services/abstract/gui/formfeeddetails.h"
|
||||
|
||||
#include "ui_formfeeddetails.h"
|
||||
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "exceptions/applicationexception.h"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user