From bff766ba938c7fd56d0faf72b9a2a9f39a77f00a Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 18 Sep 2023 13:35:13 +0200 Subject: [PATCH] remove newsblur wip code, some work on toasts --- localization/rssguard_en.ts | 759 +++++++----------- src/librssguard/CMakeLists.txt | 12 - src/librssguard/core/feeddownloader.cpp | 1 + src/librssguard/core/feedsmodel.cpp | 1 + src/librssguard/core/feedsproxymodel.cpp | 1 + src/librssguard/core/messagesmodel.cpp | 1 + src/librssguard/database/databasefactory.cpp | 26 +- src/librssguard/database/databasequeries.cpp | 1 + src/librssguard/gui/dialogs/formabout.cpp | 1 + .../dialogs/formbackupdatabasesettings.cpp | 47 +- .../gui/dialogs/formdatabasecleanup.cpp | 24 +- src/librssguard/gui/feedsview.cpp | 2 + src/librssguard/gui/messagepreviewer.cpp | 1 + src/librssguard/gui/reusable/basetreeview.cpp | 32 +- .../gui/settings/settingsbrowsermail.cpp | 1 + .../gui/settings/settingsdatabase.cpp | 1 + .../gui/settings/settingsfeedsmessages.cpp | 2 + .../gui/settings/settingsgeneral.cpp | 1 + src/librssguard/gui/systemtrayicon.cpp | 4 - src/librssguard/gui/systemtrayicon.h | 16 +- src/librssguard/gui/toolbars/statusbar.cpp | 1 + src/librssguard/gui/webbrowser.cpp | 1 + .../qtextbrowser/textbrowserviewer.cpp | 1 + .../webviewers/webengine/webengineviewer.cpp | 4 +- src/librssguard/miscellaneous/application.cpp | 3 +- src/librssguard/miscellaneous/application.h | 2 +- .../miscellaneous/externaltool.cpp | 1 + src/librssguard/miscellaneous/feedreader.cpp | 3 +- .../miscellaneous/localization.cpp | 1 + .../miscellaneous/notificationfactory.cpp | 8 + .../miscellaneous/notificationfactory.h | 6 +- src/librssguard/miscellaneous/settings.cpp | 7 + src/librssguard/miscellaneous/settings.h | 23 +- src/librssguard/miscellaneous/skinfactory.cpp | 1 + .../miscellaneous/systemfactory.cpp | 1 + src/librssguard/miscellaneous/textfactory.cpp | 1 + .../network-web/adblock/adblockdialog.cpp | 1 + .../network-web/basenetworkaccessmanager.cpp | 1 + .../network-web/webengine/webenginepage.cpp | 1 + src/librssguard/network-web/webfactory.cpp | 1 + .../services/abstract/rootitem.cpp | 1 + .../services/feedly/feedlynetwork.cpp | 1 + .../services/gmail/gmailnetworkfactory.cpp | 1 + .../services/greader/greadernetwork.cpp | 1 + .../services/newsblur/definitions.h | 17 - .../newsblur/gui/formeditnewsbluraccount.cpp | 59 -- .../newsblur/gui/formeditnewsbluraccount.h | 30 - .../newsblur/gui/newsbluraccountdetails.cpp | 108 --- .../newsblur/gui/newsbluraccountdetails.h | 33 - .../newsblur/gui/newsbluraccountdetails.ui | 163 ---- .../services/newsblur/newsblurentrypoint.cpp | 42 - .../services/newsblur/newsblurentrypoint.h | 19 - .../services/newsblur/newsblurnetwork.cpp | 258 ------ .../services/newsblur/newsblurnetwork.h | 86 -- .../services/newsblur/newsblurserviceroot.cpp | 138 ---- .../services/newsblur/newsblurserviceroot.h | 46 -- .../services/reddit/redditnetworkfactory.cpp | 1 + .../services/tt-rss/ttrssnetworkfactory.cpp | 1 + 58 files changed, 464 insertions(+), 1543 deletions(-) delete mode 100644 src/librssguard/services/newsblur/definitions.h delete mode 100644 src/librssguard/services/newsblur/gui/formeditnewsbluraccount.cpp delete mode 100644 src/librssguard/services/newsblur/gui/formeditnewsbluraccount.h delete mode 100644 src/librssguard/services/newsblur/gui/newsbluraccountdetails.cpp delete mode 100644 src/librssguard/services/newsblur/gui/newsbluraccountdetails.h delete mode 100644 src/librssguard/services/newsblur/gui/newsbluraccountdetails.ui delete mode 100644 src/librssguard/services/newsblur/newsblurentrypoint.cpp delete mode 100644 src/librssguard/services/newsblur/newsblurentrypoint.h delete mode 100644 src/librssguard/services/newsblur/newsblurnetwork.cpp delete mode 100644 src/librssguard/services/newsblur/newsblurnetwork.h delete mode 100644 src/librssguard/services/newsblur/newsblurserviceroot.cpp delete mode 100644 src/librssguard/services/newsblur/newsblurserviceroot.h diff --git a/localization/rssguard_en.ts b/localization/rssguard_en.ts index 1bfc5e889..2a078efef 100644 --- a/localization/rssguard_en.ts +++ b/localization/rssguard_en.ts @@ -17,53 +17,53 @@ AdBlockDialog - + AdBlock configuration - + Cannot enable AdBlock - + There is some error in AdBlock component and it cannot be enabled. Check error message below (or application debug log) for more information. - + OK! - + There is error, check application log for more details and head to online documentation. - + There is error, check application log for more details and head to online documentation. Also make sure that Node.js is installed. Error: %1 - - + + ERROR! - - + + No additional info. - + It seems your AdBlock runs fine, but wait few seconds to be sure. @@ -127,67 +127,67 @@ Error: %1 Application - + Application is already running. Application is already running - + Output directory is not writable. Output directory is not writable - + Settings file not copied to output directory successfully. Settings file not copied to output directory successfully. - + Database restoration was not initiated. Make sure that output directory is writable. Database restoration was not initiated. Make sure that output directory is writable. - + Settings restoration was not initiated. Make sure that output directory is writable. Settings restoration was not initiated. Make sure that output directory is writable. - + Cannot add feed Cannot add feed - + Feed cannot be added because there is no active account which can add feeds. - + Packages %1 were updated. - + Unread articles fetched - + Go to changelog - + AdBlock needs to be configured - + Welcome - + Welcome to %1. Please, check NEW stuff included in this @@ -195,17 +195,17 @@ version by clicking this popup notification. - + AdBlock is not configured properly. Go to "Settings" -> "Node.js" and check if your Node.js is properly configured. - + Already running - + Packages %1 were NOT updated because of error: %2. @@ -381,12 +381,12 @@ version by clicking this popup notification. DatabaseFactory - + Cannot connect to database - + Connection to your database was not established with error: '%1'. Falling back to SQLite. @@ -742,12 +742,12 @@ Item ID: %5 FeedReader - + Starting auto-download of some feeds' articles - + I will auto-download new articles for %n feed(s). @@ -755,12 +755,12 @@ Item ID: %5 - + Cannot fetch articles at this point - + You cannot fetch new articles now because another critical operation is ongoing. @@ -908,28 +908,28 @@ Item ID: %5 FeedlyNetwork - + Feedly: authentication error - + Click this to login again. Error is: '%1' - + Feedly: authorization denied - + Click this to login again. - - + + Login @@ -955,32 +955,32 @@ Item ID: %5 FeedsModel - + Title Title - + Titles of feeds/categories. Titles of feeds/categories. - + Are you sure? Are you sure? - + Do you really want to clean all articles from selected item? - + Root Root - + Counts of unread/all mesages. Counts of unread/all mesages. @@ -988,12 +988,12 @@ Item ID: %5 FeedsProxyModel - + Cannot perform drag & drop operation Cannot perform drag & drop operation - + You can't transfer dragged item into different account, this is not supported. You can't transfer dragged item into different account, this is not supported. @@ -1029,118 +1029,118 @@ Item ID: %5 FeedsView - - + + Cannot edit item Cannot edit item - + Cannot delete item Cannot delete item - + Context menu for empty space Context menu for empty space - + Selected item cannot be edited because another critical operation is ongoing. Selected item cannot be edited because another critical operation is ongoing. - + Selected item cannot be deleted because another critical operation is ongoing. Selected item cannot be deleted because another critical operation is ongoing. - - + + Context menu for categories Context menu for categories - + Selected item cannot be edited, this is not (yet?) supported. Selected item cannot be edited, this is not (yet?) supported. - + Deleting "%1" Deleting "%1" - + You are about to completely delete item "%1". You are about to completely delete item "%1". - + Are you sure? Are you sure? - - + + Cannot delete "%1" Cannot delete "%1" - + This item cannot be deleted because something critically failed. Submit bug report. This item cannot be deleted because something critically failed. Submit bug report. - + This item cannot be deleted, because it does not support it or this functionality is not implemented yet. This item cannot be deleted, because it does not support it or this functionality is not implemented yet. - + Context menu for other items Context menu for other items - + Context menu for regex query - + Selected account does not support adding of new feeds. Selected account does not support adding of new feeds. - + Selected account does not support adding of new categories. Selected account does not support adding of new categories. - + Context menu for recycle bins - + Context menu for accounts - + Context menu for label - + Context menu for important articles - - + + Not supported by account @@ -1148,22 +1148,22 @@ or this functionality is not implemented yet. FormAbout - + Changelog not found. Changelog not found. - + About %1 About %1 - + FULLY portable FULLY portable - + User data folder ("%5") -> "%1" Settings file (%3) -> "%2" @@ -1174,22 +1174,22 @@ QtWebEngine cache folder -> "%7" - + <body>%5 is a (very) tiny feed reader.<br><br>This software is distributed under the terms of GNU General Public License, version 3.<br><br>Contacts:<ul><li><a href="mailto://%1">%1</a> ~e-mail</li><li><a href="%2">%2</a> ~website</li></ul>You can obtain source code for %5 from its website.<br><br><br>Copyright (C) 2011-%3 %4</body> <body>%5 is a (very) tiny feed reader.<br><br>This software is distributed under the terms of GNU General Public License, version 3.<br><br>Contacts:<ul><li><a href="mailto://%1">%1</a> ~e-mail</li><li><a href="%2">%2</a> ~website</li></ul>You can obtain source code for %5 from its website.<br><br><br>Copyright (C) 2011-%3 %4</body> - + <b>%8</b><br><b>Version:</b> %1 (built on %2/%3)<br><b>Revision:</b> %4<br><b>Build date:</b> %5<br><b>Qt:</b> %6 (compiled against %7)<br> <b>%8</b><br><b>Version:</b> %1 (built on %2/%3)<br><b>Revision:</b> %4<br><b>Build date:</b> %5<br><b>Qt:</b> %6 (compiled against %7)<br> - + NOT portable - + CUSTOM @@ -1383,47 +1383,48 @@ QtWebEngine cache folder -> "%7" FormBackupDatabaseSettings - + Common name for backup files Common name for backup files - + + No operation executed yet. No operation executed yet. - + Backup was created successfully. Backup was created successfully. - + Backup name cannot be empty. Backup name cannot be empty. - + Backup name looks okay. Backup name looks okay. - + Backup failed. Backup failed. - + Backup was created successfully and stored in target directory. Backup was created successfully and stored in target directory. - + Select destination directory Select destination directory - + Good destination directory is specified. Good destination directory is specified. @@ -1610,7 +1611,7 @@ QtWebEngine cache folder -> "%7" FormDatabaseCleanup - + day(s) @@ -1618,29 +1619,30 @@ QtWebEngine cache folder -> "%7" - + I am ready. I am ready. - - + + Database cleanup is running. Database cleanup is running. - - + + Database cleanup is completed. Database cleanup is completed. - + + Database cleanup failed. Database cleanup failed. - + unknown unknown @@ -1724,14 +1726,6 @@ QtWebEngine cache folder -> "%7" - - FormEditNewsBlurAccount - - - Server setup - - - FormEditOwnCloudAccount @@ -3437,54 +3431,54 @@ You can install it now. GmailNetworkFactory - + Click this to login again. Error is: '%1' - + Click this to login again. - + No subject - + Gmail: authentication error - + failed to download list of labels - + failed to download IDs of e-mail messages - + Gmail: authorization denied - - + + you are not logged in - + failed to get metadata - - + + Login @@ -3755,36 +3749,36 @@ Login tokens expiration: %2 GreaderNetwork - - - - + + + + login failed - + Inoreader: authentication error - + Click this to login again. Error is: '%1' - + Inoreader: authorization denied - + Click this to login again. - - + + Login @@ -4193,17 +4187,17 @@ Login tokens expiration: %2 MessagePreviewer - + Mark article read - + Mark article unread - + Switch article importance @@ -4272,237 +4266,237 @@ Login tokens expiration: %2 MessagesModel - + Id Id - + Read Read - + Deleted Deleted - + Important Important - + Feed Feed - + Title Title - + Author Author - + Contents Contents - + Permanently deleted Permanently deleted - + Attachments Attachments - + List of attachments. List of attachments. - + Account ID Account ID - + Custom ID Custom ID - + Custom hash Custom hash - + Feed ID - + Has enclosures - + Score - + Date - + Loading of articles failed, maybe messages could not be downloaded. - + dot - + envelope - + feed icon - + URL URL - + RTL - + Assigned labels - + Assigned label IDs - + ID of the article. - + Is article read? - + Is article important? - + Is article deleted? - + Is article permanently deleted from recycle bin? - + ID of feed which this article belongs to. - + Title of the article. - + Url of the article. - + Author of the article. - + Creation date of the article. - + Contents of the article. - + Score of the article. - + Account ID of the article. - + Custom ID of the article. - + Custom hash of the article. - + Name of feed of the article. - + Indication of enclosures presence within the article. - + Layout direction of the article - + Labels assigned to the article. - + Label IDs assigned to the article. - + %n months ago @@ -4510,7 +4504,7 @@ Login tokens expiration: %2 - + %n weeks ago @@ -4518,7 +4512,7 @@ Login tokens expiration: %2 - + %n days ago @@ -4526,12 +4520,12 @@ Login tokens expiration: %2 - + yesterday - + %n hours ago @@ -4539,7 +4533,7 @@ Login tokens expiration: %2 - + %n minutes ago @@ -4547,12 +4541,12 @@ Login tokens expiration: %2 - + just now - + Loading of articles from item '%1' failed @@ -4888,134 +4882,6 @@ Login tokens expiration: %2 - - NewsBlurAccountDetails - - - URL - URL - - - - Download unread articles only - - - - - Only download newest X articles per feed - - - - - Authentication - - - - - Username - Username - - - - Password - Password - - - - &Test setup - - - - - Password for your account - - - - - Username for your account - - - - - URL of your server, without any service-specific path - - - - - No test done yet. - No test done yet. - - - - Here, results of connection test are shown. - Here, results of connection test are shown. - - - - Some feeds might contain tens of thousands of articles and downloading all of them could take great amount of time, so sometimes it is good to download only certain amount of newest messages. - - - - - You are good to go! - - - - - Yeah. - - - - - Network error: '%1'. - Network error: '%1'. - - - - Network error, have you entered correct username and password? - - - - - Error: '%1'. - Error: '%1'. - - - - Error, have you entered correct Nextcloud endpoint and password? - - - - - Username cannot be empty. - Username cannot be empty. - - - - Username is okay. - Username is okay. - - - - Password cannot be empty. - Password cannot be empty. - - - - Password is okay. - Password is okay. - - - - URL cannot be empty. - URL cannot be empty. - - - - URL is okay. - URL is okay. - - NewspaperPreviewer @@ -5245,19 +5111,19 @@ Login tokens expiration: %2 QObject - + LANG_ABBREV en - - + + LANG_AUTHOR Name of translator - optional. Martin Rotter - + + %n other feeds. @@ -5290,17 +5156,17 @@ At least API level %1 is required. - + New version available New version available - + Click the bubble for more information. Click the bubble for more information. - + Passed external tool representation is not valid. @@ -5317,7 +5183,7 @@ Feedly is a secure space where you can privately organize and research the topic - + Cannot insert article filter, because current database cannot return last inserted row ID. @@ -5399,55 +5265,50 @@ List of supported readers: - + interesting stuff - + interesting stuff (highlighted) - + errored items - + errored items (highlighted) - + items with new articles - + items with new articles (highlighted) - + OK-ish color - + User-published articles - + Published articles - - - Personal news reader bringing people together to talk about the world. - - Readability @@ -5655,35 +5516,35 @@ List of supported readers: RedditNetworkFactory - - - + + + you are not logged in - + Reddit: authentication error - + Click this to login again. Error is: '%1' - - + + Login - + Reddit: authorization denied - + Click this to login again. @@ -5710,7 +5571,7 @@ Login tokens expiration: %2 RootItem - + %n unread article(s). Tooltip for "unread" column of feed list. @@ -5846,14 +5707,14 @@ Number of categories: %2 SettingsBrowserMail - + Select web browser executable Select web browser executable - - - + + + Executables (*) File filter for external browser selection dialog. ---------- @@ -5861,29 +5722,29 @@ File filter for external e-mail selection dialog. Executables (*) - - - + + + Executables (*.*) Executables (*.*) - + Select e-mail executable Select e-mail executable - + Opera 12 or older Opera 12 or older - + Enter (optional) parameters: - + Executable @@ -5952,7 +5813,7 @@ File filter for external e-mail selection dialog. - + Parameters @@ -5974,7 +5835,7 @@ File filter for external e-mail selection dialog. - + Note that "%1" (without quotation marks) is placeholder for URL of selected message. @@ -6004,7 +5865,7 @@ File filter for external e-mail selection dialog. - + Placeholders: • %1 - title of selected message, • %2 - body of selected message. @@ -6031,22 +5892,22 @@ File filter for external e-mail selection dialog. - + On this page, you can setup a list of external tools which can open URLs. - + Select external tool - + Enter parameters - + Network proxy @@ -6059,82 +5920,82 @@ File filter for external e-mail selection dialog. SettingsDatabase - + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - + Hostname is empty. Hostname is empty. - + Hostname looks ok. Hostname looks ok. - + Username is empty. Username is empty. - + Username looks ok. Username looks ok. - + Password is empty. Password is empty. - + Password looks ok. Password looks ok. - + Working database is empty. Working database is empty. - + Working database is ok. Working database is ok. - + No connection test triggered so far. No connection test triggered so far. - + You did not executed any connection test yet. You did not executed any connection test yet. - + Hostname of your MySQL server Hostname of your MySQL server - + Username to login with Username to login with - + Password for your username Password for your username - + Working database which you have full access to. Working database which you have full access to. - + Usage of in-memory working database has several advantages and pitfalls. Make sure that you are familiar with these before you turn this feature on. Advantages: @@ -6240,27 +6101,27 @@ Authors of this application are NOT responsible for lost data. SettingsFeedsMessages - + Select new font - + Enter format for count of articles displayed next to each feed/category in feed list. Use "%all" and "%unread" strings which are placeholders for the actual count of all (or unread) articles. - + Note that enabling this might have drastic consequences on performance of article list with big number of articles. - + days (turned off) - + day(s) @@ -6268,17 +6129,17 @@ Authors of this application are NOT responsible for lost data. - + = unchanged size - + PC restart needed - + Your PC needs to be restarted to make some of enabled features fully working. @@ -6481,7 +6342,7 @@ Authors of this application are NOT responsible for lost data. SettingsGeneral - + (not supported on this platform) (not supported on this platform) @@ -6950,28 +6811,28 @@ Also, there are some built-in sounds. Just start typing ":" and they w SkinFactory - - + + This page was blocked by AdBlock - + Blocked URL: "%1"<br/>Used filter: "%2" - + Written by Written by - + unknown author - + Newspaper view Newspaper view @@ -7434,17 +7295,17 @@ Also, you can post-process generated feed data with yet another script if you wi StatusBar - + Feed update progress bar Feed update progress bar - + File download progress bar File download progress bar - + Toolbar spacer Toolbar spacer @@ -7452,17 +7313,17 @@ Also, you can post-process generated feed data with yet another script if you wi SystemFactory - + anonymous anonymous - + bytes - + See new version info @@ -7470,7 +7331,7 @@ Also, you can post-process generated feed data with yet another script if you wi SystemTrayIcon - + %1 Unread news: %2 %1 @@ -7531,27 +7392,27 @@ Unread news: %2 TextBrowserViewer - + image - + Enable external resources - + Open in external browser - + Download - + Open with external tool @@ -8013,53 +7874,53 @@ Last login on: %4 WebBrowser - + Navigation panel Navigation panel - + View website in reader mode - + No title Webbrowser tab title when no title is available. No title - + Reader mode failed for this website - + Reader mode cannot be applied to current page. - + Back Back - + Forward Forward - + Reload Reload - + Stop Stop - + Open this website in system web browser @@ -8085,167 +7946,167 @@ Last login on: %4 WebFactory - + Web engine settings - + Auto-load images - + JS enabled - + JS can open popup windows - + JS can access clipboard - + Hyperlinks can get focus - + Local storage enabled - + Local content can access remote URLs - + XSS auditing enabled - + Spatial navigation enabled - + Local content can access local files - + Hyperlink auditing enabled - + Animate scrolling - + Error pages enabled - + Plugins enabled - + Fullscreen enabled - + Screen capture enabled - + WebGL enabled - + Accelerate 2D canvas - + Print element backgrounds - + Allow running insecure content - + Allow geolocation on insecure origins - + Web cache is going to be cleared - + Do you really want to clear web cache? - + Navigate to website manually - + %1 was unable to launch your web browser with the given URL, you need to open the below website URL in your web browser manually. - + JS can activate windows - + Show scrollbars - + Media playback with gestures - + WebRTC uses only public interfaces - + JS can paste from clipboard - + DNS prefetch enabled - + PDF viewer enabled diff --git a/src/librssguard/CMakeLists.txt b/src/librssguard/CMakeLists.txt index 9f1253378..d9cd30db0 100644 --- a/src/librssguard/CMakeLists.txt +++ b/src/librssguard/CMakeLists.txt @@ -332,17 +332,6 @@ set(SOURCES services/greader/gui/formeditgreaderaccount.h services/greader/gui/greaderaccountdetails.cpp services/greader/gui/greaderaccountdetails.h - services/newsblur/definitions.h - services/newsblur/newsblurentrypoint.cpp - services/newsblur/newsblurentrypoint.h - services/newsblur/newsblurnetwork.cpp - services/newsblur/newsblurnetwork.h - services/newsblur/newsblurserviceroot.cpp - services/newsblur/newsblurserviceroot.h - services/newsblur/gui/formeditnewsbluraccount.cpp - services/newsblur/gui/formeditnewsbluraccount.h - services/newsblur/gui/newsbluraccountdetails.cpp - services/newsblur/gui/newsbluraccountdetails.h services/owncloud/definitions.h services/owncloud/gui/formeditowncloudaccount.cpp services/owncloud/gui/formeditowncloudaccount.h @@ -481,7 +470,6 @@ set(UI_FILES services/gmail/gui/gmailaccountdetails.ui services/gmail/gui/emailpreviewer.ui services/greader/gui/greaderaccountdetails.ui - services/newsblur/gui/newsbluraccountdetails.ui services/owncloud/gui/owncloudaccountdetails.ui services/reddit/gui/redditaccountdetails.ui services/standard/gui/formstandardimportexport.ui diff --git a/src/librssguard/core/feeddownloader.cpp b/src/librssguard/core/feeddownloader.cpp index bf47f6d24..8b51c3d42 100644 --- a/src/librssguard/core/feeddownloader.cpp +++ b/src/librssguard/core/feeddownloader.cpp @@ -9,6 +9,7 @@ #include "exceptions/feedfetchexception.h" #include "exceptions/filteringexception.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "services/abstract/cacheforserviceroot.h" #include "services/abstract/feed.h" #include "services/abstract/labelsnode.h" diff --git a/src/librssguard/core/feedsmodel.cpp b/src/librssguard/core/feedsmodel.cpp index 6414457f5..8215b4205 100644 --- a/src/librssguard/core/feedsmodel.cpp +++ b/src/librssguard/core/feedsmodel.cpp @@ -10,6 +10,7 @@ #include "gui/messagebox.h" #include "miscellaneous/feedreader.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "services/abstract/feed.h" #include "services/abstract/recyclebin.h" #include "services/abstract/serviceentrypoint.h" diff --git a/src/librssguard/core/feedsproxymodel.cpp b/src/librssguard/core/feedsproxymodel.cpp index b82fd016f..6f8a7fe17 100644 --- a/src/librssguard/core/feedsproxymodel.cpp +++ b/src/librssguard/core/feedsproxymodel.cpp @@ -9,6 +9,7 @@ #include "gui/feedsview.h" #include "miscellaneous/application.h" #include "miscellaneous/regexfactory.h" +#include "miscellaneous/settings.h" #include "services/abstract/rootitem.h" #include diff --git a/src/librssguard/core/messagesmodel.cpp b/src/librssguard/core/messagesmodel.cpp index 2fcb8301a..c44144729 100644 --- a/src/librssguard/core/messagesmodel.cpp +++ b/src/librssguard/core/messagesmodel.cpp @@ -11,6 +11,7 @@ #include "gui/messagesview.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "miscellaneous/skinfactory.h" #include "miscellaneous/textfactory.h" #include "services/abstract/recyclebin.h" diff --git a/src/librssguard/database/databasefactory.cpp b/src/librssguard/database/databasefactory.cpp index a5949c95b..e458078d2 100644 --- a/src/librssguard/database/databasefactory.cpp +++ b/src/librssguard/database/databasefactory.cpp @@ -9,6 +9,7 @@ #include "gui/messagebox.h" #include "miscellaneous/application.h" #include "miscellaneous/iofactory.h" +#include "miscellaneous/settings.h" #include "miscellaneous/textfactory.h" #include @@ -17,8 +18,7 @@ #include #include -DatabaseFactory::DatabaseFactory(QObject* parent) - : QObject(parent), m_dbDriver(nullptr) { +DatabaseFactory::DatabaseFactory(QObject* parent) : QObject(parent), m_dbDriver(nullptr) { determineDriver(); } @@ -29,8 +29,7 @@ void DatabaseFactory::removeConnection(const QString& connection_name) { void DatabaseFactory::determineDriver() { m_allDbDrivers = { - new SqliteDriver(qApp->settings()->value(GROUP(Database), SETTING(Database::UseInMemory)).toBool(), this) - }; + new SqliteDriver(qApp->settings()->value(GROUP(Database), SETTING(Database::UseInMemory)).toBool(), this)}; if (QSqlDatabase::isDriverAvailable(QSL(APP_DB_MYSQL_DRIVER))) { m_allDbDrivers.append(new MariaDbDriver(this)); @@ -51,16 +50,15 @@ void DatabaseFactory::determineDriver() { m_dbDriver->connection(QSL("DatabaseFactory")); } catch (const ApplicationException& ex) { - qCriticalNN << LOGSEC_DB - << "Failed to reach connection to DB source:" - << QUOTE_W_SPACE_DOT(ex.message()); + qCriticalNN << LOGSEC_DB << "Failed to reach connection to DB source:" << QUOTE_W_SPACE_DOT(ex.message()); if (m_dbDriver->driverType() != DatabaseDriver::DriverType::SQLite) { MsgBox::show(nullptr, - QMessageBox::Icon::Critical, - tr("Cannot connect to database"), - tr("Connection to your database was not established with error: '%1'. " - "Falling back to SQLite.").arg(ex.message())); + QMessageBox::Icon::Critical, + tr("Cannot connect to database"), + tr("Connection to your database was not established with error: '%1'. " + "Falling back to SQLite.") + .arg(ex.message())); m_dbDriver = boolinq::from(m_allDbDrivers).first([](DatabaseDriver* driv) { return driv->driverType() == DatabaseDriver::DriverType::SQLite; @@ -88,8 +86,7 @@ QString DatabaseFactory::lastExecutedQuery(const QSqlQuery& query) { while (it.hasNext()) { it.next(); - if (it.value().type() == QVariant::Type::Char || - it.value().type() == QVariant::Type::String) { + if (it.value().type() == QVariant::Type::Char || it.value().type() == QVariant::Type::String) { str.replace(it.key(), QSL("'%1'").arg(it.value().toString())); } else { @@ -102,8 +99,7 @@ QString DatabaseFactory::lastExecutedQuery(const QSqlQuery& query) { } QString DatabaseFactory::escapeQuery(const QString& query) { - return QString(query) - .replace(QSL("'"), QSL("''")); + return QString(query).replace(QSL("'"), QSL("''")); //.replace(QSL("\""), QSL("\\\"")); } diff --git a/src/librssguard/database/databasequeries.cpp b/src/librssguard/database/databasequeries.cpp index 505e62f30..a06807faa 100644 --- a/src/librssguard/database/databasequeries.cpp +++ b/src/librssguard/database/databasequeries.cpp @@ -7,6 +7,7 @@ #include "exceptions/applicationexception.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "services/abstract/category.h" #include diff --git a/src/librssguard/gui/dialogs/formabout.cpp b/src/librssguard/gui/dialogs/formabout.cpp index c9ccd969e..8971eb6a1 100644 --- a/src/librssguard/gui/dialogs/formabout.cpp +++ b/src/librssguard/gui/dialogs/formabout.cpp @@ -6,6 +6,7 @@ #include "gui/guiutilities.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "miscellaneous/settingsproperties.h" #include "miscellaneous/textfactory.h" #include "network-web/webfactory.h" diff --git a/src/librssguard/gui/dialogs/formbackupdatabasesettings.cpp b/src/librssguard/gui/dialogs/formbackupdatabasesettings.cpp index 5c353782d..28357f51b 100644 --- a/src/librssguard/gui/dialogs/formbackupdatabasesettings.cpp +++ b/src/librssguard/gui/dialogs/formbackupdatabasesettings.cpp @@ -6,6 +6,7 @@ #include "gui/guiutilities.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include #include @@ -13,7 +14,8 @@ #include #include -FormBackupDatabaseSettings::FormBackupDatabaseSettings(QWidget* parent) : QDialog(parent), m_ui(new Ui::FormBackupDatabaseSettings) { +FormBackupDatabaseSettings::FormBackupDatabaseSettings(QWidget* parent) + : QDialog(parent), m_ui(new Ui::FormBackupDatabaseSettings) { m_ui->setupUi(this); setObjectName(QSL("form_backup_db_set")); @@ -24,21 +26,31 @@ FormBackupDatabaseSettings::FormBackupDatabaseSettings(QWidget* parent) : QDialo connect(m_ui->m_checkBackupDatabase, &QCheckBox::toggled, this, &FormBackupDatabaseSettings::checkOkButton); connect(m_ui->m_checkBackupSettings, &QCheckBox::toggled, this, &FormBackupDatabaseSettings::checkOkButton); - connect(m_ui->m_buttonBox->button(QDialogButtonBox::StandardButton::Ok), &QPushButton::clicked, this, &FormBackupDatabaseSettings::performBackup); - connect(m_ui->m_txtBackupName->lineEdit(), &BaseLineEdit::textChanged, this, &FormBackupDatabaseSettings::checkBackupNames); - connect(m_ui->m_txtBackupName->lineEdit(), &BaseLineEdit::textChanged, this, &FormBackupDatabaseSettings::checkOkButton); + connect(m_ui->m_buttonBox->button(QDialogButtonBox::StandardButton::Ok), + &QPushButton::clicked, + this, + &FormBackupDatabaseSettings::performBackup); + connect(m_ui->m_txtBackupName->lineEdit(), + &BaseLineEdit::textChanged, + this, + &FormBackupDatabaseSettings::checkBackupNames); + connect(m_ui->m_txtBackupName->lineEdit(), + &BaseLineEdit::textChanged, + this, + &FormBackupDatabaseSettings::checkOkButton); connect(m_ui->m_btnSelectFolder, &QPushButton::clicked, this, &FormBackupDatabaseSettings::selectFolderInitial); selectFolder(qApp->documentsFolder()); m_ui->m_txtBackupName->lineEdit()->setText(QSL(APP_LOW_NAME) + QL1S("_") + QDateTime::currentDateTime().toString(QSL("yyyyMMddHHmm"))); - m_ui->m_lblResult->setStatus(WidgetWithStatus::StatusType::Warning, tr("No operation executed yet."), tr("No operation executed yet.")); + m_ui->m_lblResult->setStatus(WidgetWithStatus::StatusType::Warning, + tr("No operation executed yet."), + tr("No operation executed yet.")); if (qApp->database()->activeDatabaseDriver() != DatabaseDriver::DriverType::SQLite) { m_ui->m_checkBackupDatabase->setDisabled(true); } - GuiUtilities::restoreState(this, - qApp->settings()->value(GROUP(GUI), objectName(), QByteArray()).toByteArray()); + GuiUtilities::restoreState(this, qApp->settings()->value(GROUP(GUI), objectName(), QByteArray()).toByteArray()); } FormBackupDatabaseSettings::~FormBackupDatabaseSettings() { @@ -47,8 +59,10 @@ FormBackupDatabaseSettings::~FormBackupDatabaseSettings() { void FormBackupDatabaseSettings::performBackup() { try { - qApp->backupDatabaseSettings(m_ui->m_checkBackupDatabase->isChecked(), m_ui->m_checkBackupSettings->isChecked(), - m_ui->m_lblSelectFolder->label()->text(), m_ui->m_txtBackupName->lineEdit()->text()); + qApp->backupDatabaseSettings(m_ui->m_checkBackupDatabase->isChecked(), + m_ui->m_checkBackupSettings->isChecked(), + m_ui->m_lblSelectFolder->label()->text(), + m_ui->m_txtBackupName->lineEdit()->text()); m_ui->m_lblResult->setStatus(WidgetWithStatus::StatusType::Ok, tr("Backup was created successfully and stored in target directory."), tr("Backup was created successfully.")); @@ -64,11 +78,14 @@ void FormBackupDatabaseSettings::selectFolderInitial() { void FormBackupDatabaseSettings::selectFolder(QString path) { if (path.isEmpty()) { - path = QFileDialog::getExistingDirectory(this, tr("Select destination directory"), m_ui->m_lblSelectFolder->label()->text()); + path = QFileDialog::getExistingDirectory(this, + tr("Select destination directory"), + m_ui->m_lblSelectFolder->label()->text()); } if (!path.isEmpty()) { - m_ui->m_lblSelectFolder->setStatus(WidgetWithStatus::StatusType::Ok, QDir::toNativeSeparators(path), + m_ui->m_lblSelectFolder->setStatus(WidgetWithStatus::StatusType::Ok, + QDir::toNativeSeparators(path), tr("Good destination directory is specified.")); } } @@ -83,10 +100,10 @@ void FormBackupDatabaseSettings::checkBackupNames(const QString& name) { } void FormBackupDatabaseSettings::checkOkButton() { - m_ui->m_buttonBox->button(QDialogButtonBox::StandardButton::Ok)->setDisabled(m_ui->m_txtBackupName->lineEdit()->text().simplified().isEmpty() || - m_ui->m_lblSelectFolder->label()->text().simplified().isEmpty() || - (!m_ui->m_checkBackupDatabase->isChecked() && - !m_ui->m_checkBackupSettings->isChecked())); + m_ui->m_buttonBox->button(QDialogButtonBox::StandardButton::Ok) + ->setDisabled(m_ui->m_txtBackupName->lineEdit()->text().simplified().isEmpty() || + m_ui->m_lblSelectFolder->label()->text().simplified().isEmpty() || + (!m_ui->m_checkBackupDatabase->isChecked() && !m_ui->m_checkBackupSettings->isChecked())); } void FormBackupDatabaseSettings::hideEvent(QHideEvent* event) { diff --git a/src/librssguard/gui/dialogs/formdatabasecleanup.cpp b/src/librssguard/gui/dialogs/formdatabasecleanup.cpp index d1853c355..74483b78e 100644 --- a/src/librssguard/gui/dialogs/formdatabasecleanup.cpp +++ b/src/librssguard/gui/dialogs/formdatabasecleanup.cpp @@ -7,20 +7,28 @@ #include "gui/guiutilities.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include #include #include -FormDatabaseCleanup::FormDatabaseCleanup(QWidget* parent) : QDialog(parent), m_ui(new Ui::FormDatabaseCleanup), m_cleaner(nullptr) { +FormDatabaseCleanup::FormDatabaseCleanup(QWidget* parent) + : QDialog(parent), m_ui(new Ui::FormDatabaseCleanup), m_cleaner(nullptr) { m_ui->setupUi(this); setObjectName(QSL("form_db_cleanup")); GuiUtilities::applyDialogProperties(*this, qApp->icons()->fromTheme(QSL("edit-clear"))); - connect(m_ui->m_spinDays, static_cast(&QSpinBox::valueChanged), this, &FormDatabaseCleanup::updateDaysSuffix); - connect(m_ui->m_btnBox->button(QDialogButtonBox::StandardButton::Ok), &QPushButton::clicked, this, &FormDatabaseCleanup::startPurging); + connect(m_ui->m_spinDays, + static_cast(&QSpinBox::valueChanged), + this, + &FormDatabaseCleanup::updateDaysSuffix); + connect(m_ui->m_btnBox->button(QDialogButtonBox::StandardButton::Ok), + &QPushButton::clicked, + this, + &FormDatabaseCleanup::startPurging); connect(this, &FormDatabaseCleanup::purgeRequested, &m_cleaner, &DatabaseCleaner::purgeDatabaseData); connect(&m_cleaner, &DatabaseCleaner::purgeStarted, this, &FormDatabaseCleanup::onPurgeStarted); connect(&m_cleaner, &DatabaseCleaner::purgeProgress, this, &FormDatabaseCleanup::onPurgeProgress); @@ -31,8 +39,7 @@ FormDatabaseCleanup::FormDatabaseCleanup(QWidget* parent) : QDialog(parent), m_u loadDatabaseInfo(); - GuiUtilities::restoreState(this, - qApp->settings()->value(GROUP(GUI), objectName(), QByteArray()).toByteArray()); + GuiUtilities::restoreState(this, qApp->settings()->value(GROUP(GUI), objectName(), QByteArray()).toByteArray()); } void FormDatabaseCleanup::closeEvent(QCloseEvent* event) { @@ -73,7 +80,8 @@ void FormDatabaseCleanup::startPurging() { void FormDatabaseCleanup::onPurgeStarted() { m_ui->m_progressBar->setValue(0); m_ui->m_btnBox->setEnabled(false); - m_ui->m_lblResult->setStatus(WidgetWithStatus::StatusType::Information, tr("Database cleanup is running."), + m_ui->m_lblResult->setStatus(WidgetWithStatus::StatusType::Information, + tr("Database cleanup is running."), tr("Database cleanup is running.")); } @@ -92,7 +100,9 @@ void FormDatabaseCleanup::onPurgeFinished(bool finished) { tr("Database cleanup is completed.")); } else { - m_ui->m_lblResult->setStatus(WidgetWithStatus::StatusType::Error, tr("Database cleanup failed."), tr("Database cleanup failed.")); + m_ui->m_lblResult->setStatus(WidgetWithStatus::StatusType::Error, + tr("Database cleanup failed."), + tr("Database cleanup failed.")); } loadDatabaseInfo(); diff --git a/src/librssguard/gui/feedsview.cpp b/src/librssguard/gui/feedsview.cpp index e5de2461b..aae832c43 100644 --- a/src/librssguard/gui/feedsview.cpp +++ b/src/librssguard/gui/feedsview.cpp @@ -10,6 +10,8 @@ #include "gui/reusable/styleditemdelegatewithoutfocus.h" #include "miscellaneous/feedreader.h" #include "miscellaneous/mutex.h" +#include "miscellaneous/settings.h" +#include "miscellaneous/textfactory.h" #include "services/abstract/feed.h" #include "services/abstract/rootitem.h" #include "services/abstract/serviceroot.h" diff --git a/src/librssguard/gui/messagepreviewer.cpp b/src/librssguard/gui/messagepreviewer.cpp index 41ca7325a..8030d15eb 100644 --- a/src/librssguard/gui/messagepreviewer.cpp +++ b/src/librssguard/gui/messagepreviewer.cpp @@ -6,6 +6,7 @@ #include "gui/itemdetails.h" #include "gui/webbrowser.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "services/abstract/gui/custommessagepreviewer.h" #include "services/abstract/label.h" #include "services/abstract/labelsnode.h" diff --git a/src/librssguard/gui/reusable/basetreeview.cpp b/src/librssguard/gui/reusable/basetreeview.cpp index 5a0c755d5..72d452fb4 100644 --- a/src/librssguard/gui/reusable/basetreeview.cpp +++ b/src/librssguard/gui/reusable/basetreeview.cpp @@ -3,31 +3,29 @@ #include "gui/reusable/basetreeview.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include BaseTreeView::BaseTreeView(QWidget* parent) : QTreeView(parent) { - m_allowedKeyboardKeys = { - Qt::Key::Key_Back, - Qt::Key::Key_Select, - Qt::Key::Key_Copy, - Qt::Key::Key_Shift, - Qt::Key::Key_Control, - Qt::Key::Key_Up, - Qt::Key::Key_Down, - Qt::Key::Key_Left, - Qt::Key::Key_Right, - Qt::Key::Key_Home, - Qt::Key::Key_End, - Qt::Key::Key_PageUp, - Qt::Key::Key_PageDown - }; + m_allowedKeyboardKeys = {Qt::Key::Key_Back, + Qt::Key::Key_Select, + Qt::Key::Key_Copy, + Qt::Key::Key_Shift, + Qt::Key::Key_Control, + Qt::Key::Key_Up, + Qt::Key::Key_Down, + Qt::Key::Key_Left, + Qt::Key::Key_Right, + Qt::Key::Key_Home, + Qt::Key::Key_End, + Qt::Key::Key_PageUp, + Qt::Key::Key_PageDown}; } void BaseTreeView::keyPressEvent(QKeyEvent* event) { if (qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::OnlyBasicShortcutsInLists)).toBool() && - !m_allowedKeyboardKeys.contains(event->key()) && - !event->matches(QKeySequence::StandardKey::SelectAll)) { + !m_allowedKeyboardKeys.contains(event->key()) && !event->matches(QKeySequence::StandardKey::SelectAll)) { event->ignore(); } else { diff --git a/src/librssguard/gui/settings/settingsbrowsermail.cpp b/src/librssguard/gui/settings/settingsbrowsermail.cpp index f44c10572..56a3222f5 100644 --- a/src/librssguard/gui/settings/settingsbrowsermail.cpp +++ b/src/librssguard/gui/settings/settingsbrowsermail.cpp @@ -7,6 +7,7 @@ #include "miscellaneous/application.h" #include "miscellaneous/externaltool.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "network-web/cookiejar.h" #include "network-web/silentnetworkaccessmanager.h" #include "network-web/webfactory.h" diff --git a/src/librssguard/gui/settings/settingsdatabase.cpp b/src/librssguard/gui/settings/settingsdatabase.cpp index 42bf463af..47ad2b3b7 100644 --- a/src/librssguard/gui/settings/settingsdatabase.cpp +++ b/src/librssguard/gui/settings/settingsdatabase.cpp @@ -6,6 +6,7 @@ #include "database/mariadbdriver.h" #include "definitions/definitions.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" SettingsDatabase::SettingsDatabase(Settings* settings, QWidget* parent) : SettingsPanel(settings, parent), m_ui(new Ui::SettingsDatabase) { diff --git a/src/librssguard/gui/settings/settingsfeedsmessages.cpp b/src/librssguard/gui/settings/settingsfeedsmessages.cpp index 58a7a63b3..5332223a1 100644 --- a/src/librssguard/gui/settings/settingsfeedsmessages.cpp +++ b/src/librssguard/gui/settings/settingsfeedsmessages.cpp @@ -10,6 +10,8 @@ #include "gui/reusable/timespinbox.h" #include "miscellaneous/application.h" #include "miscellaneous/feedreader.h" +#include "miscellaneous/settings.h" +#include "miscellaneous/textfactory.h" #include #include diff --git a/src/librssguard/gui/settings/settingsgeneral.cpp b/src/librssguard/gui/settings/settingsgeneral.cpp index 0dae66030..ec1a91f7e 100644 --- a/src/librssguard/gui/settings/settingsgeneral.cpp +++ b/src/librssguard/gui/settings/settingsgeneral.cpp @@ -3,6 +3,7 @@ #include "gui/settings/settingsgeneral.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "miscellaneous/systemfactory.h" SettingsGeneral::SettingsGeneral(Settings* settings, QWidget* parent) diff --git a/src/librssguard/gui/systemtrayicon.cpp b/src/librssguard/gui/systemtrayicon.cpp index dd5388e07..c83db42af 100644 --- a/src/librssguard/gui/systemtrayicon.cpp +++ b/src/librssguard/gui/systemtrayicon.cpp @@ -66,10 +66,6 @@ bool SystemTrayIcon::isSystemTrayDesired() { return qApp->settings()->value(GROUP(GUI), SETTING(GUI::UseTrayIcon)).toBool(); } -bool SystemTrayIcon::areNotificationsEnabled() { - return qApp->settings()->value(GROUP(GUI), SETTING(GUI::EnableNotifications)).toBool(); -} - void SystemTrayIcon::showPrivate() { // Make sure that application does not exit some window (for example // the settings window) gets closed. Behavior for main window diff --git a/src/librssguard/gui/systemtrayicon.h b/src/librssguard/gui/systemtrayicon.h index 6c195c07a..2ae76545a 100644 --- a/src/librssguard/gui/systemtrayicon.h +++ b/src/librssguard/gui/systemtrayicon.h @@ -18,10 +18,9 @@ class QEvent; #if defined(Q_OS_WIN) class TrayIconMenu : public QMenu { - Q_OBJECT + Q_OBJECT public: - // Constructors and destructors. explicit TrayIconMenu(const QString& title, QWidget* parent); @@ -32,10 +31,9 @@ class TrayIconMenu : public QMenu { #endif class SystemTrayIcon : public QSystemTrayIcon { - Q_OBJECT + Q_OBJECT public: - // Constructors and destructors. explicit SystemTrayIcon(const QString& normal_icon, const QString& plain_icon, FormMain* parent = nullptr); virtual ~SystemTrayIcon(); @@ -43,8 +41,11 @@ class SystemTrayIcon : public QSystemTrayIcon { // Sets the number to be visible in the tray icon, number <= 0 removes it. void setNumber(int number = -1, bool any_feed_has_new_unread_messages = false); - void showMessage(const QString& title, const QString& message, MessageIcon icon = Information, - int milliseconds_timeout_hint = TRAY_ICON_BUBBLE_TIMEOUT, const std::function& functor = nullptr); + void showMessage(const QString& title, + const QString& message, + MessageIcon icon = Information, + int milliseconds_timeout_hint = TRAY_ICON_BUBBLE_TIMEOUT, + const std::function& functor = nullptr); // Returns true if tray area is available and icon can be displayed. static bool isSystemTrayAreaAvailable(); @@ -52,9 +53,6 @@ class SystemTrayIcon : public QSystemTrayIcon { // Returns true if user wants to have tray icon displayed. static bool isSystemTrayDesired(); - // Determines whether balloon tips are enabled or not on tray icons. - static bool areNotificationsEnabled(); - public slots: void show(); diff --git a/src/librssguard/gui/toolbars/statusbar.cpp b/src/librssguard/gui/toolbars/statusbar.cpp index 21c171c53..6832b1433 100644 --- a/src/librssguard/gui/toolbars/statusbar.cpp +++ b/src/librssguard/gui/toolbars/statusbar.cpp @@ -7,6 +7,7 @@ #include "gui/reusable/progressbarwithtext.h" #include "gui/tabwidget.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include #include diff --git a/src/librssguard/gui/webbrowser.cpp b/src/librssguard/gui/webbrowser.cpp index fc186211d..4ea62b274 100644 --- a/src/librssguard/gui/webbrowser.cpp +++ b/src/librssguard/gui/webbrowser.cpp @@ -12,6 +12,7 @@ #include "gui/webviewers/webviewer.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "network-web/networkfactory.h" #include "network-web/readability.h" #include "network-web/webfactory.h" diff --git a/src/librssguard/gui/webviewers/qtextbrowser/textbrowserviewer.cpp b/src/librssguard/gui/webviewers/qtextbrowser/textbrowserviewer.cpp index 81b2baf5c..a368e1be0 100644 --- a/src/librssguard/gui/webviewers/qtextbrowser/textbrowserviewer.cpp +++ b/src/librssguard/gui/webviewers/qtextbrowser/textbrowserviewer.cpp @@ -9,6 +9,7 @@ #include "miscellaneous/application.h" #include "miscellaneous/externaltool.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "network-web/adblock/adblockrequestinfo.h" #include "network-web/downloader.h" #include "network-web/networkfactory.h" diff --git a/src/librssguard/gui/webviewers/webengine/webengineviewer.cpp b/src/librssguard/gui/webviewers/webengine/webengineviewer.cpp index 46fa0d4d2..5280b7f5a 100644 --- a/src/librssguard/gui/webviewers/webengine/webengineviewer.cpp +++ b/src/librssguard/gui/webviewers/webengine/webengineviewer.cpp @@ -7,6 +7,7 @@ #include "gui/webbrowser.h" #include "miscellaneous/application.h" #include "miscellaneous/externaltool.h" +#include "miscellaneous/settings.h" #include "miscellaneous/skinfactory.h" #include "network-web/adblock/adblockicon.h" #include "network-web/adblock/adblockmanager.h" @@ -16,6 +17,7 @@ #include #include #include +#include #if QT_VERSION_MAJOR == 6 #include @@ -24,8 +26,6 @@ #include #endif -#include - WebEngineViewer::WebEngineViewer(QWidget* parent) : QWebEngineView(parent), m_browser(nullptr), m_root(nullptr) { WebEnginePage* page = new WebEnginePage(this); diff --git a/src/librssguard/miscellaneous/application.cpp b/src/librssguard/miscellaneous/application.cpp index d60af157e..330f94215 100644 --- a/src/librssguard/miscellaneous/application.cpp +++ b/src/librssguard/miscellaneous/application.cpp @@ -25,6 +25,7 @@ #include "miscellaneous/iofactory.h" #include "miscellaneous/mutex.h" #include "miscellaneous/notificationfactory.h" +#include "miscellaneous/settings.h" #include "network-web/adblock/adblockicon.h" #include "network-web/adblock/adblockmanager.h" #include "network-web/webfactory.h" @@ -692,7 +693,7 @@ void Application::showGuiMessageCore(Notification::Event event, m_toastNotifications->showNotification(event, msg, action); return; - if (SystemTrayIcon::areNotificationsEnabled()) { + if (m_notifications->areNotificationsEnabled()) { auto notification = m_notifications->notificationForEvent(event); notification.playSound(this); diff --git a/src/librssguard/miscellaneous/application.h b/src/librssguard/miscellaneous/application.h index d2c6711c7..41e333d30 100644 --- a/src/librssguard/miscellaneous/application.h +++ b/src/librssguard/miscellaneous/application.h @@ -12,7 +12,6 @@ #include "miscellaneous/localization.h" #include "miscellaneous/nodejs.h" #include "miscellaneous/notification.h" -#include "miscellaneous/settings.h" #include "miscellaneous/singleapplication.h" #include "miscellaneous/skinfactory.h" #include "miscellaneous/systemfactory.h" @@ -46,6 +45,7 @@ class WebFactory; class NotificationFactory; class ToastNotificationsManager; class WebViewer; +class Settings; #if defined(Q_OS_WIN) struct ITaskbarList4; diff --git a/src/librssguard/miscellaneous/externaltool.cpp b/src/librssguard/miscellaneous/externaltool.cpp index 542fdcdaa..725812349 100644 --- a/src/librssguard/miscellaneous/externaltool.cpp +++ b/src/librssguard/miscellaneous/externaltool.cpp @@ -5,6 +5,7 @@ #include "definitions/definitions.h" #include "exceptions/applicationexception.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include #include diff --git a/src/librssguard/miscellaneous/feedreader.cpp b/src/librssguard/miscellaneous/feedreader.cpp index c7f63cfd2..4e1fd627e 100644 --- a/src/librssguard/miscellaneous/feedreader.cpp +++ b/src/librssguard/miscellaneous/feedreader.cpp @@ -12,12 +12,12 @@ #include "gui/dialogs/formmessagefiltersmanager.h" #include "miscellaneous/application.h" #include "miscellaneous/mutex.h" +#include "miscellaneous/settings.h" #include "services/abstract/cacheforserviceroot.h" #include "services/abstract/serviceroot.h" #include "services/feedly/feedlyentrypoint.h" #include "services/gmail/gmailentrypoint.h" #include "services/greader/greaderentrypoint.h" -#include "services/newsblur/newsblurentrypoint.h" #include "services/owncloud/owncloudserviceentrypoint.h" #include "services/reddit/redditentrypoint.h" #include "services/standard/standardserviceentrypoint.h" @@ -65,7 +65,6 @@ QList FeedReader::feedServices() { m_feedServices.append(new OwnCloudServiceEntryPoint()); #if !defined(NDEBUG) - m_feedServices.append(new NewsBlurEntryPoint()); m_feedServices.append(new RedditEntryPoint()); #endif diff --git a/src/librssguard/miscellaneous/localization.cpp b/src/librssguard/miscellaneous/localization.cpp index 58f7ebb9e..c4e6ab9df 100644 --- a/src/librssguard/miscellaneous/localization.cpp +++ b/src/librssguard/miscellaneous/localization.cpp @@ -3,6 +3,7 @@ #include "miscellaneous/localization.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include #include diff --git a/src/librssguard/miscellaneous/notificationfactory.cpp b/src/librssguard/miscellaneous/notificationfactory.cpp index 79d3be60f..2b7a52ece 100644 --- a/src/librssguard/miscellaneous/notificationfactory.cpp +++ b/src/librssguard/miscellaneous/notificationfactory.cpp @@ -15,6 +15,14 @@ QList NotificationFactory::allNotifications() const { return m_notifications; } +bool NotificationFactory::areNotificationsEnabled() const { + return qApp->settings()->value(GROUP(GUI), SETTING(GUI::EnableNotifications)).toBool(); +} + +bool NotificationFactory::useToastNotifications() const { + return qApp->settings()->value(GROUP(GUI), SETTING(GUI::EnableNotifications)).toBool(); +} + Notification NotificationFactory::notificationForEvent(Notification::Event event) const { if (!qApp->settings()->value(GROUP(GUI), SETTING(GUI::EnableNotifications)).toBool()) { return Notification(); diff --git a/src/librssguard/miscellaneous/notificationfactory.h b/src/librssguard/miscellaneous/notificationfactory.h index 3ace5b49a..eb8ea8edb 100644 --- a/src/librssguard/miscellaneous/notificationfactory.h +++ b/src/librssguard/miscellaneous/notificationfactory.h @@ -18,9 +18,11 @@ class NotificationFactory : public QObject { QList allNotifications() const; Notification notificationForEvent(Notification::Event event) const; - public slots: + // Determines whether balloon tips are enabled or not. + bool areNotificationsEnabled() const; + bool useToastNotifications() const; - // Load saved notifications from settings + public slots: void load(Settings* settings); void save(const QList& new_notifications, Settings* settings); diff --git a/src/librssguard/miscellaneous/settings.cpp b/src/librssguard/miscellaneous/settings.cpp index 90b4a537a..f9f7d5996 100644 --- a/src/librssguard/miscellaneous/settings.cpp +++ b/src/librssguard/miscellaneous/settings.cpp @@ -285,6 +285,13 @@ DVALUE(bool) GUI::StatusBarVisibleDef = true; DKEY GUI::EnableNotifications = "enable_notifications"; DVALUE(bool) GUI::EnableNotificationsDef = true; +DKEY GUI::UseToastNotifications = "use_toast_notifications"; +DVALUE(bool) GUI::UseToastNotificationsDef = true; + +DKEY GUI::ToastNotificationsPosition = "toast_notifications_position"; +DVALUE(ToastNotificationsManager::NotificationPosition) +GUI::ToastNotificationsPositionDef = ToastNotificationsManager::NotificationPosition::BottomRight; + DKEY GUI::HideMainWindowWhenMinimized = "hide_when_minimized"; DVALUE(bool) GUI::HideMainWindowWhenMinimizedDef = false; diff --git a/src/librssguard/miscellaneous/settings.h b/src/librssguard/miscellaneous/settings.h index 81fd66941..986957273 100644 --- a/src/librssguard/miscellaneous/settings.h +++ b/src/librssguard/miscellaneous/settings.h @@ -7,6 +7,7 @@ #include "definitions/definitions.h" +#include "gui/notifications/toastnotificationsmanager.h" #include "miscellaneous/settingsproperties.h" #include "miscellaneous/textfactory.h" @@ -18,15 +19,15 @@ #include #include -#define KEY extern const QString -#define DKEY const QString -#define VALUE(x) extern const x -#define NON_CONST_VALUE(x) extern x -#define DVALUE(x) const x +#define KEY extern const QString +#define DKEY const QString +#define VALUE(x) extern const x +#define NON_CONST_VALUE(x) extern x +#define DVALUE(x) const x #define NON_CONST_DVALUE(x) x -#define SETTING(x) x, x##Def -#define DEFAULT_VALUE(x) x##Def -#define GROUP(x) x::ID +#define SETTING(x) x, x##Def +#define DEFAULT_VALUE(x) x##Def +#define GROUP(x) x::ID #if defined(USE_WEBENGINE) namespace WebEngineAttributes { @@ -218,6 +219,12 @@ namespace GUI { KEY EnableNotifications; VALUE(bool) EnableNotificationsDef; + KEY UseToastNotifications; + VALUE(bool) UseToastNotificationsDef; + + KEY ToastNotificationsPosition; + VALUE(ToastNotificationsManager::NotificationPosition) ToastNotificationsPositionDef; + KEY MessageViewState; VALUE(QString) MessageViewStateDef; diff --git a/src/librssguard/miscellaneous/skinfactory.cpp b/src/librssguard/miscellaneous/skinfactory.cpp index b66f96d3d..65cc0aa16 100644 --- a/src/librssguard/miscellaneous/skinfactory.cpp +++ b/src/librssguard/miscellaneous/skinfactory.cpp @@ -3,6 +3,7 @@ #include "miscellaneous/skinfactory.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "network-web/networkfactory.h" #include "services/abstract/rootitem.h" diff --git a/src/librssguard/miscellaneous/systemfactory.cpp b/src/librssguard/miscellaneous/systemfactory.cpp index 0eec0e116..9eb0c3ec7 100644 --- a/src/librssguard/miscellaneous/systemfactory.cpp +++ b/src/librssguard/miscellaneous/systemfactory.cpp @@ -7,6 +7,7 @@ #include "gui/dialogs/formmain.h" #include "gui/dialogs/formupdate.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "miscellaneous/systemfactory.h" #if defined(Q_OS_WIN) diff --git a/src/librssguard/miscellaneous/textfactory.cpp b/src/librssguard/miscellaneous/textfactory.cpp index 33ca50164..b1510f9d1 100644 --- a/src/librssguard/miscellaneous/textfactory.cpp +++ b/src/librssguard/miscellaneous/textfactory.cpp @@ -7,6 +7,7 @@ #include "exceptions/applicationexception.h" #include "miscellaneous/application.h" #include "miscellaneous/iofactory.h" +#include "miscellaneous/settings.h" #include #include diff --git a/src/librssguard/network-web/adblock/adblockdialog.cpp b/src/librssguard/network-web/adblock/adblockdialog.cpp index 3a326d2b1..ff7f1df86 100644 --- a/src/librssguard/network-web/adblock/adblockdialog.cpp +++ b/src/librssguard/network-web/adblock/adblockdialog.cpp @@ -10,6 +10,7 @@ #include "gui/messagebox.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "network-web/webfactory.h" #include diff --git a/src/librssguard/network-web/basenetworkaccessmanager.cpp b/src/librssguard/network-web/basenetworkaccessmanager.cpp index deb57f05d..294e7bf63 100644 --- a/src/librssguard/network-web/basenetworkaccessmanager.cpp +++ b/src/librssguard/network-web/basenetworkaccessmanager.cpp @@ -3,6 +3,7 @@ #include "network-web/basenetworkaccessmanager.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "network-web/webfactory.h" #include diff --git a/src/librssguard/network-web/webengine/webenginepage.cpp b/src/librssguard/network-web/webengine/webenginepage.cpp index e517679eb..054f8e4fc 100644 --- a/src/librssguard/network-web/webengine/webenginepage.cpp +++ b/src/librssguard/network-web/webengine/webenginepage.cpp @@ -5,6 +5,7 @@ #include "definitions/definitions.h" #include "gui/webviewers/webengine/webengineviewer.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "network-web/adblock/adblockmanager.h" #include "network-web/adblock/adblockrequestinfo.h" #include "network-web/webfactory.h" diff --git a/src/librssguard/network-web/webfactory.cpp b/src/librssguard/network-web/webfactory.cpp index c22895c06..568dc8efe 100644 --- a/src/librssguard/network-web/webfactory.cpp +++ b/src/librssguard/network-web/webfactory.cpp @@ -5,6 +5,7 @@ #include "gui/messagebox.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "network-web/adblock/adblockmanager.h" #include "network-web/cookiejar.h" #include "network-web/readability.h" diff --git a/src/librssguard/services/abstract/rootitem.cpp b/src/librssguard/services/abstract/rootitem.cpp index c3409e123..d1a836ad0 100644 --- a/src/librssguard/services/abstract/rootitem.cpp +++ b/src/librssguard/services/abstract/rootitem.cpp @@ -5,6 +5,7 @@ #include "3rd-party/boolinq/boolinq.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "services/abstract/category.h" #include "services/abstract/feed.h" #include "services/abstract/label.h" diff --git a/src/librssguard/services/feedly/feedlynetwork.cpp b/src/librssguard/services/feedly/feedlynetwork.cpp index 5febfa88b..25a1c0dfa 100644 --- a/src/librssguard/services/feedly/feedlynetwork.cpp +++ b/src/librssguard/services/feedly/feedlynetwork.cpp @@ -6,6 +6,7 @@ #include "database/databasequeries.h" #include "exceptions/networkexception.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "network-web/networkfactory.h" #include "network-web/webfactory.h" #include "services/abstract/category.h" diff --git a/src/librssguard/services/gmail/gmailnetworkfactory.cpp b/src/librssguard/services/gmail/gmailnetworkfactory.cpp index 43369333a..5e96bce8f 100644 --- a/src/librssguard/services/gmail/gmailnetworkfactory.cpp +++ b/src/librssguard/services/gmail/gmailnetworkfactory.cpp @@ -8,6 +8,7 @@ #include "exceptions/applicationexception.h" #include "exceptions/networkexception.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "miscellaneous/textfactory.h" #include "network-web/networkfactory.h" #include "network-web/oauth2service.h" diff --git a/src/librssguard/services/greader/greadernetwork.cpp b/src/librssguard/services/greader/greadernetwork.cpp index 17ed0a26c..27f3bece6 100644 --- a/src/librssguard/services/greader/greadernetwork.cpp +++ b/src/librssguard/services/greader/greadernetwork.cpp @@ -8,6 +8,7 @@ #include "exceptions/feedfetchexception.h" #include "exceptions/networkexception.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "network-web/networkfactory.h" #include "network-web/oauth2service.h" #include "network-web/webfactory.h" diff --git a/src/librssguard/services/newsblur/definitions.h b/src/librssguard/services/newsblur/definitions.h deleted file mode 100644 index 711ffb624..000000000 --- a/src/librssguard/services/newsblur/definitions.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef NEWSBLUR_DEFINITIONS_H -#define NEWSBLUR_DEFINITIONS_H - -// Misc. -#define NEWSBLUR_DEFAULT_BATCH_SIZE 500 -#define NEWSBLUS_AUTH_COOKIE "newsblur_sessionid" - -// URLs. -#define NEWSBLUR_URL "https://newsblur.com" - -// API. -#define NEWSBLUR_API_LOGIN "api/login" -#define NEWSBLUR_API_LOGOUT "api/logout" -#define NEWSBLUR_API_SIGNUP "api/signup" -#define NEWSBLUR_API_FEEDS "reader/feeds" - -#endif // NEWSBLUR_DEFINITIONS_H diff --git a/src/librssguard/services/newsblur/gui/formeditnewsbluraccount.cpp b/src/librssguard/services/newsblur/gui/formeditnewsbluraccount.cpp deleted file mode 100644 index 6ac1b4fc0..000000000 --- a/src/librssguard/services/newsblur/gui/formeditnewsbluraccount.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#include "services/newsblur/gui/formeditnewsbluraccount.h" - -#include "miscellaneous/iconfactory.h" -#include "services/newsblur/gui/newsbluraccountdetails.h" -#include "services/newsblur/newsblurnetwork.h" -#include "services/newsblur/newsblurserviceroot.h" - -FormEditNewsBlurAccount::FormEditNewsBlurAccount(QWidget* parent) - : FormAccountDetails(qApp->icons()->miscIcon(QSL("newsblur")), parent), m_details(new NewsBlurAccountDetails(this)) { - insertCustomTab(m_details, tr("Server setup"), 0); - activateTab(0); - - connect(m_details->m_ui.m_btnTestSetup, &QPushButton::clicked, this, &FormEditNewsBlurAccount::performTest); - - m_details->m_ui.m_txtUrl->setFocus(); -} - -void FormEditNewsBlurAccount::apply() { - FormAccountDetails::apply(); - - NewsBlurServiceRoot* existing_root = account(); - bool using_another_acc = m_details->m_ui.m_txtUsername->lineEdit()->text() != existing_root->network()->username() || - 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()->setUsername(m_details->m_ui.m_txtUsername->lineEdit()->text()); - existing_root->network()->setPassword(m_details->m_ui.m_txtPassword->lineEdit()->text()); - existing_root->network()->setBatchSize(m_details->m_ui.m_spinLimitMessages->value()); - existing_root->network()->setDownloadOnlyUnreadMessages(m_details->m_ui.m_cbDownloadOnlyUnreadMessages->isChecked()); - - existing_root->saveAccountDataToDatabase(); - accept(); - - if (!m_creatingNew) { - if (using_another_acc) { - existing_root->completelyRemoveAllData(); - } - - existing_root->start(true); - } -} - -void FormEditNewsBlurAccount::loadAccountData() { - FormAccountDetails::loadAccountData(); - - NewsBlurServiceRoot* existing_root = account(); - - m_details->m_ui.m_txtUsername->lineEdit()->setText(existing_root->network()->username()); - m_details->m_ui.m_txtPassword->lineEdit()->setText(existing_root->network()->password()); - m_details->m_ui.m_txtUrl->lineEdit()->setText(existing_root->network()->baseUrl()); - m_details->m_ui.m_spinLimitMessages->setValue(existing_root->network()->batchSize()); - m_details->m_ui.m_cbDownloadOnlyUnreadMessages->setChecked(existing_root->network()->downloadOnlyUnreadMessages()); -} - -void FormEditNewsBlurAccount::performTest() { - m_details->performTest(m_proxyDetails->proxy()); -} diff --git a/src/librssguard/services/newsblur/gui/formeditnewsbluraccount.h b/src/librssguard/services/newsblur/gui/formeditnewsbluraccount.h deleted file mode 100644 index 1871f8295..000000000 --- a/src/librssguard/services/newsblur/gui/formeditnewsbluraccount.h +++ /dev/null @@ -1,30 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#ifndef FORMEDITNEWSBLURACCOUNT_H -#define FORMEDITNEWSBLURACCOUNT_H - -#include "services/abstract/gui/formaccountdetails.h" - -class NewsBlurAccountDetails; -class NewsBlurServiceRoot; - -class FormEditNewsBlurAccount : public FormAccountDetails { - Q_OBJECT - - public: - explicit FormEditNewsBlurAccount(QWidget* parent = nullptr); - - protected slots: - virtual void apply(); - - protected: - virtual void loadAccountData(); - - private slots: - void performTest(); - - private: - NewsBlurAccountDetails* m_details; -}; - -#endif // FORMEDITNEWSBLURACCOUNT_H diff --git a/src/librssguard/services/newsblur/gui/newsbluraccountdetails.cpp b/src/librssguard/services/newsblur/gui/newsbluraccountdetails.cpp deleted file mode 100644 index 1c86a6975..000000000 --- a/src/librssguard/services/newsblur/gui/newsbluraccountdetails.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#include "services/newsblur/gui/newsbluraccountdetails.h" - -#include "definitions/definitions.h" -#include "exceptions/applicationexception.h" -#include "exceptions/networkexception.h" -#include "services/newsblur/newsblurnetwork.h" - -#include - -NewsBlurAccountDetails::NewsBlurAccountDetails(QWidget* parent) : QWidget(parent), m_lastProxy({}) { - m_ui.setupUi(this); - - m_ui.m_lblTestResult->label()->setWordWrap(true); - m_ui.m_txtPassword->lineEdit()->setPasswordMode(true); - m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your account")); - m_ui.m_txtUsername->lineEdit()->setPlaceholderText(tr("Username for your account")); - m_ui.m_txtUrl->lineEdit()->setPlaceholderText(tr("URL of your server, without any service-specific path")); - m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Information, - tr("No test done yet."), - tr("Here, results of connection test are shown.")); - - m_ui.m_lblLimitMessages->setHelpText(tr("Some feeds might contain tens of thousands of articles " - "and downloading all of them could take great amount of time, " - "so sometimes it is good to download " - "only certain amount of newest messages."), - true); - - connect(m_ui.m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &NewsBlurAccountDetails::onPasswordChanged); - connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &NewsBlurAccountDetails::onUsernameChanged); - connect(m_ui.m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &NewsBlurAccountDetails::onUrlChanged); - - setTabOrder(m_ui.m_txtUrl->lineEdit(), m_ui.m_cbDownloadOnlyUnreadMessages); - setTabOrder(m_ui.m_cbDownloadOnlyUnreadMessages, m_ui.m_spinLimitMessages); - setTabOrder(m_ui.m_spinLimitMessages, m_ui.m_txtUsername->lineEdit()); - setTabOrder(m_ui.m_txtUsername->lineEdit(), m_ui.m_txtPassword->lineEdit()); - setTabOrder(m_ui.m_txtPassword->lineEdit(), m_ui.m_btnTestSetup); - - onPasswordChanged(); - onUsernameChanged(); - onUrlChanged(); -} - -void NewsBlurAccountDetails::performTest(const QNetworkProxy& custom_proxy) { - m_lastProxy = custom_proxy; - - NewsBlurNetwork factory; - - factory.setUsername(m_ui.m_txtUsername->lineEdit()->text()); - factory.setPassword(m_ui.m_txtPassword->lineEdit()->text()); - factory.setBaseUrl(m_ui.m_txtUrl->lineEdit()->text()); - - try { - LoginResult result = factory.login(custom_proxy); - - if (result.m_authenticated && !result.m_sessiodId.isEmpty()) { - m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok, tr("You are good to go!"), tr("Yeah.")); - } - else { - throw ApplicationException(result.m_errors.join(QSL(", "))); - } - } - catch (const NetworkException& netEx) { - m_ui.m_lblTestResult - ->setStatus(WidgetWithStatus::StatusType::Error, - tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(netEx.networkError())), - tr("Network error, have you entered correct username and password?")); - } - catch (const ApplicationException& ex) { - m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error, - tr("Error: '%1'.").arg(ex.message()), - tr("Error, have you entered correct Nextcloud endpoint and password?")); - } -} - -void NewsBlurAccountDetails::onUsernameChanged() { - const QString username = m_ui.m_txtUsername->lineEdit()->text(); - - if (username.isEmpty()) { - m_ui.m_txtUsername->setStatus(WidgetWithStatus::StatusType::Error, tr("Username cannot be empty.")); - } - else { - m_ui.m_txtUsername->setStatus(WidgetWithStatus::StatusType::Ok, tr("Username is okay.")); - } -} - -void NewsBlurAccountDetails::onPasswordChanged() { - const QString password = m_ui.m_txtPassword->lineEdit()->text(); - - if (password.isEmpty()) { - m_ui.m_txtPassword->setStatus(WidgetWithStatus::StatusType::Error, tr("Password cannot be empty.")); - } - else { - m_ui.m_txtPassword->setStatus(WidgetWithStatus::StatusType::Ok, tr("Password is okay.")); - } -} - -void NewsBlurAccountDetails::onUrlChanged() { - const QString url = m_ui.m_txtUrl->lineEdit()->text(); - - if (url.isEmpty()) { - m_ui.m_txtUrl->setStatus(WidgetWithStatus::StatusType::Error, tr("URL cannot be empty.")); - } - else { - m_ui.m_txtUrl->setStatus(WidgetWithStatus::StatusType::Ok, tr("URL is okay.")); - } -} diff --git a/src/librssguard/services/newsblur/gui/newsbluraccountdetails.h b/src/librssguard/services/newsblur/gui/newsbluraccountdetails.h deleted file mode 100644 index 18fdeb3fa..000000000 --- a/src/librssguard/services/newsblur/gui/newsbluraccountdetails.h +++ /dev/null @@ -1,33 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#ifndef NEWSBLURACCOUNTDETAILS_H -#define NEWSBLURACCOUNTDETAILS_H - -#include - -#include "ui_newsbluraccountdetails.h" - -#include "services/newsblur/newsblurserviceroot.h" - -#include - -class NewsBlurAccountDetails : public QWidget { - Q_OBJECT - - friend class FormEditNewsBlurAccount; - - public: - explicit NewsBlurAccountDetails(QWidget* parent = nullptr); - - private slots: - void performTest(const QNetworkProxy& custom_proxy); - void onUsernameChanged(); - void onPasswordChanged(); - void onUrlChanged(); - - private: - Ui::NewsBlurAccountDetails m_ui; - QNetworkProxy m_lastProxy; -}; - -#endif // NEWSBLURACCOUNTDETAILS_H diff --git a/src/librssguard/services/newsblur/gui/newsbluraccountdetails.ui b/src/librssguard/services/newsblur/gui/newsbluraccountdetails.ui deleted file mode 100644 index 51378af47..000000000 --- a/src/librssguard/services/newsblur/gui/newsbluraccountdetails.ui +++ /dev/null @@ -1,163 +0,0 @@ - - - NewsBlurAccountDetails - - - - 0 - 0 - 430 - 281 - - - - - - - URL - - - m_txtUrl - - - - - - - - - - Download unread articles only - - - - - - - - - Only download newest X articles per feed - - - m_spinLimitMessages - - - - - - - - - - - - - - - - 0 - 0 - - - - Authentication - - - - - - Username - - - m_txtUsername - - - - - - - - - - Password - - - m_txtPassword - - - - - - - - - - - - - - - &Test setup - - - - - - - - 0 - 0 - - - - - - - - - - Qt::Vertical - - - - 409 - 60 - - - - - - - - - LabelWithStatus - QWidget -
labelwithstatus.h
- 1 -
- - LineEditWithStatus - QWidget -
lineeditwithstatus.h
- 1 -
- - MessageCountSpinBox - QSpinBox -
messagecountspinbox.h
-
- - HelpSpoiler - QWidget -
helpspoiler.h
- 1 -
-
- - m_cbDownloadOnlyUnreadMessages - m_spinLimitMessages - m_btnTestSetup - - - -
diff --git a/src/librssguard/services/newsblur/newsblurentrypoint.cpp b/src/librssguard/services/newsblur/newsblurentrypoint.cpp deleted file mode 100644 index 898deb464..000000000 --- a/src/librssguard/services/newsblur/newsblurentrypoint.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#include "services/newsblur/newsblurentrypoint.h" - -#include "database/databasequeries.h" -#include "definitions/definitions.h" -#include "miscellaneous/application.h" -#include "miscellaneous/iconfactory.h" -#include "services/newsblur/gui/formeditnewsbluraccount.h" -#include "services/newsblur/newsblurserviceroot.h" - -ServiceRoot* NewsBlurEntryPoint::createNewRoot() const { - FormEditNewsBlurAccount form_acc(qApp->mainFormWidget()); - - return form_acc.addEditAccount(); -} - -QList NewsBlurEntryPoint::initializeSubtree() const { - QSqlDatabase database = qApp->database()->driver()->connection(QSL("NewsBlurEntryPoint")); - - return DatabaseQueries::getAccounts(database, code()); -} - -QString NewsBlurEntryPoint::name() const { - return QSL("NewsBlur"); -} - -QString NewsBlurEntryPoint::code() const { - return QSL(SERVICE_CODE_NEWSBLUR); -} - -QString NewsBlurEntryPoint::description() const { - return QObject::tr("Personal news reader bringing people together to talk about the world."); -} - -QString NewsBlurEntryPoint::author() const { - return QSL(APP_AUTHOR); -} - -QIcon NewsBlurEntryPoint::icon() const { - return qApp->icons()->miscIcon(QSL("newsblur")); -} diff --git a/src/librssguard/services/newsblur/newsblurentrypoint.h b/src/librssguard/services/newsblur/newsblurentrypoint.h deleted file mode 100644 index 6e96a3422..000000000 --- a/src/librssguard/services/newsblur/newsblurentrypoint.h +++ /dev/null @@ -1,19 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#ifndef NEWSBLURENTRYPOINT_H -#define NEWSBLURENTRYPOINT_H - -#include "services/abstract/serviceentrypoint.h" - -class NewsBlurEntryPoint : public ServiceEntryPoint { - public: - virtual ServiceRoot* createNewRoot() const; - virtual QList initializeSubtree() const; - virtual QString name() const; - virtual QString code() const; - virtual QString description() const; - virtual QString author() const; - virtual QIcon icon() const; -}; - -#endif // NEWSBLURENTRYPOINT_H diff --git a/src/librssguard/services/newsblur/newsblurnetwork.cpp b/src/librssguard/services/newsblur/newsblurnetwork.cpp deleted file mode 100644 index 6daaa6c81..000000000 --- a/src/librssguard/services/newsblur/newsblurnetwork.cpp +++ /dev/null @@ -1,258 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#include "services/newsblur/newsblurnetwork.h" - -#include "3rd-party/boolinq/boolinq.h" -#include "exceptions/applicationexception.h" -#include "exceptions/networkexception.h" -#include "miscellaneous/application.h" -#include "network-web/networkfactory.h" -#include "services/abstract/category.h" -#include "services/newsblur/definitions.h" - -#include -#include -#include - -NewsBlurNetwork::NewsBlurNetwork(QObject* parent) - : QObject(parent), m_root(nullptr), m_username(QString()), m_password(QString()), m_baseUrl(QSL(NEWSBLUR_URL)), - m_batchSize(NEWSBLUR_DEFAULT_BATCH_SIZE), m_downloadOnlyUnreadMessages(false) { - clearCredentials(); -} - -RootItem* NewsBlurNetwork::categoriesFeedsLabelsTree(const QNetworkProxy& proxy) { - QJsonDocument json = feeds(proxy); - RootItem* root = new RootItem(); - const auto timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt(); - QMap cats; - QList> cats_array = {{root, json.object()["folders"].toArray()}}; - - while (!cats_array.isEmpty()) { - // Add direct descendants as categories to parent, then process their children. - QPair cats_for_parent = cats_array.takeFirst(); - - for (const QJsonValue& var : cats_for_parent.second) { - if (var.type() == QJsonValue::Type::Double) { - // We have feed. - Feed* feed = new Feed(); - - feed->setCustomId(QString::number(var.toInt())); - - QJsonObject feed_json = json.object()["feeds"].toObject()[feed->customId()].toObject(); - - feed->setTitle(feed_json["feed_title"].toString()); - feed->setSource(feed_json["feed_link"].toString()); - - QString favicon_url = feed_json["favicon_url"].toString(); - - if (!favicon_url.isEmpty()) { - QPixmap icon; - - if (NetworkFactory::downloadIcon({{favicon_url, true}}, timeout, icon, {}, proxy) == - QNetworkReply::NetworkError::NoError) { - feed->setIcon(icon); - } - } - - cats_for_parent.first->appendChild(feed); - } - else if (var.type() == QJsonValue::Type::Object) { - const QString category_name = var.toObject().keys().first(); - Category* category = new Category(); - - category->setTitle(category_name); - category->setCustomId(category_name); - - cats_for_parent.first->appendChild(category); - cats_array.append({category, var.toObject()[category_name].toArray()}); - } - } - } - - return root; -} - -QJsonDocument NewsBlurNetwork::feeds(const QNetworkProxy& proxy) { - ensureLogin(proxy); - - const QString full_url = generateFullUrl(Operations::Feeds); - const auto timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt(); - QByteArray output; - auto network_result = NetworkFactory::performNetworkOperation(full_url, - timeout, - {}, - output, - QNetworkAccessManager::Operation::GetOperation, - {}, - false, - {}, - {}, - proxy); - - if (network_result.m_networkError == QNetworkReply::NetworkError::NoError) { - ApiResult res; - res.decodeBaseResponse(output); - - return res.m_json; - } - else { - throw NetworkException(network_result.m_networkError, output); - } -} - -LoginResult NewsBlurNetwork::login(const QNetworkProxy& proxy) { - const QString full_url = generateFullUrl(Operations::Login); - const auto timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt(); - const QString data = QSL("username=%1&password=%2").arg(m_username, m_password); - QByteArray output; - auto network_result = - NetworkFactory::performNetworkOperation(full_url, - timeout, - data.toUtf8(), - output, - QNetworkAccessManager::Operation::PostOperation, - {{QSL(HTTP_HEADERS_CONTENT_TYPE).toLocal8Bit(), - QSL("application/x-www-form-urlencoded").toLocal8Bit()}}, - false, - {}, - {}, - proxy); - - if (network_result.m_networkError == QNetworkReply::NetworkError::NoError) { - LoginResult res; - res.decodeBaseResponse(output); - - res.m_userId = res.m_json.object()["user_id"].toInt(); - res.m_sessiodId = boolinq::from(network_result.m_cookies) - .firstOrDefault([](const QNetworkCookie& c) { - return c.name() == QSL(NEWSBLUS_AUTH_COOKIE); - }) - .value(); - - return res; - } - else { - throw NetworkException(network_result.m_networkError, output); - } -} - -QString NewsBlurNetwork::username() const { - return m_username; -} - -void NewsBlurNetwork::setUsername(const QString& username) { - m_username = username; -} - -QString NewsBlurNetwork::password() const { - return m_password; -} - -void NewsBlurNetwork::setPassword(const QString& password) { - m_password = password; -} - -QString NewsBlurNetwork::baseUrl() const { - return m_baseUrl; -} - -void NewsBlurNetwork::setBaseUrl(const QString& base_url) { - m_baseUrl = base_url; -} - -QPair NewsBlurNetwork::authHeader() const { - return {QSL("Cookie").toLocal8Bit(), QSL("newsblur_sessionid=%1").arg(m_authSid).toLocal8Bit()}; -} - -void NewsBlurNetwork::ensureLogin(const QNetworkProxy& proxy) { - if (m_authSid.isEmpty()) { - try { - auto log = login(proxy); - - if (log.m_authenticated && !log.m_sessiodId.isEmpty()) { - m_authSid = log.m_sessiodId; - } - else { - throw ApplicationException(log.m_errors.join(QSL(", "))); - } - } - catch (const NetworkException& ex) { - throw ex; - } - catch (const ApplicationException& ex) { - throw ex; - } - } -} - -int NewsBlurNetwork::batchSize() const { - return m_batchSize; -} - -void NewsBlurNetwork::setBatchSize(int batch_size) { - m_batchSize = batch_size; -} - -void NewsBlurNetwork::clearCredentials() { - m_authSid = QString{}; - m_userId = {}; -} - -QString NewsBlurNetwork::sanitizedBaseUrl() const { - QString base_url = m_baseUrl; - - if (!base_url.endsWith('/')) { - base_url = base_url + QL1C('/'); - } - - return base_url; -} - -QString NewsBlurNetwork::generateFullUrl(NewsBlurNetwork::Operations operation) const { - switch (operation) { - case Operations::Login: - return sanitizedBaseUrl() + QSL(NEWSBLUR_API_LOGIN); - - case Operations::Feeds: - return sanitizedBaseUrl() + QSL(NEWSBLUR_API_FEEDS); - - default: - return sanitizedBaseUrl(); - } -} - -void NewsBlurNetwork::setRoot(NewsBlurServiceRoot* root) { - m_root = root; -} - -bool NewsBlurNetwork::downloadOnlyUnreadMessages() const { - return m_downloadOnlyUnreadMessages; -} - -void NewsBlurNetwork::setDownloadOnlyUnreadMessages(bool download_only_unread) { - m_downloadOnlyUnreadMessages = download_only_unread; -} - -void ApiResult::decodeBaseResponse(const QByteArray& json_data) { - QJsonParseError err; - QJsonDocument doc = QJsonDocument::fromJson(json_data, &err); - - if (err.error != QJsonParseError::ParseError::NoError) { - throw ApplicationException(err.errorString()); - } - - m_json = doc; - m_authenticated = doc.object()["authenticated"].toBool(); - m_code = doc.object()["code"].toInt(); - - QStringList errs; - QJsonObject obj_errs = doc.object()["errors"].toObject(); - - for (const QString& key : obj_errs.keys()) { - for (const QJsonValue& val : obj_errs.value(key).toArray()) { - errs << val.toString(); - } - } - - m_errors = errs; -} diff --git a/src/librssguard/services/newsblur/newsblurnetwork.h b/src/librssguard/services/newsblur/newsblurnetwork.h deleted file mode 100644 index 179fd0a70..000000000 --- a/src/librssguard/services/newsblur/newsblurnetwork.h +++ /dev/null @@ -1,86 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#ifndef NEWSBLURNETWORK_H -#define NEWSBLURNETWORK_H - -#include - -#include "network-web/networkfactory.h" -#include "services/abstract/feed.h" -#include "services/newsblur/newsblurserviceroot.h" - -struct ApiResult { - bool m_authenticated; - int m_code; - QStringList m_errors; - QJsonDocument m_json; - - void decodeBaseResponse(const QByteArray& json_data); -}; - -struct LoginResult : ApiResult { - QString m_sessiodId; - int m_userId; -}; - -class NewsBlurNetwork : public QObject { - Q_OBJECT - - public: - enum class Operations { - Login, - Feeds - }; - - explicit NewsBlurNetwork(QObject* parent = nullptr); - - // Convenience methods. - RootItem* categoriesFeedsLabelsTree(const QNetworkProxy& proxy); - - // API. - QJsonDocument feeds(const QNetworkProxy& proxy); - - // Misc. - void clearCredentials(); - - QString username() const; - void setUsername(const QString& username); - - QString password() const; - void setPassword(const QString& password); - - QString baseUrl() const; - void setBaseUrl(const QString& base_url); - - int batchSize() const; - void setBatchSize(int batch_size); - - bool downloadOnlyUnreadMessages() const; - void setDownloadOnlyUnreadMessages(bool download_only_unread); - - void setRoot(NewsBlurServiceRoot* root); - - // API methods. - LoginResult login(const QNetworkProxy& proxy); - - private: - QPair authHeader() const; - - // Make sure we are logged in and if we are not, throw exception. - void ensureLogin(const QNetworkProxy& proxy); - - QString sanitizedBaseUrl() const; - QString generateFullUrl(Operations operation) const; - - private: - NewsBlurServiceRoot* m_root; - QString m_username; - QString m_password; - QString m_baseUrl; - int m_batchSize; - bool m_downloadOnlyUnreadMessages; - QString m_authSid; - int m_userId; -}; - -#endif // NEWSBLURNETWORK_H diff --git a/src/librssguard/services/newsblur/newsblurserviceroot.cpp b/src/librssguard/services/newsblur/newsblurserviceroot.cpp deleted file mode 100644 index 02398e2e8..000000000 --- a/src/librssguard/services/newsblur/newsblurserviceroot.cpp +++ /dev/null @@ -1,138 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#include "services/newsblur/newsblurserviceroot.h" - -#include "database/databasequeries.h" -#include "definitions/definitions.h" -#include "exceptions/feedfetchexception.h" -#include "miscellaneous/application.h" -#include "miscellaneous/textfactory.h" -#include "services/newsblur/gui/formeditnewsbluraccount.h" -#include "services/newsblur/newsblurentrypoint.h" -#include "services/newsblur/newsblurnetwork.h" - -NewsBlurServiceRoot::NewsBlurServiceRoot(RootItem* parent) : ServiceRoot(parent), m_network(new NewsBlurNetwork(this)) { - m_network->setRoot(this); - setIcon(NewsBlurEntryPoint().icon()); -} - -bool NewsBlurServiceRoot::isSyncable() const { - return true; -} - -bool NewsBlurServiceRoot::canBeEdited() const { - return true; -} - -bool NewsBlurServiceRoot::editViaGui() { - FormEditNewsBlurAccount form_pointer(qApp->mainFormWidget()); - - form_pointer.addEditAccount(this); - return true; -} - -QVariantHash NewsBlurServiceRoot::customDatabaseData() const { - QVariantHash data; - - data[QSL("username")] = m_network->username(); - data[QSL("password")] = TextFactory::encrypt(m_network->password()); - data[QSL("url")] = m_network->baseUrl(); - - return data; -} - -void NewsBlurServiceRoot::setCustomDatabaseData(const QVariantHash& data) { - m_network->setUsername(data[QSL("username")].toString()); - m_network->setPassword(TextFactory::decrypt(data[QSL("password")].toString())); - m_network->setBaseUrl(data[QSL("url")].toString()); -} - -QList NewsBlurServiceRoot::obtainNewMessages(Feed* feed, - const QHash& - stated_messages, - const QHash& tagged_messages) { - Feed::Status error = Feed::Status::Normal; - QList msgs; - - // TODO:: - - if (error != Feed::Status::NewMessages && error != Feed::Status::Normal) { - throw FeedFetchException(error); - } - else { - return msgs; - } -} - -void NewsBlurServiceRoot::start(bool freshly_activated) { - if (!freshly_activated) { - DatabaseQueries::loadRootFromDatabase(this); - loadCacheFromFile(); - } - - updateTitleIcon(); - - if (getSubTreeFeeds().isEmpty()) { - syncIn(); - } -} - -QString NewsBlurServiceRoot::code() const { - return NewsBlurEntryPoint().code(); -} - -void NewsBlurServiceRoot::saveAllCachedData(bool ignore_errors) { - auto msg_cache = takeMessageCache(); - QMapIterator i(msg_cache.m_cachedStatesRead); - - /* - // Save the actual data read/unread. - while (i.hasNext()) { - i.next(); - auto key = i.key(); - QStringList ids = i.value(); - - if (!ids.isEmpty()) { - if (network()->markMessagesRead(key, ids, networkProxy()) != QNetworkReply::NetworkError::NoError && - !ignore_errors) { - addMessageStatesToCache(ids, key); - } - } - } - - QMapIterator> j(msg_cache.m_cachedStatesImportant); - - // Save the actual data important/not important. - while (j.hasNext()) { - j.next(); - auto key = j.key(); - QList messages = j.value(); - - if (!messages.isEmpty()) { - QStringList custom_ids; custom_ids.reserve(messages.size()); - - for (const Message& msg : messages) { - custom_ids.append(msg.m_customId); - } - - if (network()->markMessagesStarred(key, custom_ids, networkProxy()) != QNetworkReply::NetworkError::NoError && - !ignore_errors) { - addMessageStatesToCache(messages, key); - } - } - } - */ -} - -ServiceRoot::LabelOperation NewsBlurServiceRoot::supportedLabelOperations() const { - return ServiceRoot::LabelOperation::Synchronised; -} - -void NewsBlurServiceRoot::updateTitleIcon() { - setTitle(QSL("%1 (%2)").arg(m_network->username(), NewsBlurEntryPoint().name())); -} - -RootItem* NewsBlurServiceRoot::obtainNewTreeForSyncIn() const { - return m_network->categoriesFeedsLabelsTree(networkProxy()); - ; -} diff --git a/src/librssguard/services/newsblur/newsblurserviceroot.h b/src/librssguard/services/newsblur/newsblurserviceroot.h deleted file mode 100644 index 60ec2fc46..000000000 --- a/src/librssguard/services/newsblur/newsblurserviceroot.h +++ /dev/null @@ -1,46 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#ifndef NEWSBLURSERVICEROOT_H -#define NEWSBLURSERVICEROOT_H - -#include "services/abstract/cacheforserviceroot.h" -#include "services/abstract/serviceroot.h" - -class NewsBlurNetwork; - -class NewsBlurServiceRoot : public ServiceRoot, public CacheForServiceRoot { - Q_OBJECT - - public: - explicit NewsBlurServiceRoot(RootItem* parent = nullptr); - - virtual bool isSyncable() const; - virtual bool canBeEdited() const; - virtual bool editViaGui(); - virtual void start(bool freshly_activated); - virtual QString code() const; - virtual void saveAllCachedData(bool ignore_errors); - virtual LabelOperation supportedLabelOperations() const; - virtual QVariantHash customDatabaseData() const; - virtual void setCustomDatabaseData(const QVariantHash& data); - virtual QList obtainNewMessages(Feed* feed, - const QHash& stated_messages, - const QHash& tagged_messages); - - NewsBlurNetwork* network() const; - - protected: - virtual RootItem* obtainNewTreeForSyncIn() const; - - private: - void updateTitleIcon(); - - private: - NewsBlurNetwork* m_network; -}; - -inline NewsBlurNetwork* NewsBlurServiceRoot::network() const { - return m_network; -} - -#endif // NEWSBLURSERVICEROOT_H diff --git a/src/librssguard/services/reddit/redditnetworkfactory.cpp b/src/librssguard/services/reddit/redditnetworkfactory.cpp index 0ad80c1ef..893edf26c 100644 --- a/src/librssguard/services/reddit/redditnetworkfactory.cpp +++ b/src/librssguard/services/reddit/redditnetworkfactory.cpp @@ -7,6 +7,7 @@ #include "exceptions/applicationexception.h" #include "exceptions/networkexception.h" #include "miscellaneous/application.h" +#include "miscellaneous/settings.h" #include "network-web/networkfactory.h" #include "network-web/oauth2service.h" #include "services/reddit/definitions.h" diff --git a/src/librssguard/services/tt-rss/ttrssnetworkfactory.cpp b/src/librssguard/services/tt-rss/ttrssnetworkfactory.cpp index 2e3fe27fc..5a50bafa0 100644 --- a/src/librssguard/services/tt-rss/ttrssnetworkfactory.cpp +++ b/src/librssguard/services/tt-rss/ttrssnetworkfactory.cpp @@ -7,6 +7,7 @@ #include "exceptions/feedfetchexception.h" #include "miscellaneous/application.h" #include "miscellaneous/iconfactory.h" +#include "miscellaneous/settings.h" #include "miscellaneous/textfactory.h" #include "network-web/networkfactory.h" #include "services/abstract/category.h"