refactor C++ includes
This commit is contained in:
parent
df03e853a5
commit
238a18cbde
@ -525,6 +525,7 @@ endif()
|
|||||||
|
|
||||||
if(SQLite3_FOUND)
|
if(SQLite3_FOUND)
|
||||||
# Include directory and library are linked to below.
|
# Include directory and library are linked to below.
|
||||||
|
message(STATUS "Using system SQLite3 ${SQLite3_VERSION}.")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Using bundled SQLite3.")
|
message(STATUS "Using bundled SQLite3.")
|
||||||
|
|
||||||
@ -660,6 +661,12 @@ if(SQLite3_FOUND)
|
|||||||
${SQLite3_INCLUDE_DIRS}
|
${SQLite3_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(rssguard
|
||||||
|
PRIVATE
|
||||||
|
|
||||||
|
SYSTEM_SQLITE3
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(rssguard PRIVATE
|
target_link_libraries(rssguard PRIVATE
|
||||||
${SQLite3_LIBRARIES}
|
${SQLite3_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "core/feeddownloader.h"
|
#include "core/feeddownloader.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
#include "core/feedsmodel.h"
|
|
||||||
#include "core/messagefilter.h"
|
#include "core/messagefilter.h"
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
|
@ -10,12 +10,10 @@
|
|||||||
#include "gui/messagebox.h"
|
#include "gui/messagebox.h"
|
||||||
#include "miscellaneous/feedreader.h"
|
#include "miscellaneous/feedreader.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/textfactory.h"
|
|
||||||
#include "services/abstract/feed.h"
|
#include "services/abstract/feed.h"
|
||||||
#include "services/abstract/recyclebin.h"
|
#include "services/abstract/recyclebin.h"
|
||||||
#include "services/abstract/serviceentrypoint.h"
|
#include "services/abstract/serviceentrypoint.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
#include "services/standard/standardserviceroot.h"
|
|
||||||
|
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QPair>
|
#include <QPair>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "core/message.h"
|
#include "core/message.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "services/abstract/feed.h"
|
#include "services/abstract/feed.h"
|
||||||
#include "services/abstract/label.h"
|
#include "services/abstract/label.h"
|
||||||
|
@ -5,9 +5,7 @@
|
|||||||
#include "core/messagesmodel.h"
|
#include "core/messagesmodel.h"
|
||||||
#include "core/messagesmodelcache.h"
|
#include "core/messagesmodelcache.h"
|
||||||
#include "definitions/globals.h"
|
#include "definitions/globals.h"
|
||||||
#include "miscellaneous/application.h"
|
|
||||||
#include "miscellaneous/regexfactory.h"
|
#include "miscellaneous/regexfactory.h"
|
||||||
#include "miscellaneous/settings.h"
|
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "database/databasedriver.h"
|
#include "database/databasedriver.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/ioexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "miscellaneous/iofactory.h"
|
#include "miscellaneous/iofactory.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
|
||||||
#include "services/abstract/category.h"
|
#include "services/abstract/category.h"
|
||||||
|
|
||||||
#include <QSqlDriver>
|
#include <QSqlDriver>
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
|
|
||||||
|
#if defined(SYSTEM_SQLITE3)
|
||||||
|
#include <sqlite3.h>
|
||||||
|
#else
|
||||||
#include "3rd-party/sqlite/sqlite3.h"
|
#include "3rd-party/sqlite/sqlite3.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QSqlDriver>
|
#include <QSqlDriver>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "dynamic-shortcuts/dynamicshortcuts.h"
|
#include "dynamic-shortcuts/dynamicshortcuts.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
|
|
||||||
@ -20,9 +19,9 @@ void DynamicShortcuts::load(const QList<QAction*>& actions) {
|
|||||||
Settings* settings = qApp->settings();
|
Settings* settings = qApp->settings();
|
||||||
|
|
||||||
for (QAction* action : actions) {
|
for (QAction* action : actions) {
|
||||||
QString shortcut_for_action = settings->value(GROUP(Keyboard),
|
QString shortcut_for_action =
|
||||||
action->objectName(),
|
settings->value(GROUP(Keyboard), action->objectName(), action->shortcut().toString(QKeySequence::PortableText))
|
||||||
action->shortcut().toString(QKeySequence::PortableText)).toString();
|
.toString();
|
||||||
|
|
||||||
action->setShortcut(QKeySequence::fromString(shortcut_for_action, QKeySequence::PortableText));
|
action->setShortcut(QKeySequence::fromString(shortcut_for_action, QKeySequence::PortableText));
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
#include "gui/dialogs/formabout.h"
|
#include "gui/dialogs/formabout.h"
|
||||||
|
|
||||||
#include "database/databasedriver.h"
|
|
||||||
#include "database/databasefactory.h"
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/applicationexception.h"
|
|
||||||
#include "gui/guiutilities.h"
|
#include "gui/guiutilities.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "gui/guiutilities.h"
|
#include "gui/guiutilities.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "services/standard/standardserviceentrypoint.h"
|
#include "services/abstract/serviceentrypoint.h"
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
|
|
||||||
#include "database/databasefactory.h"
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/dialogs/formabout.h"
|
#include "gui/dialogs/formabout.h"
|
||||||
#include "gui/dialogs/formaddaccount.h"
|
#include "gui/dialogs/formaddaccount.h"
|
||||||
@ -13,10 +12,8 @@
|
|||||||
#include "gui/dialogs/formupdate.h"
|
#include "gui/dialogs/formupdate.h"
|
||||||
#include "gui/feedmessageviewer.h"
|
#include "gui/feedmessageviewer.h"
|
||||||
#include "gui/feedsview.h"
|
#include "gui/feedsview.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "gui/messagepreviewer.h"
|
#include "gui/messagepreviewer.h"
|
||||||
#include "gui/messagesview.h"
|
#include "gui/messagesview.h"
|
||||||
#include "gui/reusable/plaintoolbutton.h"
|
|
||||||
#include "gui/reusable/searchlineedit.h"
|
#include "gui/reusable/searchlineedit.h"
|
||||||
#include "gui/systemtrayicon.h"
|
#include "gui/systemtrayicon.h"
|
||||||
#include "gui/tabbar.h"
|
#include "gui/tabbar.h"
|
||||||
@ -28,14 +25,11 @@
|
|||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/mutex.h"
|
#include "miscellaneous/mutex.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
#include "miscellaneous/systemfactory.h"
|
|
||||||
#include "network-web/adblock/adblockicon.h"
|
#include "network-web/adblock/adblockicon.h"
|
||||||
#include "network-web/adblock/adblockmanager.h"
|
#include "network-web/adblock/adblockmanager.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/abstract/recyclebin.h"
|
#include "services/abstract/recyclebin.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
#include "services/owncloud/owncloudnetworkfactory.h"
|
|
||||||
#include "services/standard/gui/formstandardimportexport.h"
|
|
||||||
|
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
// For license of this file, see <project-root-folder>/LICENSE.md.
|
// For license of this file, see <project-root-folder>/LICENSE.md.
|
||||||
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QJSEngine>
|
|
||||||
#include <QProcess>
|
|
||||||
|
|
||||||
#include "gui/dialogs/formmessagefiltersmanager.h"
|
#include "gui/dialogs/formmessagefiltersmanager.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
@ -20,7 +16,10 @@
|
|||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/abstract/accountcheckmodel.h"
|
#include "services/abstract/accountcheckmodel.h"
|
||||||
#include "services/abstract/feed.h"
|
#include "services/abstract/feed.h"
|
||||||
#include "services/abstract/labelsnode.h"
|
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QJSEngine>
|
||||||
|
#include <QProcess>
|
||||||
|
|
||||||
FormMessageFiltersManager::FormMessageFiltersManager(FeedReader* reader,
|
FormMessageFiltersManager::FormMessageFiltersManager(FeedReader* reader,
|
||||||
const QList<ServiceRoot*>& accounts,
|
const QList<ServiceRoot*>& accounts,
|
||||||
|
@ -3,12 +3,10 @@
|
|||||||
#include "gui/dialogs/formrestoredatabasesettings.h"
|
#include "gui/dialogs/formrestoredatabasesettings.h"
|
||||||
|
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
|
||||||
#include "gui/guiutilities.h"
|
#include "gui/guiutilities.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
|
|
||||||
#include "QFileDialog"
|
#include <QFileDialog>
|
||||||
|
|
||||||
FormRestoreDatabaseSettings::FormRestoreDatabaseSettings(QWidget& parent) : QDialog(&parent), m_shouldRestart(false) {
|
FormRestoreDatabaseSettings::FormRestoreDatabaseSettings(QWidget& parent) : QDialog(&parent), m_shouldRestart(false) {
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/guiutilities.h"
|
#include "gui/guiutilities.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/iofactory.h"
|
|
||||||
#include "network-web/downloader.h"
|
#include "network-web/downloader.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
|
@ -2,33 +2,16 @@
|
|||||||
|
|
||||||
#include "gui/feedmessageviewer.h"
|
#include "gui/feedmessageviewer.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
|
||||||
#include "core/feeddownloader.h"
|
|
||||||
#include "core/feedsproxymodel.h"
|
|
||||||
#include "core/messagesproxymodel.h"
|
#include "core/messagesproxymodel.h"
|
||||||
#include "database/databasecleaner.h"
|
|
||||||
#include "database/databasefactory.h"
|
|
||||||
#include "exceptions/applicationexception.h"
|
|
||||||
#include "gui/dialogs/formdatabasecleanup.h"
|
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/feedsview.h"
|
#include "gui/feedsview.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "gui/messagepreviewer.h"
|
#include "gui/messagepreviewer.h"
|
||||||
#include "gui/messagesview.h"
|
#include "gui/messagesview.h"
|
||||||
#include "gui/systemtrayicon.h"
|
|
||||||
#include "gui/toolbars/feedstoolbar.h"
|
#include "gui/toolbars/feedstoolbar.h"
|
||||||
#include "gui/toolbars/messagestoolbar.h"
|
#include "gui/toolbars/messagestoolbar.h"
|
||||||
#include "gui/toolbars/statusbar.h"
|
|
||||||
#include "gui/webbrowser.h"
|
#include "gui/webbrowser.h"
|
||||||
#include "miscellaneous/feedreader.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "miscellaneous/mutex.h"
|
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
#include "miscellaneous/systemfactory.h"
|
|
||||||
#include "miscellaneous/templates.h"
|
#include "miscellaneous/templates.h"
|
||||||
#include "services/standard/standardfeed.h"
|
|
||||||
#include "services/standard/standardfeedsimportexportmodel.h"
|
|
||||||
#include "services/standard/standardserviceroot.h"
|
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
@ -8,16 +8,11 @@
|
|||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/messagebox.h"
|
#include "gui/messagebox.h"
|
||||||
#include "gui/reusable/styleditemdelegatewithoutfocus.h"
|
#include "gui/reusable/styleditemdelegatewithoutfocus.h"
|
||||||
#include "gui/systemtrayicon.h"
|
|
||||||
#include "miscellaneous/feedreader.h"
|
#include "miscellaneous/feedreader.h"
|
||||||
#include "miscellaneous/mutex.h"
|
#include "miscellaneous/mutex.h"
|
||||||
#include "miscellaneous/systemfactory.h"
|
|
||||||
#include "services/abstract/feed.h"
|
#include "services/abstract/feed.h"
|
||||||
#include "services/abstract/gui/formcategorydetails.h"
|
|
||||||
#include "services/abstract/rootitem.h"
|
#include "services/abstract/rootitem.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
#include "services/standard/standardcategory.h"
|
|
||||||
#include "services/standard/standardfeed.h"
|
|
||||||
|
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
|
@ -2,21 +2,14 @@
|
|||||||
|
|
||||||
#include "gui/messagepreviewer.h"
|
#include "gui/messagepreviewer.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
|
||||||
#include "gui/itemdetails.h"
|
#include "gui/itemdetails.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "gui/reusable/plaintoolbutton.h"
|
|
||||||
#include "gui/reusable/searchtextwidget.h"
|
|
||||||
#include "gui/webbrowser.h"
|
#include "gui/webbrowser.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/abstract/gui/custommessagepreviewer.h"
|
#include "services/abstract/gui/custommessagepreviewer.h"
|
||||||
#include "services/abstract/label.h"
|
#include "services/abstract/label.h"
|
||||||
#include "services/abstract/labelsnode.h"
|
#include "services/abstract/labelsnode.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
#include "services/gmail/gui/emailpreviewer.h"
|
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "miscellaneous/externaltool.h"
|
#include "miscellaneous/externaltool.h"
|
||||||
#include "miscellaneous/feedreader.h"
|
#include "miscellaneous/feedreader.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
#include "network-web/networkfactory.h"
|
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "qnamespace.h"
|
#include "qnamespace.h"
|
||||||
#include "services/abstract/labelsnode.h"
|
#include "services/abstract/labelsnode.h"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "gui/reusable/colortoolbutton.h"
|
#include "gui/reusable/colortoolbutton.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
|
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "gui/reusable/helpspoiler.h"
|
#include "gui/reusable/helpspoiler.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "gui/reusable/plaintoolbutton.h"
|
#include "gui/reusable/plaintoolbutton.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
|
@ -20,7 +20,7 @@ JsSyntaxHighlighter::JsSyntaxHighlighter(QTextDocument* parent) : QSyntaxHighlig
|
|||||||
|
|
||||||
keywords = FROM_STD_LIST(QStringList, std_keywords);
|
keywords = FROM_STD_LIST(QStringList, std_keywords);
|
||||||
|
|
||||||
for (const QString& pattern : keywords) {
|
for (const QString& pattern : qAsConst(keywords)) {
|
||||||
rule.m_pattern = QRegularExpression(pattern);
|
rule.m_pattern = QRegularExpression(pattern);
|
||||||
rule.m_format = m_keywordFormat;
|
rule.m_format = m_keywordFormat;
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "gui/reusable/progressbarwithtext.h"
|
#include "gui/reusable/progressbarwithtext.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/application.h"
|
|
||||||
|
|
||||||
ProgressBarWithText::ProgressBarWithText(QWidget* parent) : QProgressBar(parent) {}
|
ProgressBarWithText::ProgressBarWithText(QWidget* parent) : QProgressBar(parent) {}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "gui/reusable/styleditemdelegatewithoutfocus.h"
|
#include "gui/reusable/styleditemdelegatewithoutfocus.h"
|
||||||
|
|
||||||
#include "miscellaneous/application.h"
|
#include "definitions/definitions.h"
|
||||||
|
|
||||||
StyledItemDelegateWithoutFocus::StyledItemDelegateWithoutFocus(int height_row, int padding_row, QObject* parent)
|
StyledItemDelegateWithoutFocus::StyledItemDelegateWithoutFocus(int height_row, int padding_row, QObject* parent)
|
||||||
: QStyledItemDelegate(parent), m_rowHeight(height_row), m_rowPadding(padding_row) {}
|
: QStyledItemDelegate(parent), m_rowHeight(height_row), m_rowPadding(padding_row) {}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "gui/settings/settingsbrowsermail.h"
|
#include "gui/settings/settingsbrowsermail.h"
|
||||||
|
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "gui/reusable/networkproxydetails.h"
|
#include "gui/reusable/networkproxydetails.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/externaltool.h"
|
#include "miscellaneous/externaltool.h"
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include "database/databasefactory.h"
|
#include "database/databasefactory.h"
|
||||||
#include "database/mariadbdriver.h"
|
#include "database/mariadbdriver.h"
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
|
|
||||||
SettingsDatabase::SettingsDatabase(Settings* settings, QWidget* parent)
|
SettingsDatabase::SettingsDatabase(Settings* settings, QWidget* parent)
|
||||||
|
@ -2,12 +2,10 @@
|
|||||||
|
|
||||||
#include "gui/settings/settingsfeedsmessages.h"
|
#include "gui/settings/settingsfeedsmessages.h"
|
||||||
|
|
||||||
|
#include "core/feedsmodel.h"
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/feedmessageviewer.h"
|
#include "gui/feedmessageviewer.h"
|
||||||
#include "gui/feedsview.h"
|
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "gui/messagesview.h"
|
|
||||||
#include "gui/reusable/timespinbox.h"
|
#include "gui/reusable/timespinbox.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/feedreader.h"
|
#include "miscellaneous/feedreader.h"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "gui/settings/settingsgui.h"
|
#include "gui/settings/settingsgui.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
|
||||||
#include "core/feedsmodel.h"
|
#include "core/feedsmodel.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/feedmessageviewer.h"
|
#include "gui/feedmessageviewer.h"
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#include "gui/settings/settingsnotifications.h"
|
#include "gui/settings/settingsnotifications.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "gui/notifications/notificationseditor.h"
|
#include "gui/notifications/notificationseditor.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/notificationfactory.h"
|
#include "miscellaneous/notificationfactory.h"
|
||||||
@ -14,7 +12,8 @@
|
|||||||
SettingsNotifications::SettingsNotifications(Settings* settings, QWidget* parent) : SettingsPanel(settings, parent) {
|
SettingsNotifications::SettingsNotifications(Settings* settings, QWidget* parent) : SettingsPanel(settings, parent) {
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
m_ui.m_lblInfo->setHelpText(tr("You must have \"tray icon\" activated to have balloon notifications working.\n\n"
|
m_ui.m_lblInfo
|
||||||
|
->setHelpText(tr("You must have \"tray icon\" activated to have balloon notifications working.\n\n"
|
||||||
"Also, there are some built-in sounds. Just start typing \":\" and they will show up."),
|
"Also, there are some built-in sounds. Just start typing \":\" and they will show up."),
|
||||||
true);
|
true);
|
||||||
|
|
||||||
@ -26,7 +25,8 @@ void SettingsNotifications::loadSettings() {
|
|||||||
onBeginLoadSettings();
|
onBeginLoadSettings();
|
||||||
|
|
||||||
// Load fancy notification settings.
|
// Load fancy notification settings.
|
||||||
m_ui.m_checkEnableNotifications->setChecked(settings()->value(GROUP(GUI), SETTING(GUI::EnableNotifications)).toBool());
|
m_ui.m_checkEnableNotifications
|
||||||
|
->setChecked(settings()->value(GROUP(GUI), SETTING(GUI::EnableNotifications)).toBool());
|
||||||
m_ui.m_editor->loadNotifications(qApp->notifications()->allNotifications());
|
m_ui.m_editor->loadNotifications(qApp->notifications()->allNotifications());
|
||||||
|
|
||||||
onEndLoadSettings();
|
onEndLoadSettings();
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/dialogs/formsettings.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/reusable/plaintoolbutton.h"
|
#include "gui/reusable/plaintoolbutton.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
#include "miscellaneous/templates.h"
|
|
||||||
|
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
@ -21,9 +20,8 @@ TabBar::~TabBar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TabBar::setTabType(int index, TabBar::TabType type) {
|
void TabBar::setTabType(int index, TabBar::TabType type) {
|
||||||
const auto button_position = static_cast<ButtonPosition>(style()->styleHint(QStyle::StyleHint::SH_TabBar_CloseButtonPosition,
|
const auto button_position =
|
||||||
nullptr,
|
static_cast<ButtonPosition>(style()->styleHint(QStyle::StyleHint::SH_TabBar_CloseButtonPosition, nullptr, this));
|
||||||
this));
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TabBar::TabType::DownloadManager:
|
case TabBar::TabType::DownloadManager:
|
||||||
@ -51,9 +49,8 @@ void TabBar::setTabType(int index, TabBar::TabType type) {
|
|||||||
|
|
||||||
void TabBar::closeTabViaButton() {
|
void TabBar::closeTabViaButton() {
|
||||||
const auto* close_button = qobject_cast<QAbstractButton*>(sender());
|
const auto* close_button = qobject_cast<QAbstractButton*>(sender());
|
||||||
const auto button_position = static_cast<ButtonPosition>(style()->styleHint(QStyle::StyleHint::SH_TabBar_CloseButtonPosition,
|
const auto button_position =
|
||||||
nullptr,
|
static_cast<ButtonPosition>(style()->styleHint(QStyle::StyleHint::SH_TabBar_CloseButtonPosition, nullptr, this));
|
||||||
this));
|
|
||||||
|
|
||||||
if (close_button != nullptr) {
|
if (close_button != nullptr) {
|
||||||
// Find index of tab for this close button.
|
// Find index of tab for this close button.
|
||||||
@ -75,15 +72,11 @@ void TabBar::wheelEvent(QWheelEvent* event) {
|
|||||||
if (number_of_tabs > 1) {
|
if (number_of_tabs > 1) {
|
||||||
if (event->angleDelta().y() > 0) {
|
if (event->angleDelta().y() > 0) {
|
||||||
// Scroll to the LEFT tab.
|
// Scroll to the LEFT tab.
|
||||||
setCurrentIndex(current_index == 0
|
setCurrentIndex(current_index == 0 ? number_of_tabs - 1 : current_index - 1);
|
||||||
? number_of_tabs - 1
|
|
||||||
: current_index - 1);
|
|
||||||
}
|
}
|
||||||
else if (event->angleDelta().y() < 0) {
|
else if (event->angleDelta().y() < 0) {
|
||||||
// Scroll to the RIGHT tab.
|
// Scroll to the RIGHT tab.
|
||||||
setCurrentIndex(current_index == number_of_tabs - 1
|
setCurrentIndex(current_index == number_of_tabs - 1 ? 0 : current_index + 1);
|
||||||
? 0
|
|
||||||
: current_index + 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
#include "gui/toolbars/basetoolbar.h"
|
#include "gui/toolbars/basetoolbar.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
|
||||||
#include "miscellaneous/settings.h"
|
|
||||||
|
|
||||||
#include <QWidgetAction>
|
#include <QWidgetAction>
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include "gui/reusable/progressbarwithtext.h"
|
#include "gui/reusable/progressbarwithtext.h"
|
||||||
#include "gui/tabwidget.h"
|
#include "gui/tabwidget.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/mutex.h"
|
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
#include "gui/toolbars/toolbareditor.h"
|
#include "gui/toolbars/toolbareditor.h"
|
||||||
|
|
||||||
#include "gui/dialogs/formmain.h"
|
|
||||||
#include "gui/toolbars/basetoolbar.h"
|
#include "gui/toolbars/basetoolbar.h"
|
||||||
|
#include "miscellaneous/application.h"
|
||||||
|
#include "miscellaneous/iconfactory.h"
|
||||||
|
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QWidgetAction>
|
#include <QWidgetAction>
|
||||||
|
|
||||||
ToolBarEditor::ToolBarEditor(QWidget* parent)
|
ToolBarEditor::ToolBarEditor(QWidget* parent) : QWidget(parent), m_ui(new Ui::ToolBarEditor), m_toolBar(nullptr) {
|
||||||
: QWidget(parent), m_ui(new Ui::ToolBarEditor), m_toolBar(nullptr) {
|
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
// Create connections.
|
// Create connections.
|
||||||
@ -21,8 +21,14 @@ ToolBarEditor::ToolBarEditor(QWidget* parent)
|
|||||||
connect(m_ui->m_btnMoveActionUp, &QToolButton::clicked, this, &ToolBarEditor::moveActionUp);
|
connect(m_ui->m_btnMoveActionUp, &QToolButton::clicked, this, &ToolBarEditor::moveActionUp);
|
||||||
connect(m_ui->m_btnMoveActionDown, &QToolButton::clicked, this, &ToolBarEditor::moveActionDown);
|
connect(m_ui->m_btnMoveActionDown, &QToolButton::clicked, this, &ToolBarEditor::moveActionDown);
|
||||||
connect(m_ui->m_btnReset, &QToolButton::clicked, this, &ToolBarEditor::resetToolBar);
|
connect(m_ui->m_btnReset, &QToolButton::clicked, this, &ToolBarEditor::resetToolBar);
|
||||||
connect(m_ui->m_listAvailableActions, &QListWidget::itemSelectionChanged, this, &ToolBarEditor::updateActionsAvailability);
|
connect(m_ui->m_listAvailableActions,
|
||||||
connect(m_ui->m_listActivatedActions, &QListWidget::itemSelectionChanged, this, &ToolBarEditor::updateActionsAvailability);
|
&QListWidget::itemSelectionChanged,
|
||||||
|
this,
|
||||||
|
&ToolBarEditor::updateActionsAvailability);
|
||||||
|
connect(m_ui->m_listActivatedActions,
|
||||||
|
&QListWidget::itemSelectionChanged,
|
||||||
|
this,
|
||||||
|
&ToolBarEditor::updateActionsAvailability);
|
||||||
connect(m_ui->m_listActivatedActions, &QListWidget::itemDoubleClicked, this, &ToolBarEditor::deleteSelectedAction);
|
connect(m_ui->m_listActivatedActions, &QListWidget::itemDoubleClicked, this, &ToolBarEditor::deleteSelectedAction);
|
||||||
connect(m_ui->m_listAvailableActions, &QListWidget::itemDoubleClicked, this, &ToolBarEditor::addSelectedAction);
|
connect(m_ui->m_listAvailableActions, &QListWidget::itemDoubleClicked, this, &ToolBarEditor::addSelectedAction);
|
||||||
|
|
||||||
@ -68,9 +74,8 @@ void ToolBarEditor::loadEditor(const QList<QAction*>& activated_actions, const Q
|
|||||||
m_ui->m_listAvailableActions->clear();
|
m_ui->m_listAvailableActions->clear();
|
||||||
|
|
||||||
for (const QAction* action : activated_actions) {
|
for (const QAction* action : activated_actions) {
|
||||||
QListWidgetItem* action_item = new QListWidgetItem(action->icon(),
|
QListWidgetItem* action_item =
|
||||||
action->text().replace('&', QL1S("")),
|
new QListWidgetItem(action->icon(), action->text().replace('&', QL1S("")), m_ui->m_listActivatedActions);
|
||||||
m_ui->m_listActivatedActions);
|
|
||||||
|
|
||||||
if (action->isSeparator()) {
|
if (action->isSeparator()) {
|
||||||
action_item->setData(Qt::ItemDataRole::UserRole, SEPARATOR_ACTION_NAME);
|
action_item->setData(Qt::ItemDataRole::UserRole, SEPARATOR_ACTION_NAME);
|
||||||
@ -103,9 +108,8 @@ void ToolBarEditor::loadEditor(const QList<QAction*>& activated_actions, const Q
|
|||||||
|
|
||||||
for (QAction* action : available_actions) {
|
for (QAction* action : available_actions) {
|
||||||
if (!activated_actions.contains(action)) {
|
if (!activated_actions.contains(action)) {
|
||||||
QListWidgetItem* action_item = new QListWidgetItem(action->icon(),
|
QListWidgetItem* action_item =
|
||||||
action->text().replace('&', QL1S("")),
|
new QListWidgetItem(action->icon(), action->text().replace('&', QL1S("")), m_ui->m_listAvailableActions);
|
||||||
m_ui->m_listAvailableActions);
|
|
||||||
|
|
||||||
if (action->isSeparator()) {
|
if (action->isSeparator()) {
|
||||||
action_item->setData(Qt::ItemDataRole::UserRole, QSL(SEPARATOR_ACTION_NAME));
|
action_item->setData(Qt::ItemDataRole::UserRole, QSL(SEPARATOR_ACTION_NAME));
|
||||||
@ -140,12 +144,14 @@ bool ToolBarEditor::eventFilter(QObject* object, QEvent* event) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (key_event->key() == Qt::Key::Key_Down &&
|
else if (key_event->key() == Qt::Key::Key_Down &&
|
||||||
(key_event->modifiers() & Qt::KeyboardModifier::ControlModifier) == Qt::KeyboardModifier::ControlModifier) {
|
(key_event->modifiers() & Qt::KeyboardModifier::ControlModifier) ==
|
||||||
|
Qt::KeyboardModifier::ControlModifier) {
|
||||||
moveActionDown();
|
moveActionDown();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (key_event->key() == Qt::Key::Key_Up &&
|
else if (key_event->key() == Qt::Key::Key_Up &&
|
||||||
(key_event->modifiers() & Qt::KeyboardModifier::ControlModifier) == Qt::KeyboardModifier::ControlModifier) {
|
(key_event->modifiers() & Qt::KeyboardModifier::ControlModifier) ==
|
||||||
|
Qt::KeyboardModifier::ControlModifier) {
|
||||||
moveActionUp();
|
moveActionUp();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -161,7 +167,8 @@ void ToolBarEditor::updateActionsAvailability() {
|
|||||||
m_ui->m_btnMoveActionUp->setEnabled(m_ui->m_listActivatedActions->selectedItems().size() == 1 &&
|
m_ui->m_btnMoveActionUp->setEnabled(m_ui->m_listActivatedActions->selectedItems().size() == 1 &&
|
||||||
m_ui->m_listActivatedActions->currentRow() > 0);
|
m_ui->m_listActivatedActions->currentRow() > 0);
|
||||||
m_ui->m_btnMoveActionDown->setEnabled(m_ui->m_listActivatedActions->selectedItems().size() == 1 &&
|
m_ui->m_btnMoveActionDown->setEnabled(m_ui->m_listActivatedActions->selectedItems().size() == 1 &&
|
||||||
m_ui->m_listActivatedActions->currentRow() < m_ui->m_listActivatedActions->count() - 1);
|
m_ui->m_listActivatedActions->currentRow() <
|
||||||
|
m_ui->m_listActivatedActions->count() - 1);
|
||||||
m_ui->m_btnAddSelectedAction->setEnabled(m_ui->m_listAvailableActions->selectedItems().size() > 0);
|
m_ui->m_btnAddSelectedAction->setEnabled(m_ui->m_listAvailableActions->selectedItems().size() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,8 +229,8 @@ void ToolBarEditor::addSelectedAction() {
|
|||||||
if (items.size() == 1) {
|
if (items.size() == 1) {
|
||||||
QListWidgetItem* selected_item = items.at(0);
|
QListWidgetItem* selected_item = items.at(0);
|
||||||
|
|
||||||
m_ui->m_listActivatedActions->insertItem(
|
m_ui->m_listActivatedActions
|
||||||
m_ui->m_listActivatedActions->currentRow() + 1,
|
->insertItem(m_ui->m_listActivatedActions->currentRow() + 1,
|
||||||
m_ui->m_listAvailableActions->takeItem(m_ui->m_listAvailableActions->row(selected_item)));
|
m_ui->m_listAvailableActions->takeItem(m_ui->m_listAvailableActions->row(selected_item)));
|
||||||
m_ui->m_listActivatedActions->setCurrentRow(m_ui->m_listActivatedActions->currentRow() + 1);
|
m_ui->m_listActivatedActions->setCurrentRow(m_ui->m_listActivatedActions->currentRow() + 1);
|
||||||
emit setupChanged();
|
emit setupChanged();
|
||||||
@ -242,8 +249,8 @@ void ToolBarEditor::deleteSelectedAction() {
|
|||||||
updateActionsAvailability();
|
updateActionsAvailability();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_ui->m_listAvailableActions->insertItem(
|
m_ui->m_listAvailableActions
|
||||||
m_ui->m_listAvailableActions->currentRow() + 1,
|
->insertItem(m_ui->m_listAvailableActions->currentRow() + 1,
|
||||||
m_ui->m_listActivatedActions->takeItem(m_ui->m_listActivatedActions->row(selected_item)));
|
m_ui->m_listActivatedActions->takeItem(m_ui->m_listActivatedActions->row(selected_item)));
|
||||||
m_ui->m_listAvailableActions->sortItems(Qt::SortOrder::AscendingOrder);
|
m_ui->m_listAvailableActions->sortItems(Qt::SortOrder::AscendingOrder);
|
||||||
m_ui->m_listAvailableActions->setCurrentRow(m_ui->m_listAvailableActions->currentRow() + 1);
|
m_ui->m_listAvailableActions->setCurrentRow(m_ui->m_listAvailableActions->currentRow() + 1);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "gui/webbrowser.h"
|
#include "gui/webbrowser.h"
|
||||||
|
|
||||||
#include "database/databasequeries.h"
|
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/messagebox.h"
|
#include "gui/messagebox.h"
|
||||||
#include "gui/reusable/discoverfeedsbutton.h"
|
#include "gui/reusable/discoverfeedsbutton.h"
|
||||||
@ -15,7 +14,6 @@
|
|||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "network-web/readability.h"
|
#include "network-web/readability.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
|
||||||
|
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "gui/webbrowser.h"
|
#include "gui/webbrowser.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/externaltool.h"
|
#include "miscellaneous/externaltool.h"
|
||||||
|
@ -4,14 +4,12 @@
|
|||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/tabwidget.h"
|
|
||||||
#include "gui/webbrowser.h"
|
#include "gui/webbrowser.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/externaltool.h"
|
#include "miscellaneous/externaltool.h"
|
||||||
#include "miscellaneous/skinfactory.h"
|
#include "miscellaneous/skinfactory.h"
|
||||||
#include "network-web/adblock/adblockicon.h"
|
#include "network-web/adblock/adblockicon.h"
|
||||||
#include "network-web/adblock/adblockmanager.h"
|
#include "network-web/adblock/adblockmanager.h"
|
||||||
#include "network-web/networkfactory.h"
|
|
||||||
#include "network-web/webengine/webenginepage.h"
|
#include "network-web/webengine/webenginepage.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
|
|
||||||
|
@ -3,14 +3,21 @@
|
|||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
|
|
||||||
|
#if defined(SYSTEM_SQLITE3)
|
||||||
|
#include <sqlite3.h>
|
||||||
|
#else
|
||||||
#include "3rd-party/sqlite/sqlite3.h"
|
#include "3rd-party/sqlite/sqlite3.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "3rd-party/sqlite/sqlite3.h"
|
||||||
|
|
||||||
|
#include "core/feedsmodel.h"
|
||||||
#include "dynamic-shortcuts/dynamicshortcuts.h"
|
#include "dynamic-shortcuts/dynamicshortcuts.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/dialogs/formabout.h"
|
#include "gui/dialogs/formabout.h"
|
||||||
#include "gui/dialogs/formlog.h"
|
#include "gui/dialogs/formlog.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "gui/feedmessageviewer.h"
|
|
||||||
#include "gui/feedsview.h"
|
|
||||||
#include "gui/messagebox.h"
|
#include "gui/messagebox.h"
|
||||||
#include "gui/toolbars/statusbar.h"
|
#include "gui/toolbars/statusbar.h"
|
||||||
#include "gui/webviewers/qtextbrowser/textbrowserviewer.h"
|
#include "gui/webviewers/qtextbrowser/textbrowserviewer.h"
|
||||||
@ -23,10 +30,6 @@
|
|||||||
#include "network-web/adblock/adblockmanager.h"
|
#include "network-web/adblock/adblockmanager.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
#include "services/owncloud/owncloudserviceentrypoint.h"
|
|
||||||
#include "services/standard/standardserviceentrypoint.h"
|
|
||||||
#include "services/standard/standardserviceroot.h"
|
|
||||||
#include "services/tt-rss/ttrssserviceentrypoint.h"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
#include "miscellaneous/autosaver.h"
|
#include "miscellaneous/autosaver.h"
|
||||||
|
|
||||||
|
#include "definitions/definitions.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
|
||||||
|
|
||||||
AutoSaver::AutoSaver(QObject* parent, const QString& saving_slot, int max_wait_secs, int periodic_save_secs)
|
AutoSaver::AutoSaver(QObject* parent, const QString& saving_slot, int max_wait_secs, int periodic_save_secs)
|
||||||
: QObject(parent), m_savingSlot(saving_slot), m_maxWaitMsecs(max_wait_secs * 1000),
|
: QObject(parent), m_maxWaitMsecs(max_wait_secs * 1000), m_periodicSaveMsecs(periodic_save_secs * 1000),
|
||||||
m_periodicSaveMsecs(periodic_save_secs * 1000) {
|
m_savingSlot(saving_slot) {
|
||||||
Q_ASSERT(parent);
|
Q_ASSERT(parent);
|
||||||
|
|
||||||
connect(&m_timer, &QTimer::timeout, this, &AutoSaver::saveIfNeccessary);
|
connect(&m_timer, &QTimer::timeout, this, &AutoSaver::saveIfNeccessary);
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/applicationexception.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
|
|
||||||
@ -58,7 +57,8 @@ void NotificationFactory::save(const QList<Notification>& new_notifications, Set
|
|||||||
for (const auto& n : qAsConst(m_notifications)) {
|
for (const auto& n : qAsConst(m_notifications)) {
|
||||||
settings->setValue(GROUP(Notifications),
|
settings->setValue(GROUP(Notifications),
|
||||||
QString::number(int(n.event())),
|
QString::number(int(n.event())),
|
||||||
QStringList{
|
QStringList{n.balloonEnabled() ? QSL("1") : QSL("0"),
|
||||||
n.balloonEnabled() ? QSL("1") : QSL("0"), n.soundPath(), QString::number(n.volume())});
|
n.soundPath(),
|
||||||
|
QString::number(n.volume())});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iofactory.h"
|
#include "miscellaneous/iofactory.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#include "miscellaneous/singleapplication.h"
|
#include "miscellaneous/singleapplication.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
|
||||||
|
|
||||||
#include <QDataStream>
|
#include <QDataStream>
|
||||||
#include <QLocalServer>
|
#include <QLocalServer>
|
||||||
#include <QLocalSocket>
|
#include <QLocalSocket>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "miscellaneous/skinfactory.h"
|
#include "miscellaneous/skinfactory.h"
|
||||||
|
|
||||||
#include "exceptions/ioexception.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "services/abstract/rootitem.h"
|
#include "services/abstract/rootitem.h"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "gui/dialogs/formupdate.h"
|
#include "gui/dialogs/formupdate.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/systemfactory.h"
|
#include "miscellaneous/systemfactory.h"
|
||||||
#include "network-web/networkfactory.h"
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
AdblockRequestInfo::AdblockRequestInfo(const QWebEngineUrlRequestInfo& webengine_info) {
|
AdblockRequestInfo::AdblockRequestInfo(const QWebEngineUrlRequestInfo& webengine_info) {
|
||||||
initialize(webengine_info);
|
initialize(webengine_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AdblockRequestInfo::AdblockRequestInfo(const QUrl& url) {
|
AdblockRequestInfo::AdblockRequestInfo(const QUrl& url) {
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "network-web/basenetworkaccessmanager.h"
|
#include "network-web/basenetworkaccessmanager.h"
|
||||||
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/textfactory.h"
|
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
|
|
||||||
#include <QNetworkProxy>
|
#include <QNetworkProxy>
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
#include "network-web/cookiejar.h"
|
#include "network-web/cookiejar.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iofactory.h"
|
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "network-web/downloader.h"
|
#include "network-web/downloader.h"
|
||||||
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iofactory.h"
|
|
||||||
#include "network-web/cookiejar.h"
|
#include "network-web/cookiejar.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "network-web/silentnetworkaccessmanager.h"
|
#include "network-web/silentnetworkaccessmanager.h"
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/settings.h"
|
|
||||||
#include "network-web/downloader.h"
|
#include "network-web/downloader.h"
|
||||||
#include "network-web/silentnetworkaccessmanager.h"
|
|
||||||
|
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "network-web/oauthhttphandler.h"
|
#include "network-web/oauthhttphandler.h"
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@ -68,13 +67,11 @@ void Readability::onPackageError(const QList<NodeJs::PackageMetadata>& pkgs, con
|
|||||||
void Readability::makeHtmlReadable(const QString& html, const QString& base_url) {
|
void Readability::makeHtmlReadable(const QString& html, const QString& base_url) {
|
||||||
if (!m_modulesInstalled) {
|
if (!m_modulesInstalled) {
|
||||||
try {
|
try {
|
||||||
NodeJs::PackageStatus stReadability = qApp->nodejs()->packageStatus({ QSL(READABILITY_PACKAGE),
|
NodeJs::PackageStatus stReadability =
|
||||||
QSL(READABILITY_VERSION) });
|
qApp->nodejs()->packageStatus({QSL(READABILITY_PACKAGE), QSL(READABILITY_VERSION)});
|
||||||
NodeJs::PackageStatus stJsdom = qApp->nodejs()->packageStatus({ QSL(JSDOM_PACKAGE),
|
NodeJs::PackageStatus stJsdom = qApp->nodejs()->packageStatus({QSL(JSDOM_PACKAGE), QSL(JSDOM_VERSION)});
|
||||||
QSL(JSDOM_VERSION) });
|
|
||||||
|
|
||||||
if (stReadability != NodeJs::PackageStatus::UpToDate ||
|
if (stReadability != NodeJs::PackageStatus::UpToDate || stJsdom != NodeJs::PackageStatus::UpToDate) {
|
||||||
stJsdom != NodeJs::PackageStatus::UpToDate) {
|
|
||||||
if (!m_modulesInstalling) {
|
if (!m_modulesInstalling) {
|
||||||
// We make sure to update modules.
|
// We make sure to update modules.
|
||||||
m_modulesInstalling = true;
|
m_modulesInstalling = true;
|
||||||
@ -82,7 +79,8 @@ void Readability::makeHtmlReadable(const QString& html, const QString& base_url)
|
|||||||
qApp->showGuiMessage(Notification::Event::NodePackageUpdated,
|
qApp->showGuiMessage(Notification::Event::NodePackageUpdated,
|
||||||
{tr("Node.js libraries not installed"),
|
{tr("Node.js libraries not installed"),
|
||||||
tr("%1 will now install some needed libraries, this will take only a few seconds. "
|
tr("%1 will now install some needed libraries, this will take only a few seconds. "
|
||||||
"You will be notified when installation is complete.").arg(QSL(APP_NAME)),
|
"You will be notified when installation is complete.")
|
||||||
|
.arg(QSL(APP_NAME)),
|
||||||
QSystemTrayIcon::MessageIcon::Warning},
|
QSystemTrayIcon::MessageIcon::Warning},
|
||||||
{true, true, false});
|
{true, true, false});
|
||||||
qApp->nodejs()->installPackages({{QSL(READABILITY_PACKAGE), QSL(READABILITY_VERSION)},
|
qApp->nodejs()->installPackages({{QSL(READABILITY_PACKAGE), QSL(READABILITY_VERSION)},
|
||||||
@ -110,9 +108,9 @@ void Readability::makeHtmlReadable(const QString& html, const QString& base_url)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString temp_script = QDir::toNativeSeparators(IOFactory::getSystemFolder(QStandardPaths::StandardLocation::TempLocation)) +
|
QString temp_script =
|
||||||
QDir::separator() +
|
QDir::toNativeSeparators(IOFactory::getSystemFolder(QStandardPaths::StandardLocation::TempLocation)) +
|
||||||
QSL("readabilize-article.js");
|
QDir::separator() + QSL("readabilize-article.js");
|
||||||
|
|
||||||
if (!IOFactory::copyFile(QSL(":/scripts/readability/readabilize-article.js"), temp_script)) {
|
if (!IOFactory::copyFile(QSL(":/scripts/readability/readabilize-article.js"), temp_script)) {
|
||||||
qWarningNN << LOGSEC_ADBLOCK << "Failed to copy Readability script to TEMP.";
|
qWarningNN << LOGSEC_ADBLOCK << "Failed to copy Readability script to TEMP.";
|
||||||
@ -120,11 +118,12 @@ void Readability::makeHtmlReadable(const QString& html, const QString& base_url)
|
|||||||
|
|
||||||
QProcess* proc = new QProcess(this);
|
QProcess* proc = new QProcess(this);
|
||||||
|
|
||||||
connect(proc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &Readability::onReadabilityFinished);
|
connect(proc,
|
||||||
|
QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||||
|
this,
|
||||||
|
&Readability::onReadabilityFinished);
|
||||||
|
|
||||||
qApp->nodejs()->runScript(proc,
|
qApp->nodejs()->runScript(proc, temp_script, {base_url});
|
||||||
temp_script,
|
|
||||||
{ base_url });
|
|
||||||
|
|
||||||
proc->write(html.toUtf8());
|
proc->write(html.toUtf8());
|
||||||
proc->closeWriteChannel();
|
proc->closeWriteChannel();
|
||||||
@ -133,8 +132,7 @@ void Readability::makeHtmlReadable(const QString& html, const QString& base_url)
|
|||||||
void Readability::onReadabilityFinished(int exit_code, QProcess::ExitStatus exit_status) {
|
void Readability::onReadabilityFinished(int exit_code, QProcess::ExitStatus exit_status) {
|
||||||
QProcess* proc = qobject_cast<QProcess*>(sender());
|
QProcess* proc = qobject_cast<QProcess*>(sender());
|
||||||
|
|
||||||
if (exit_status == QProcess::ExitStatus::NormalExit &&
|
if (exit_status == QProcess::ExitStatus::NormalExit && exit_code == EXIT_SUCCESS) {
|
||||||
exit_code == EXIT_SUCCESS) {
|
|
||||||
emit htmlReadabled(QString::fromUtf8(proc->readAllStandardOutput()));
|
emit htmlReadabled(QString::fromUtf8(proc->readAllStandardOutput()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2,15 +2,17 @@
|
|||||||
|
|
||||||
#include "network-web/silentnetworkaccessmanager.h"
|
#include "network-web/silentnetworkaccessmanager.h"
|
||||||
|
|
||||||
#include "miscellaneous/application.h"
|
#include "definitions/definitions.h"
|
||||||
|
|
||||||
#include <QAuthenticator>
|
#include <QAuthenticator>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
|
||||||
SilentNetworkAccessManager::SilentNetworkAccessManager(QObject* parent)
|
SilentNetworkAccessManager::SilentNetworkAccessManager(QObject* parent) : BaseNetworkAccessManager(parent) {
|
||||||
: BaseNetworkAccessManager(parent) {
|
connect(this,
|
||||||
connect(this, &SilentNetworkAccessManager::authenticationRequired,
|
&SilentNetworkAccessManager::authenticationRequired,
|
||||||
this, &SilentNetworkAccessManager::onAuthenticationRequired, Qt::DirectConnection);
|
this,
|
||||||
|
&SilentNetworkAccessManager::onAuthenticationRequired,
|
||||||
|
Qt::DirectConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
SilentNetworkAccessManager::~SilentNetworkAccessManager() {
|
SilentNetworkAccessManager::~SilentNetworkAccessManager() {
|
||||||
@ -23,18 +25,14 @@ void SilentNetworkAccessManager::onAuthenticationRequired(QNetworkReply* reply,
|
|||||||
authenticator->setUser(reply->property("username").toString());
|
authenticator->setUser(reply->property("username").toString());
|
||||||
authenticator->setPassword(reply->property("password").toString());
|
authenticator->setPassword(reply->property("password").toString());
|
||||||
reply->setProperty("authentication-given", true);
|
reply->setProperty("authentication-given", true);
|
||||||
qDebugNN << LOGSEC_NETWORK
|
qDebugNN << LOGSEC_NETWORK << "URL" << QUOTE_W_SPACE(reply->url().toString())
|
||||||
<< "URL"
|
|
||||||
<< QUOTE_W_SPACE(reply->url().toString())
|
|
||||||
<< "requested authentication and got it.";
|
<< "requested authentication and got it.";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
reply->setProperty("authentication-given", false);
|
reply->setProperty("authentication-given", false);
|
||||||
|
|
||||||
// Authentication is required but this item does not contain it.
|
// Authentication is required but this item does not contain it.
|
||||||
qWarningNN << LOGSEC_NETWORK
|
qWarningNN << LOGSEC_NETWORK << "Item" << QUOTE_W_SPACE(reply->url().toString())
|
||||||
<< "Item"
|
|
||||||
<< QUOTE_W_SPACE(reply->url().toString())
|
|
||||||
<< "requested authentication but username/password is not available.";
|
<< "requested authentication but username/password is not available.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
#include "network-web/adblock/adblockmanager.h"
|
#include "network-web/adblock/adblockmanager.h"
|
||||||
#include "network-web/adblock/adblockrequestinfo.h"
|
#include "network-web/adblock/adblockrequestinfo.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/abstract/rootitem.h"
|
|
||||||
#include "services/abstract/serviceroot.h"
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include "gui/messagebox.h"
|
#include "gui/messagebox.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/adblock/adblockicon.h"
|
|
||||||
#include "network-web/adblock/adblockmanager.h"
|
#include "network-web/adblock/adblockmanager.h"
|
||||||
#include "network-web/cookiejar.h"
|
#include "network-web/cookiejar.h"
|
||||||
#include "network-web/readability.h"
|
#include "network-web/readability.h"
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
#include "services/abstract/cacheforserviceroot.h"
|
#include "services/abstract/cacheforserviceroot.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/mutex.h"
|
|
||||||
#include "services/abstract/label.h"
|
#include "services/abstract/label.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
|
||||||
#include "services/abstract/cacheforserviceroot.h"
|
#include "services/abstract/cacheforserviceroot.h"
|
||||||
#include "services/abstract/feed.h"
|
#include "services/abstract/feed.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
|
@ -7,16 +7,10 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/feedreader.h"
|
#include "miscellaneous/feedreader.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "miscellaneous/mutex.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "services/abstract/cacheforserviceroot.h"
|
#include "services/abstract/cacheforserviceroot.h"
|
||||||
#include "services/abstract/gui/formfeeddetails.h"
|
#include "services/abstract/gui/formfeeddetails.h"
|
||||||
#include "services/abstract/importantnode.h"
|
|
||||||
#include "services/abstract/labelsnode.h"
|
|
||||||
#include "services/abstract/recyclebin.h"
|
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
#include "services/abstract/unreadnode.h"
|
|
||||||
|
|
||||||
Feed::Feed(RootItem* parent)
|
Feed::Feed(RootItem* parent)
|
||||||
: RootItem(parent), m_source(QString()), m_status(Status::Normal), m_statusString(QString()),
|
: RootItem(parent), m_source(QString()), m_status(Status::Normal), m_statusString(QString()),
|
||||||
|
@ -3,15 +3,11 @@
|
|||||||
#include "services/abstract/gui/formcategorydetails.h"
|
#include "services/abstract/gui/formcategorydetails.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
#include "core/feedsmodel.h"
|
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/feedsview.h"
|
|
||||||
#include "gui/guiutilities.h"
|
#include "gui/guiutilities.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "gui/reusable/baselineedit.h"
|
#include "gui/reusable/baselineedit.h"
|
||||||
#include "gui/systemtrayicon.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "services/abstract/category.h"
|
#include "services/abstract/category.h"
|
||||||
#include "services/abstract/rootitem.h"
|
#include "services/abstract/rootitem.h"
|
||||||
|
@ -2,21 +2,13 @@
|
|||||||
|
|
||||||
#include "services/abstract/gui/formfeeddetails.h"
|
#include "services/abstract/gui/formfeeddetails.h"
|
||||||
|
|
||||||
#include "core/feedsmodel.h"
|
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/guiutilities.h"
|
#include "gui/guiutilities.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "gui/reusable/baselineedit.h"
|
|
||||||
#include "gui/systemtrayicon.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "network-web/networkfactory.h"
|
|
||||||
#include "services/abstract/category.h"
|
|
||||||
#include "services/abstract/rootitem.h"
|
#include "services/abstract/rootitem.h"
|
||||||
#include "services/standard/standardfeed.h"
|
|
||||||
#include "services/standard/standardserviceroot.h"
|
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "services/abstract/cacheforserviceroot.h"
|
#include "services/abstract/cacheforserviceroot.h"
|
||||||
#include "services/abstract/gui/formaddeditlabel.h"
|
#include "services/abstract/gui/formaddeditlabel.h"
|
||||||
#include "services/abstract/labelsnode.h"
|
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "gui/messagebox.h"
|
#include "gui/messagebox.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/textfactory.h"
|
|
||||||
#include "services/abstract/cacheforserviceroot.h"
|
#include "services/abstract/cacheforserviceroot.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "services/abstract/category.h"
|
#include "services/abstract/category.h"
|
||||||
#include "services/abstract/feed.h"
|
#include "services/abstract/feed.h"
|
||||||
#include "services/abstract/label.h"
|
#include "services/abstract/label.h"
|
||||||
#include "services/abstract/recyclebin.h"
|
|
||||||
#include "services/abstract/search.h"
|
#include "services/abstract/search.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "services/abstract/cacheforserviceroot.h"
|
#include "services/abstract/cacheforserviceroot.h"
|
||||||
#include "services/abstract/gui/formaddeditprobe.h"
|
#include "services/abstract/gui/formaddeditprobe.h"
|
||||||
#include "services/abstract/labelsnode.h"
|
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
#include "core/feedsmodel.h"
|
|
||||||
#include "core/messagesmodel.h"
|
#include "core/messagesmodel.h"
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "services/feedly/definitions.h"
|
|
||||||
#include "services/feedly/feedlyserviceroot.h"
|
#include "services/feedly/feedlyserviceroot.h"
|
||||||
#include "services/feedly/gui/formeditfeedlyaccount.h"
|
#include "services/feedly/gui/formeditfeedlyaccount.h"
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "services/feedly/feedlynetwork.h"
|
#include "services/feedly/feedlynetwork.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
#include "database/databasequeries.h"
|
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
|
@ -8,12 +8,8 @@
|
|||||||
#include "exceptions/feedfetchexception.h"
|
#include "exceptions/feedfetchexception.h"
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "miscellaneous/mutex.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "services/abstract/importantnode.h"
|
|
||||||
#include "services/abstract/labelsnode.h"
|
#include "services/abstract/labelsnode.h"
|
||||||
#include "services/abstract/recyclebin.h"
|
|
||||||
#include "services/feedly/definitions.h"
|
#include "services/feedly/definitions.h"
|
||||||
#include "services/feedly/feedlyentrypoint.h"
|
#include "services/feedly/feedlyentrypoint.h"
|
||||||
#include "services/feedly/feedlynetwork.h"
|
#include "services/feedly/feedlynetwork.h"
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/systemfactory.h"
|
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/feedly/definitions.h"
|
#include "services/feedly/definitions.h"
|
||||||
#include "services/feedly/feedlynetwork.h"
|
#include "services/feedly/feedlynetwork.h"
|
||||||
@ -33,13 +31,15 @@ FeedlyAccountDetails::FeedlyAccountDetails(QWidget* parent) : QWidget(parent), m
|
|||||||
|
|
||||||
#if defined(FEEDLY_OFFICIAL_SUPPORT)
|
#if defined(FEEDLY_OFFICIAL_SUPPORT)
|
||||||
m_ui.m_lblInfo->setHelpText(tr("Your %1 build has official Feedly support. You do not have to use \"developer access "
|
m_ui.m_lblInfo->setHelpText(tr("Your %1 build has official Feedly support. You do not have to use \"developer access "
|
||||||
"token\". You can therefore leave corresponding field empty.").arg(QSL(APP_NAME)),
|
"token\". You can therefore leave corresponding field empty.")
|
||||||
|
.arg(QSL(APP_NAME)),
|
||||||
false);
|
false);
|
||||||
#else
|
#else
|
||||||
m_ui.m_lblInfo->setHelpText(tr("Your %1 does not offer official Feedly support, thus you must "
|
m_ui.m_lblInfo->setHelpText(tr("Your %1 does not offer official Feedly support, thus you must "
|
||||||
"authorize via special authorization code called \"developer access token\". "
|
"authorize via special authorization code called \"developer access token\". "
|
||||||
"These tokens are usually valid only for 1 month and allow only 250 API calls "
|
"These tokens are usually valid only for 1 month and allow only 250 API calls "
|
||||||
"each day.").arg(QSL(APP_NAME)),
|
"each day.")
|
||||||
|
.arg(QSL(APP_NAME)),
|
||||||
true);
|
true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -57,8 +57,10 @@ FeedlyAccountDetails::FeedlyAccountDetails(QWidget* parent) : QWidget(parent), m
|
|||||||
|
|
||||||
connect(m_ui.m_btnGetToken, &QPushButton::clicked, this, &FeedlyAccountDetails::getDeveloperAccessToken);
|
connect(m_ui.m_btnGetToken, &QPushButton::clicked, this, &FeedlyAccountDetails::getDeveloperAccessToken);
|
||||||
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FeedlyAccountDetails::onUsernameChanged);
|
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FeedlyAccountDetails::onUsernameChanged);
|
||||||
connect(m_ui.m_txtDeveloperAccessToken->lineEdit(), &BaseLineEdit::textChanged,
|
connect(m_ui.m_txtDeveloperAccessToken->lineEdit(),
|
||||||
this, &FeedlyAccountDetails::onDeveloperAccessTokenChanged);
|
&BaseLineEdit::textChanged,
|
||||||
|
this,
|
||||||
|
&FeedlyAccountDetails::onDeveloperAccessTokenChanged);
|
||||||
|
|
||||||
setTabOrder(m_ui.m_txtUsername->lineEdit(), m_ui.m_btnGetToken);
|
setTabOrder(m_ui.m_txtUsername->lineEdit(), m_ui.m_btnGetToken);
|
||||||
setTabOrder(m_ui.m_btnGetToken, m_ui.m_txtDeveloperAccessToken->lineEdit());
|
setTabOrder(m_ui.m_btnGetToken, m_ui.m_txtDeveloperAccessToken->lineEdit());
|
||||||
@ -115,9 +117,7 @@ void FeedlyAccountDetails::onAuthGranted() {
|
|||||||
tr("Your access was approved."));
|
tr("Your access was approved."));
|
||||||
}
|
}
|
||||||
catch (const ApplicationException& ex) {
|
catch (const ApplicationException& ex) {
|
||||||
qCriticalNN << LOGSEC_FEEDLY
|
qCriticalNN << LOGSEC_FEEDLY << "Failed to obtain profile with error:" << QUOTE_W_SPACE_DOT(ex.message());
|
||||||
<< "Failed to obtain profile with error:"
|
|
||||||
<< QUOTE_W_SPACE_DOT(ex.message());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
#include "services/feedly/gui/formeditfeedlyaccount.h"
|
#include "services/feedly/gui/formeditfeedlyaccount.h"
|
||||||
|
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/networkfactory.h"
|
|
||||||
#include "services/feedly/definitions.h"
|
|
||||||
#include "services/feedly/feedlynetwork.h"
|
#include "services/feedly/feedlynetwork.h"
|
||||||
#include "services/feedly/feedlyserviceroot.h"
|
#include "services/feedly/feedlyserviceroot.h"
|
||||||
#include "services/feedly/gui/feedlyaccountdetails.h"
|
#include "services/feedly/gui/feedlyaccountdetails.h"
|
||||||
@ -34,9 +31,12 @@ void FormEditFeedlyAccount::apply() {
|
|||||||
m_details->m_ui.m_txtUsername->lineEdit()->text() != account<FeedlyServiceRoot>()->network()->username();
|
m_details->m_ui.m_txtUsername->lineEdit()->text() != account<FeedlyServiceRoot>()->network()->username();
|
||||||
|
|
||||||
account<FeedlyServiceRoot>()->network()->setUsername(m_details->m_ui.m_txtUsername->lineEdit()->text());
|
account<FeedlyServiceRoot>()->network()->setUsername(m_details->m_ui.m_txtUsername->lineEdit()->text());
|
||||||
account<FeedlyServiceRoot>()->network()->setDownloadOnlyUnreadMessages(m_details->m_ui.m_checkDownloadOnlyUnreadMessages->isChecked());
|
account<FeedlyServiceRoot>()
|
||||||
|
->network()
|
||||||
|
->setDownloadOnlyUnreadMessages(m_details->m_ui.m_checkDownloadOnlyUnreadMessages->isChecked());
|
||||||
account<FeedlyServiceRoot>()->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value());
|
account<FeedlyServiceRoot>()->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value());
|
||||||
account<FeedlyServiceRoot>()->network()->setDeveloperAccessToken(m_details->m_ui.m_txtDeveloperAccessToken->lineEdit()->text());
|
account<FeedlyServiceRoot>()->network()->setDeveloperAccessToken(m_details->m_ui.m_txtDeveloperAccessToken->lineEdit()
|
||||||
|
->text());
|
||||||
account<FeedlyServiceRoot>()->network()->setIntelligentSynchronization(m_details->m_ui.m_cbNewAlgorithm->isChecked());
|
account<FeedlyServiceRoot>()->network()->setIntelligentSynchronization(m_details->m_ui.m_cbNewAlgorithm->isChecked());
|
||||||
|
|
||||||
account<FeedlyServiceRoot>()->saveAccountDataToDatabase();
|
account<FeedlyServiceRoot>()->saveAccountDataToDatabase();
|
||||||
@ -60,8 +60,10 @@ void FormEditFeedlyAccount::loadAccountData() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_details->m_ui.m_txtUsername->lineEdit()->setText(account<FeedlyServiceRoot>()->network()->username());
|
m_details->m_ui.m_txtUsername->lineEdit()->setText(account<FeedlyServiceRoot>()->network()->username());
|
||||||
m_details->m_ui.m_txtDeveloperAccessToken->lineEdit()->setText(account<FeedlyServiceRoot>()->network()->developerAccessToken());
|
m_details->m_ui.m_txtDeveloperAccessToken->lineEdit()
|
||||||
m_details->m_ui.m_checkDownloadOnlyUnreadMessages->setChecked(account<FeedlyServiceRoot>()->network()->downloadOnlyUnreadMessages());
|
->setText(account<FeedlyServiceRoot>()->network()->developerAccessToken());
|
||||||
|
m_details->m_ui.m_checkDownloadOnlyUnreadMessages
|
||||||
|
->setChecked(account<FeedlyServiceRoot>()->network()->downloadOnlyUnreadMessages());
|
||||||
m_details->m_ui.m_spinLimitMessages->setValue(account<FeedlyServiceRoot>()->network()->batchSize());
|
m_details->m_ui.m_spinLimitMessages->setValue(account<FeedlyServiceRoot>()->network()->batchSize());
|
||||||
m_details->m_ui.m_cbNewAlgorithm->setChecked(account<FeedlyServiceRoot>()->network()->intelligentSynchronization());
|
m_details->m_ui.m_cbNewAlgorithm->setChecked(account<FeedlyServiceRoot>()->network()->intelligentSynchronization());
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "services/gmail/definitions.h"
|
|
||||||
#include "services/gmail/gmailserviceroot.h"
|
#include "services/gmail/gmailserviceroot.h"
|
||||||
#include "services/gmail/gui/formeditgmailaccount.h"
|
#include "services/gmail/gui/formeditgmailaccount.h"
|
||||||
|
|
||||||
|
@ -7,15 +7,10 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
|
||||||
#include "gui/tabwidget.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "network-web/silentnetworkaccessmanager.h"
|
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/abstract/category.h"
|
|
||||||
#include "services/abstract/labelsnode.h"
|
#include "services/abstract/labelsnode.h"
|
||||||
#include "services/gmail/definitions.h"
|
#include "services/gmail/definitions.h"
|
||||||
#include "services/gmail/gmailserviceroot.h"
|
#include "services/gmail/gmailserviceroot.h"
|
||||||
|
@ -7,9 +7,7 @@
|
|||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "services/abstract/importantnode.h"
|
|
||||||
#include "services/abstract/labelsnode.h"
|
#include "services/abstract/labelsnode.h"
|
||||||
#include "services/abstract/recyclebin.h"
|
|
||||||
#include "services/gmail/definitions.h"
|
#include "services/gmail/definitions.h"
|
||||||
#include "services/gmail/gmailentrypoint.h"
|
#include "services/gmail/gmailentrypoint.h"
|
||||||
#include "services/gmail/gmailnetworkfactory.h"
|
#include "services/gmail/gmailnetworkfactory.h"
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "gui/messagebox.h"
|
#include "gui/messagebox.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
|
||||||
#include "services/gmail/definitions.h"
|
#include "services/gmail/definitions.h"
|
||||||
#include "services/gmail/gmailnetworkfactory.h"
|
#include "services/gmail/gmailnetworkfactory.h"
|
||||||
#include "services/gmail/gmailserviceroot.h"
|
#include "services/gmail/gmailserviceroot.h"
|
||||||
|
@ -2,12 +2,9 @@
|
|||||||
|
|
||||||
#include "services/gmail/gui/formeditgmailaccount.h"
|
#include "services/gmail/gui/formeditgmailaccount.h"
|
||||||
|
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/gmail/definitions.h"
|
|
||||||
#include "services/gmail/gmailserviceroot.h"
|
#include "services/gmail/gmailserviceroot.h"
|
||||||
#include "services/gmail/gui/gmailaccountdetails.h"
|
#include "services/gmail/gui/gmailaccountdetails.h"
|
||||||
|
|
||||||
@ -37,7 +34,8 @@ void FormEditGmailAccount::apply() {
|
|||||||
|
|
||||||
account<GmailServiceRoot>()->network()->setUsername(m_details->m_ui.m_txtUsername->lineEdit()->text());
|
account<GmailServiceRoot>()->network()->setUsername(m_details->m_ui.m_txtUsername->lineEdit()->text());
|
||||||
account<GmailServiceRoot>()->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value());
|
account<GmailServiceRoot>()->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value());
|
||||||
account<GmailServiceRoot>()->network()->setDownloadOnlyUnreadMessages(m_details->m_ui.m_cbDownloadOnlyUnreadMessages->isChecked());
|
account<GmailServiceRoot>()->network()->setDownloadOnlyUnreadMessages(m_details->m_ui.m_cbDownloadOnlyUnreadMessages
|
||||||
|
->isChecked());
|
||||||
|
|
||||||
account<GmailServiceRoot>()->saveAccountDataToDatabase();
|
account<GmailServiceRoot>()->saveAccountDataToDatabase();
|
||||||
accept();
|
accept();
|
||||||
@ -64,5 +62,6 @@ void FormEditGmailAccount::loadAccountData() {
|
|||||||
|
|
||||||
m_details->m_ui.m_txtUsername->lineEdit()->setText(account<GmailServiceRoot>()->network()->username());
|
m_details->m_ui.m_txtUsername->lineEdit()->setText(account<GmailServiceRoot>()->network()->username());
|
||||||
m_details->m_ui.m_spinLimitMessages->setValue(account<GmailServiceRoot>()->network()->batchSize());
|
m_details->m_ui.m_spinLimitMessages->setValue(account<GmailServiceRoot>()->network()->batchSize());
|
||||||
m_details->m_ui.m_cbDownloadOnlyUnreadMessages->setChecked(account<GmailServiceRoot>()->network()->downloadOnlyUnreadMessages());
|
m_details->m_ui.m_cbDownloadOnlyUnreadMessages
|
||||||
|
->setChecked(account<GmailServiceRoot>()->network()->downloadOnlyUnreadMessages());
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,13 @@
|
|||||||
#include "services/gmail/gui/gmailaccountdetails.h"
|
#include "services/gmail/gui/gmailaccountdetails.h"
|
||||||
|
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/gmail/definitions.h"
|
#include "services/gmail/definitions.h"
|
||||||
#include "services/gmail/gmailnetworkfactory.h"
|
#include "services/gmail/gmailnetworkfactory.h"
|
||||||
|
|
||||||
GmailAccountDetails::GmailAccountDetails(QWidget* parent)
|
GmailAccountDetails::GmailAccountDetails(QWidget* parent) : QWidget(parent), m_oauth(nullptr), m_lastProxy({}) {
|
||||||
: QWidget(parent), m_oauth(nullptr), m_lastProxy({}) {
|
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
#if defined(GMAIL_OFFICIAL_SUPPORT)
|
#if defined(GMAIL_OFFICIAL_SUPPORT)
|
||||||
@ -100,9 +98,7 @@ void GmailAccountDetails::onAuthGranted() {
|
|||||||
m_ui.m_txtUsername->lineEdit()->setText(resp[QSL("emailAddress")].toString());
|
m_ui.m_txtUsername->lineEdit()->setText(resp[QSL("emailAddress")].toString());
|
||||||
}
|
}
|
||||||
catch (const ApplicationException& ex) {
|
catch (const ApplicationException& ex) {
|
||||||
qCriticalNN << LOGSEC_GMAIL
|
qCriticalNN << LOGSEC_GMAIL << "Failed to obtain profile with error:" << QUOTE_W_SPACE_DOT(ex.message());
|
||||||
<< "Failed to obtain profile with error:"
|
|
||||||
<< QUOTE_W_SPACE_DOT(ex.message());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "services/greader/definitions.h"
|
|
||||||
#include "services/greader/greaderserviceroot.h"
|
#include "services/greader/greaderserviceroot.h"
|
||||||
#include "services/greader/gui/formeditgreaderaccount.h"
|
#include "services/greader/gui/formeditgreaderaccount.h"
|
||||||
|
|
||||||
|
@ -4,14 +4,10 @@
|
|||||||
|
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/feedfetchexception.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/mutex.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "services/abstract/importantnode.h"
|
|
||||||
#include "services/abstract/recyclebin.h"
|
|
||||||
#include "services/greader/definitions.h"
|
#include "services/greader/definitions.h"
|
||||||
#include "services/greader/greaderentrypoint.h"
|
#include "services/greader/greaderentrypoint.h"
|
||||||
#include "services/greader/greadernetwork.h"
|
#include "services/greader/greadernetwork.h"
|
||||||
|
@ -2,11 +2,8 @@
|
|||||||
|
|
||||||
#include "services/greader/gui/formeditgreaderaccount.h"
|
#include "services/greader/gui/formeditgreaderaccount.h"
|
||||||
|
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/networkfactory.h"
|
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "services/greader/definitions.h"
|
|
||||||
#include "services/greader/greadernetwork.h"
|
#include "services/greader/greadernetwork.h"
|
||||||
#include "services/greader/greaderserviceroot.h"
|
#include "services/greader/greaderserviceroot.h"
|
||||||
#include "services/greader/gui/greaderaccountdetails.h"
|
#include "services/greader/gui/greaderaccountdetails.h"
|
||||||
@ -25,8 +22,7 @@ void FormEditGreaderAccount::apply() {
|
|||||||
FormAccountDetails::apply();
|
FormAccountDetails::apply();
|
||||||
|
|
||||||
GreaderServiceRoot* existing_root = account<GreaderServiceRoot>();
|
GreaderServiceRoot* existing_root = account<GreaderServiceRoot>();
|
||||||
bool using_another_acc =
|
bool using_another_acc = m_details->m_ui.m_txtUsername->lineEdit()->text() != existing_root->network()->username() ||
|
||||||
m_details->m_ui.m_txtUsername->lineEdit()->text() != existing_root->network()->username() ||
|
|
||||||
m_details->service() != existing_root->network()->service() ||
|
m_details->service() != existing_root->network()->service() ||
|
||||||
m_details->m_ui.m_txtUrl->lineEdit()->text() != existing_root->network()->baseUrl();
|
m_details->m_ui.m_txtUrl->lineEdit()->text() != existing_root->network()->baseUrl();
|
||||||
|
|
||||||
@ -44,8 +40,7 @@ void FormEditGreaderAccount::apply() {
|
|||||||
if (existing_root->network()->service() == GreaderServiceRoot::Service::Inoreader) {
|
if (existing_root->network()->service() == GreaderServiceRoot::Service::Inoreader) {
|
||||||
existing_root->network()->oauth()->setClientId(m_details->m_ui.m_txtAppId->lineEdit()->text());
|
existing_root->network()->oauth()->setClientId(m_details->m_ui.m_txtAppId->lineEdit()->text());
|
||||||
existing_root->network()->oauth()->setClientSecret(m_details->m_ui.m_txtAppKey->lineEdit()->text());
|
existing_root->network()->oauth()->setClientSecret(m_details->m_ui.m_txtAppKey->lineEdit()->text());
|
||||||
existing_root->network()->oauth()->setRedirectUrl(m_details->m_ui.m_txtRedirectUrl->lineEdit()->text(),
|
existing_root->network()->oauth()->setRedirectUrl(m_details->m_ui.m_txtRedirectUrl->lineEdit()->text(), true);
|
||||||
true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
existing_root->saveAccountDataToDatabase();
|
existing_root->saveAccountDataToDatabase();
|
||||||
|
@ -4,10 +4,8 @@
|
|||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "miscellaneous/systemfactory.h"
|
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/greader/definitions.h"
|
#include "services/greader/definitions.h"
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
#include "services/newsblur/gui/formeditnewsbluraccount.h"
|
#include "services/newsblur/gui/formeditnewsbluraccount.h"
|
||||||
|
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/networkfactory.h"
|
|
||||||
#include "services/newsblur/definitions.h"
|
|
||||||
#include "services/newsblur/gui/newsbluraccountdetails.h"
|
#include "services/newsblur/gui/newsbluraccountdetails.h"
|
||||||
#include "services/newsblur/newsblurnetwork.h"
|
#include "services/newsblur/newsblurnetwork.h"
|
||||||
#include "services/newsblur/newsblurserviceroot.h"
|
#include "services/newsblur/newsblurserviceroot.h"
|
||||||
@ -24,8 +21,7 @@ void FormEditNewsBlurAccount::apply() {
|
|||||||
FormAccountDetails::apply();
|
FormAccountDetails::apply();
|
||||||
|
|
||||||
NewsBlurServiceRoot* existing_root = account<NewsBlurServiceRoot>();
|
NewsBlurServiceRoot* existing_root = account<NewsBlurServiceRoot>();
|
||||||
bool using_another_acc =
|
bool using_another_acc = m_details->m_ui.m_txtUsername->lineEdit()->text() != existing_root->network()->username() ||
|
||||||
m_details->m_ui.m_txtUsername->lineEdit()->text() != existing_root->network()->username() ||
|
|
||||||
m_details->m_ui.m_txtUrl->lineEdit()->text() != existing_root->network()->baseUrl();
|
m_details->m_ui.m_txtUrl->lineEdit()->text() != existing_root->network()->baseUrl();
|
||||||
|
|
||||||
existing_root->network()->setBaseUrl(m_details->m_ui.m_txtUrl->lineEdit()->text());
|
existing_root->network()->setBaseUrl(m_details->m_ui.m_txtUrl->lineEdit()->text());
|
||||||
|
@ -5,11 +5,6 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/application.h"
|
|
||||||
#include "miscellaneous/systemfactory.h"
|
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/newsblur/definitions.h"
|
|
||||||
#include "services/newsblur/newsblurnetwork.h"
|
#include "services/newsblur/newsblurnetwork.h"
|
||||||
|
|
||||||
#include <QVariantHash>
|
#include <QVariantHash>
|
||||||
@ -60,16 +55,15 @@ void NewsBlurAccountDetails::performTest(const QNetworkProxy& custom_proxy) {
|
|||||||
LoginResult result = factory.login(custom_proxy);
|
LoginResult result = factory.login(custom_proxy);
|
||||||
|
|
||||||
if (result.m_authenticated && !result.m_sessiodId.isEmpty()) {
|
if (result.m_authenticated && !result.m_sessiodId.isEmpty()) {
|
||||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok,
|
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok, tr("You are good to go!"), tr("Yeah."));
|
||||||
tr("You are good to go!"),
|
|
||||||
tr("Yeah."));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw ApplicationException(result.m_errors.join(QSL(", ")));
|
throw ApplicationException(result.m_errors.join(QSL(", ")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const NetworkException& netEx) {
|
catch (const NetworkException& netEx) {
|
||||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
|
m_ui.m_lblTestResult
|
||||||
|
->setStatus(WidgetWithStatus::StatusType::Error,
|
||||||
tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(netEx.networkError())),
|
tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(netEx.networkError())),
|
||||||
tr("Network error, have you entered correct username and password?"));
|
tr("Network error, have you entered correct username and password?"));
|
||||||
}
|
}
|
||||||
|
@ -3,16 +3,11 @@
|
|||||||
#include "services/newsblur/newsblurnetwork.h"
|
#include "services/newsblur/newsblurnetwork.h"
|
||||||
|
|
||||||
#include "3rd-party/boolinq/boolinq.h"
|
#include "3rd-party/boolinq/boolinq.h"
|
||||||
#include "database/databasequeries.h"
|
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "exceptions/feedfetchexception.h"
|
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/abstract/category.h"
|
#include "services/abstract/category.h"
|
||||||
#include "services/abstract/label.h"
|
|
||||||
#include "services/abstract/labelsnode.h"
|
|
||||||
#include "services/newsblur/definitions.h"
|
#include "services/newsblur/definitions.h"
|
||||||
|
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
|
@ -6,19 +6,12 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/feedfetchexception.h"
|
#include "exceptions/feedfetchexception.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "miscellaneous/mutex.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
|
||||||
#include "services/abstract/importantnode.h"
|
|
||||||
#include "services/abstract/recyclebin.h"
|
|
||||||
#include "services/newsblur/definitions.h"
|
|
||||||
#include "services/newsblur/gui/formeditnewsbluraccount.h"
|
#include "services/newsblur/gui/formeditnewsbluraccount.h"
|
||||||
#include "services/newsblur/newsblurentrypoint.h"
|
#include "services/newsblur/newsblurentrypoint.h"
|
||||||
#include "services/newsblur/newsblurnetwork.h"
|
#include "services/newsblur/newsblurnetwork.h"
|
||||||
|
|
||||||
NewsBlurServiceRoot::NewsBlurServiceRoot(RootItem* parent)
|
NewsBlurServiceRoot::NewsBlurServiceRoot(RootItem* parent) : ServiceRoot(parent), m_network(new NewsBlurNetwork(this)) {
|
||||||
: ServiceRoot(parent), m_network(new NewsBlurNetwork(this)) {
|
|
||||||
m_network->setRoot(this);
|
m_network->setRoot(this);
|
||||||
setIcon(NewsBlurEntryPoint().icon());
|
setIcon(NewsBlurEntryPoint().icon());
|
||||||
}
|
}
|
||||||
@ -55,7 +48,8 @@ void NewsBlurServiceRoot::setCustomDatabaseData(const QVariantHash& data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QList<Message> NewsBlurServiceRoot::obtainNewMessages(Feed* feed,
|
QList<Message> NewsBlurServiceRoot::obtainNewMessages(Feed* feed,
|
||||||
const QHash<ServiceRoot::BagOfMessages, QStringList>& stated_messages,
|
const QHash<ServiceRoot::BagOfMessages, QStringList>&
|
||||||
|
stated_messages,
|
||||||
const QHash<QString, QStringList>& tagged_messages) {
|
const QHash<QString, QStringList>& tagged_messages) {
|
||||||
Feed::Status error = Feed::Status::Normal;
|
Feed::Status error = Feed::Status::Normal;
|
||||||
QList<Message> msgs;
|
QList<Message> msgs;
|
||||||
@ -139,5 +133,6 @@ void NewsBlurServiceRoot::updateTitleIcon() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RootItem* NewsBlurServiceRoot::obtainNewTreeForSyncIn() const {
|
RootItem* NewsBlurServiceRoot::obtainNewTreeForSyncIn() const {
|
||||||
return m_network->categoriesFeedsLabelsTree(networkProxy());;
|
return m_network->categoriesFeedsLabelsTree(networkProxy());
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
#include "services/owncloud/gui/formeditowncloudaccount.h"
|
#include "services/owncloud/gui/formeditowncloudaccount.h"
|
||||||
|
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/networkfactory.h"
|
|
||||||
#include "services/owncloud/definitions.h"
|
|
||||||
#include "services/owncloud/gui/owncloudaccountdetails.h"
|
#include "services/owncloud/gui/owncloudaccountdetails.h"
|
||||||
#include "services/owncloud/owncloudnetworkfactory.h"
|
#include "services/owncloud/owncloudnetworkfactory.h"
|
||||||
#include "services/owncloud/owncloudserviceroot.h"
|
#include "services/owncloud/owncloudserviceroot.h"
|
||||||
@ -30,9 +27,12 @@ void FormEditOwnCloudAccount::apply() {
|
|||||||
account<OwnCloudServiceRoot>()->network()->setUrl(m_details->m_ui.m_txtUrl->lineEdit()->text());
|
account<OwnCloudServiceRoot>()->network()->setUrl(m_details->m_ui.m_txtUrl->lineEdit()->text());
|
||||||
account<OwnCloudServiceRoot>()->network()->setAuthUsername(m_details->m_ui.m_txtUsername->lineEdit()->text());
|
account<OwnCloudServiceRoot>()->network()->setAuthUsername(m_details->m_ui.m_txtUsername->lineEdit()->text());
|
||||||
account<OwnCloudServiceRoot>()->network()->setAuthPassword(m_details->m_ui.m_txtPassword->lineEdit()->text());
|
account<OwnCloudServiceRoot>()->network()->setAuthPassword(m_details->m_ui.m_txtPassword->lineEdit()->text());
|
||||||
account<OwnCloudServiceRoot>()->network()->setForceServerSideUpdate(m_details->m_ui.m_checkServerSideUpdate->isChecked());
|
account<OwnCloudServiceRoot>()->network()->setForceServerSideUpdate(m_details->m_ui.m_checkServerSideUpdate
|
||||||
|
->isChecked());
|
||||||
account<OwnCloudServiceRoot>()->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value());
|
account<OwnCloudServiceRoot>()->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value());
|
||||||
account<OwnCloudServiceRoot>()->network()->setDownloadOnlyUnreadMessages(m_details->m_ui.m_checkDownloadOnlyUnreadMessages->isChecked());
|
account<OwnCloudServiceRoot>()
|
||||||
|
->network()
|
||||||
|
->setDownloadOnlyUnreadMessages(m_details->m_ui.m_checkDownloadOnlyUnreadMessages->isChecked());
|
||||||
|
|
||||||
account<OwnCloudServiceRoot>()->saveAccountDataToDatabase();
|
account<OwnCloudServiceRoot>()->saveAccountDataToDatabase();
|
||||||
accept();
|
accept();
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "services/owncloud/gui/owncloudaccountdetails.h"
|
#include "services/owncloud/gui/owncloudaccountdetails.h"
|
||||||
|
|
||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/systemfactory.h"
|
#include "miscellaneous/systemfactory.h"
|
||||||
#include "services/owncloud/definitions.h"
|
#include "services/owncloud/definitions.h"
|
||||||
#include "services/owncloud/owncloudnetworkfactory.h"
|
#include "services/owncloud/owncloudnetworkfactory.h"
|
||||||
@ -12,7 +11,8 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
|
|||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
m_ui.m_lblTestResult->label()->setWordWrap(true);
|
m_ui.m_lblTestResult->label()->setWordWrap(true);
|
||||||
m_ui.m_lblServerSideUpdateInformation->setHelpText(tr("Leaving this option on causes that updates "
|
m_ui.m_lblServerSideUpdateInformation
|
||||||
|
->setHelpText(tr("Leaving this option on causes that updates "
|
||||||
"of feeds will be probably much slower and may time-out often."),
|
"of feeds will be probably much slower and may time-out often."),
|
||||||
true);
|
true);
|
||||||
m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your Nextcloud account"));
|
m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your Nextcloud account"));
|
||||||
@ -23,7 +23,10 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
|
|||||||
tr("No test done yet."),
|
tr("No test done yet."),
|
||||||
tr("Here, results of connection test are shown."));
|
tr("Here, results of connection test are shown."));
|
||||||
|
|
||||||
connect(m_ui.m_spinLimitMessages, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, [=](int value) {
|
connect(m_ui.m_spinLimitMessages,
|
||||||
|
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
|
||||||
|
this,
|
||||||
|
[=](int value) {
|
||||||
if (value <= 0) {
|
if (value <= 0) {
|
||||||
m_ui.m_spinLimitMessages->setSuffix(QSL(" ") + tr("= unlimited"));
|
m_ui.m_spinLimitMessages->setSuffix(QSL(" ") + tr("= unlimited"));
|
||||||
}
|
}
|
||||||
@ -59,21 +62,22 @@ void OwnCloudAccountDetails::performTest(const QNetworkProxy& custom_proxy) {
|
|||||||
OwnCloudStatusResponse result = factory.status(custom_proxy);
|
OwnCloudStatusResponse result = factory.status(custom_proxy);
|
||||||
|
|
||||||
if (result.networkError() != QNetworkReply::NetworkError::NoError) {
|
if (result.networkError() != QNetworkReply::NetworkError::NoError) {
|
||||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
|
m_ui.m_lblTestResult
|
||||||
|
->setStatus(WidgetWithStatus::StatusType::Error,
|
||||||
tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(result.networkError())),
|
tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(result.networkError())),
|
||||||
tr("Network error, have you entered correct Nextcloud endpoint and password?"));
|
tr("Network error, have you entered correct Nextcloud endpoint and password?"));
|
||||||
}
|
}
|
||||||
else if (result.isLoaded()) {
|
else if (result.isLoaded()) {
|
||||||
if (!SystemFactory::isVersionEqualOrNewer(result.version(), QSL(OWNCLOUD_MIN_VERSION))) {
|
if (!SystemFactory::isVersionEqualOrNewer(result.version(), QSL(OWNCLOUD_MIN_VERSION))) {
|
||||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
|
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
|
||||||
tr("Installed version: %1, required at least: %2.").arg(result.version(),
|
tr("Installed version: %1, required at least: %2.")
|
||||||
QSL(OWNCLOUD_MIN_VERSION)),
|
.arg(result.version(), QSL(OWNCLOUD_MIN_VERSION)),
|
||||||
tr("Selected Nextcloud News server is running unsupported version."));
|
tr("Selected Nextcloud News server is running unsupported version."));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok,
|
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok,
|
||||||
tr("Installed version: %1, required at least: %2.").arg(result.version(),
|
tr("Installed version: %1, required at least: %2.")
|
||||||
QSL(OWNCLOUD_MIN_VERSION)),
|
.arg(result.version(), QSL(OWNCLOUD_MIN_VERSION)),
|
||||||
tr("Nextcloud News server is okay."));
|
tr("Nextcloud News server is okay."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "services/owncloud/owncloudfeed.h"
|
#include "services/owncloud/owncloudfeed.h"
|
||||||
|
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "services/owncloud/owncloudnetworkfactory.h"
|
#include "services/owncloud/owncloudnetworkfactory.h"
|
||||||
#include "services/owncloud/owncloudserviceroot.h"
|
#include "services/owncloud/owncloudserviceroot.h"
|
||||||
|
|
||||||
@ -16,8 +15,7 @@ bool OwnCloudFeed::canBeDeleted() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool OwnCloudFeed::deleteViaGui() {
|
bool OwnCloudFeed::deleteViaGui() {
|
||||||
if (serviceRoot()->network()->deleteFeed(customId(), getParentServiceRoot()->networkProxy()) &&
|
if (serviceRoot()->network()->deleteFeed(customId(), getParentServiceRoot()->networkProxy()) && removeItself()) {
|
||||||
removeItself()) {
|
|
||||||
serviceRoot()->requestItemRemoval(this);
|
serviceRoot()->requestItemRemoval(this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,7 @@
|
|||||||
#include "exceptions/feedfetchexception.h"
|
#include "exceptions/feedfetchexception.h"
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "miscellaneous/mutex.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "services/abstract/importantnode.h"
|
|
||||||
#include "services/abstract/recyclebin.h"
|
|
||||||
#include "services/owncloud/gui/formeditowncloudaccount.h"
|
#include "services/owncloud/gui/formeditowncloudaccount.h"
|
||||||
#include "services/owncloud/owncloudfeed.h"
|
#include "services/owncloud/owncloudfeed.h"
|
||||||
#include "services/owncloud/owncloudnetworkfactory.h"
|
#include "services/owncloud/owncloudnetworkfactory.h"
|
||||||
|
@ -2,14 +2,11 @@
|
|||||||
|
|
||||||
#include "services/reddit/gui/formeditredditaccount.h"
|
#include "services/reddit/gui/formeditredditaccount.h"
|
||||||
|
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/reddit/definitions.h"
|
|
||||||
#include "services/reddit/redditserviceroot.h"
|
|
||||||
#include "services/reddit/gui/redditaccountdetails.h"
|
#include "services/reddit/gui/redditaccountdetails.h"
|
||||||
|
#include "services/reddit/redditserviceroot.h"
|
||||||
|
|
||||||
FormEditRedditAccount::FormEditRedditAccount(QWidget* parent)
|
FormEditRedditAccount::FormEditRedditAccount(QWidget* parent)
|
||||||
: FormAccountDetails(qApp->icons()->miscIcon(QSL("reddit")), parent), m_details(new RedditAccountDetails(this)) {
|
: FormAccountDetails(qApp->icons()->miscIcon(QSL("reddit")), parent), m_details(new RedditAccountDetails(this)) {
|
||||||
@ -37,7 +34,8 @@ void FormEditRedditAccount::apply() {
|
|||||||
|
|
||||||
account<RedditServiceRoot>()->network()->setUsername(m_details->m_ui.m_txtUsername->lineEdit()->text());
|
account<RedditServiceRoot>()->network()->setUsername(m_details->m_ui.m_txtUsername->lineEdit()->text());
|
||||||
account<RedditServiceRoot>()->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value());
|
account<RedditServiceRoot>()->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value());
|
||||||
account<RedditServiceRoot>()->network()->setDownloadOnlyUnreadMessages(m_details->m_ui.m_cbDownloadOnlyUnreadMessages->isChecked());
|
account<RedditServiceRoot>()->network()->setDownloadOnlyUnreadMessages(m_details->m_ui.m_cbDownloadOnlyUnreadMessages
|
||||||
|
->isChecked());
|
||||||
|
|
||||||
account<RedditServiceRoot>()->saveAccountDataToDatabase();
|
account<RedditServiceRoot>()->saveAccountDataToDatabase();
|
||||||
accept();
|
accept();
|
||||||
@ -64,5 +62,6 @@ void FormEditRedditAccount::loadAccountData() {
|
|||||||
|
|
||||||
m_details->m_ui.m_txtUsername->lineEdit()->setText(account<RedditServiceRoot>()->network()->username());
|
m_details->m_ui.m_txtUsername->lineEdit()->setText(account<RedditServiceRoot>()->network()->username());
|
||||||
m_details->m_ui.m_spinLimitMessages->setValue(account<RedditServiceRoot>()->network()->batchSize());
|
m_details->m_ui.m_spinLimitMessages->setValue(account<RedditServiceRoot>()->network()->batchSize());
|
||||||
m_details->m_ui.m_cbDownloadOnlyUnreadMessages->setChecked(account<RedditServiceRoot>()->network()->downloadOnlyUnreadMessages());
|
m_details->m_ui.m_cbDownloadOnlyUnreadMessages
|
||||||
|
->setChecked(account<RedditServiceRoot>()->network()->downloadOnlyUnreadMessages());
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,13 @@
|
|||||||
#include "services/reddit/gui/redditaccountdetails.h"
|
#include "services/reddit/gui/redditaccountdetails.h"
|
||||||
|
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/reddit/definitions.h"
|
#include "services/reddit/definitions.h"
|
||||||
#include "services/reddit/redditnetworkfactory.h"
|
#include "services/reddit/redditnetworkfactory.h"
|
||||||
|
|
||||||
RedditAccountDetails::RedditAccountDetails(QWidget* parent)
|
RedditAccountDetails::RedditAccountDetails(QWidget* parent) : QWidget(parent), m_oauth(nullptr), m_lastProxy({}) {
|
||||||
: QWidget(parent), m_oauth(nullptr), m_lastProxy({}) {
|
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
m_ui.m_lblInfo->setHelpText(tr("You have to fill in your client ID/secret and also fill in correct redirect URL."),
|
m_ui.m_lblInfo->setHelpText(tr("You have to fill in your client ID/secret and also fill in correct redirect URL."),
|
||||||
@ -90,9 +88,7 @@ void RedditAccountDetails::onAuthGranted() {
|
|||||||
m_ui.m_txtUsername->lineEdit()->setText(resp[QSL("name")].toString());
|
m_ui.m_txtUsername->lineEdit()->setText(resp[QSL("name")].toString());
|
||||||
}
|
}
|
||||||
catch (const ApplicationException& ex) {
|
catch (const ApplicationException& ex) {
|
||||||
qCriticalNN << LOGSEC_REDDIT
|
qCriticalNN << LOGSEC_REDDIT << "Failed to obtain profile with error:" << QUOTE_W_SPACE_DOT(ex.message());
|
||||||
<< "Failed to obtain profile with error:"
|
|
||||||
<< QUOTE_W_SPACE_DOT(ex.message());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "services/reddit/definitions.h"
|
|
||||||
#include "services/reddit/gui/formeditredditaccount.h"
|
#include "services/reddit/gui/formeditredditaccount.h"
|
||||||
#include "services/reddit/redditserviceroot.h"
|
#include "services/reddit/redditserviceroot.h"
|
||||||
|
|
||||||
|
@ -6,15 +6,9 @@
|
|||||||
#include "definitions/definitions.h"
|
#include "definitions/definitions.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
|
||||||
#include "gui/tabwidget.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/textfactory.h"
|
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "network-web/silentnetworkaccessmanager.h"
|
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/abstract/category.h"
|
|
||||||
#include "services/reddit/definitions.h"
|
#include "services/reddit/definitions.h"
|
||||||
#include "services/reddit/redditserviceroot.h"
|
#include "services/reddit/redditserviceroot.h"
|
||||||
#include "services/reddit/redditsubscription.h"
|
#include "services/reddit/redditsubscription.h"
|
||||||
|
@ -3,13 +3,8 @@
|
|||||||
#include "services/reddit/redditserviceroot.h"
|
#include "services/reddit/redditserviceroot.h"
|
||||||
|
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "exceptions/feedfetchexception.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "network-web/oauth2service.h"
|
#include "network-web/oauth2service.h"
|
||||||
#include "services/abstract/importantnode.h"
|
|
||||||
#include "services/abstract/recyclebin.h"
|
|
||||||
#include "services/reddit/definitions.h"
|
|
||||||
#include "services/reddit/gui/formeditredditaccount.h"
|
#include "services/reddit/gui/formeditredditaccount.h"
|
||||||
#include "services/reddit/redditcategory.h"
|
#include "services/reddit/redditcategory.h"
|
||||||
#include "services/reddit/redditentrypoint.h"
|
#include "services/reddit/redditentrypoint.h"
|
||||||
|
@ -2,12 +2,7 @@
|
|||||||
|
|
||||||
#include "services/standard/gui/formeditstandardaccount.h"
|
#include "services/standard/gui/formeditstandardaccount.h"
|
||||||
|
|
||||||
#include "database/databasefactory.h"
|
|
||||||
#include "database/databasequeries.h"
|
|
||||||
#include "miscellaneous/application.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "services/standard/standardserviceentrypoint.h"
|
#include "services/standard/standardserviceentrypoint.h"
|
||||||
#include "services/standard/standardserviceroot.h"
|
|
||||||
|
|
||||||
FormEditStandardAccount::FormEditStandardAccount(QWidget* parent)
|
FormEditStandardAccount::FormEditStandardAccount(QWidget* parent)
|
||||||
: FormAccountDetails(StandardServiceEntryPoint().icon(), parent) {}
|
: FormAccountDetails(StandardServiceEntryPoint().icon(), parent) {}
|
||||||
|
@ -4,19 +4,14 @@
|
|||||||
|
|
||||||
#include "database/databasequeries.h"
|
#include "database/databasequeries.h"
|
||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/iconfactory.h"
|
|
||||||
#include "network-web/cookiejar.h"
|
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "network-web/webfactory.h"
|
#include "network-web/webfactory.h"
|
||||||
#include "services/abstract/category.h"
|
#include "services/abstract/category.h"
|
||||||
#include "services/abstract/gui/authenticationdetails.h"
|
#include "services/abstract/gui/authenticationdetails.h"
|
||||||
#include "services/abstract/serviceroot.h"
|
#include "services/abstract/serviceroot.h"
|
||||||
#include "services/standard/definitions.h"
|
|
||||||
#include "services/standard/gui/standardfeeddetails.h"
|
#include "services/standard/gui/standardfeeddetails.h"
|
||||||
#include "services/standard/standardfeed.h"
|
#include "services/standard/standardfeed.h"
|
||||||
#include "services/standard/standardserviceroot.h"
|
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QNetworkCookie>
|
#include <QNetworkCookie>
|
||||||
|
@ -2,14 +2,10 @@
|
|||||||
|
|
||||||
#include "services/standard/gui/formstandardimportexport.h"
|
#include "services/standard/gui/formstandardimportexport.h"
|
||||||
|
|
||||||
#include "core/feedsmodel.h"
|
|
||||||
#include "exceptions/ioexception.h"
|
#include "exceptions/ioexception.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
|
||||||
#include "gui/feedmessageviewer.h"
|
|
||||||
#include "gui/feedsview.h"
|
|
||||||
#include "gui/guiutilities.h"
|
#include "gui/guiutilities.h"
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "services/abstract/category.h"
|
#include "services/abstract/category.h"
|
||||||
#include "services/standard/standardfeedsimportexportmodel.h"
|
#include "services/standard/standardfeedsimportexportmodel.h"
|
||||||
#include "services/standard/standardserviceroot.h"
|
#include "services/standard/standardserviceroot.h"
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "exceptions/applicationexception.h"
|
#include "exceptions/applicationexception.h"
|
||||||
#include "exceptions/networkexception.h"
|
#include "exceptions/networkexception.h"
|
||||||
#include "exceptions/scriptexception.h"
|
#include "exceptions/scriptexception.h"
|
||||||
#include "gui/guiutilities.h"
|
|
||||||
#include "miscellaneous/iconfactory.h"
|
#include "miscellaneous/iconfactory.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
#include "services/abstract/category.h"
|
#include "services/abstract/category.h"
|
||||||
|
@ -2,12 +2,7 @@
|
|||||||
|
|
||||||
#include "services/standard/parsers/atomparser.h"
|
#include "services/standard/parsers/atomparser.h"
|
||||||
|
|
||||||
#include "miscellaneous/application.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/standard/definitions.h"
|
|
||||||
|
|
||||||
#include "exceptions/applicationexception.h"
|
|
||||||
|
|
||||||
AtomParser::AtomParser(const QString& data) : FeedParser(data) {
|
AtomParser::AtomParser(const QString& data) : FeedParser(data) {
|
||||||
QString version = m_xml.documentElement().attribute(QSL("version"));
|
QString version = m_xml.documentElement().attribute(QSL("version"));
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "services/standard/parsers/jsonparser.h"
|
#include "services/standard/parsers/jsonparser.h"
|
||||||
|
|
||||||
#include "exceptions/feedfetchexception.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
|
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
@ -34,8 +33,7 @@ QString JsonParser::jsonMessageUrl(const QJsonObject& msg_element) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString JsonParser::jsonMessageDescription(const QJsonObject& msg_element) const {
|
QString JsonParser::jsonMessageDescription(const QJsonObject& msg_element) const {
|
||||||
return msg_element.contains(QSL("content_html"))
|
return msg_element.contains(QSL("content_html")) ? msg_element[QSL("content_html")].toString()
|
||||||
? msg_element[QSL("content_html")].toString()
|
|
||||||
: msg_element[QSL("content_text")].toString();
|
: msg_element[QSL("content_text")].toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,19 +2,13 @@
|
|||||||
|
|
||||||
#include "services/standard/parsers/rdfparser.h"
|
#include "services/standard/parsers/rdfparser.h"
|
||||||
|
|
||||||
#include "exceptions/applicationexception.h"
|
|
||||||
#include "miscellaneous/application.h"
|
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "network-web/webfactory.h"
|
|
||||||
#include "services/standard/definitions.h"
|
|
||||||
|
|
||||||
#include <QDomDocument>
|
#include <QDomDocument>
|
||||||
|
|
||||||
RdfParser::RdfParser(const QString& data)
|
RdfParser::RdfParser(const QString& data)
|
||||||
: FeedParser(data),
|
: FeedParser(data), m_rdfNamespace(QSL("http://www.w3.org/1999/02/22-rdf-syntax-ns#")),
|
||||||
m_rdfNamespace(QSL("http://www.w3.org/1999/02/22-rdf-syntax-ns#")),
|
m_rssNamespace(QSL("http://purl.org/rss/1.0/")), m_rssCoNamespace(QSL("http://purl.org/rss/1.0/modules/content/")),
|
||||||
m_rssNamespace(QSL("http://purl.org/rss/1.0/")),
|
|
||||||
m_rssCoNamespace(QSL("http://purl.org/rss/1.0/modules/content/")),
|
|
||||||
m_dcElNamespace(QSL("http://purl.org/dc/elements/1.1/")) {}
|
m_dcElNamespace(QSL("http://purl.org/dc/elements/1.1/")) {}
|
||||||
|
|
||||||
QDomNodeList RdfParser::xmlMessageElements() {
|
QDomNodeList RdfParser::xmlMessageElements() {
|
||||||
@ -48,7 +42,10 @@ QString RdfParser::xmlMessageAuthor(const QDomElement& msg_element) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QDateTime RdfParser::xmlMessageDateCreated(const QDomElement& msg_element) const {
|
QDateTime RdfParser::xmlMessageDateCreated(const QDomElement& msg_element) const {
|
||||||
return TextFactory::parseDateTime(msg_element.elementsByTagNameNS(m_dcElNamespace, QSL("date")).at(0).toElement().text());
|
return TextFactory::parseDateTime(msg_element.elementsByTagNameNS(m_dcElNamespace, QSL("date"))
|
||||||
|
.at(0)
|
||||||
|
.toElement()
|
||||||
|
.text());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RdfParser::xmlMessageId(const QDomElement& msg_element) const {
|
QString RdfParser::xmlMessageId(const QDomElement& msg_element) const {
|
||||||
|
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