Debian Codegraph @

src/librssguard/core/feeddownloader.cpp

raw symbols SCIP
1 // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/core/feeddownloader.cpp`/
2
3 #include "core/feeddownloader.h"cxx . . $ `<file>/src/librssguard/core/feeddownloader.h`/
4
5 #include "3rd-party/boolinq/boolinq.h"cxx . . $ `<file>/src/librssguard/3rd-party/boolinq/boolinq.h`/
6 #include "core/messagefilter.h"cxx . . $ `<file>/src/librssguard/core/messagefilter.h`/
7 #include "database/databasequeries.h"cxx . . $ `<file>/src/librssguard/database/databasequeries.h`/
8 #include "definitions/definitions.h"cxx . . $ `<file>/src/librssguard/definitions/definitions.h`/
9 #include "exceptions/feedfetchexception.h"cxx . . $ `<file>/src/librssguard/exceptions/feedfetchexception.h`/
10 #include "exceptions/filteringexception.h"cxx . . $ `<file>/src/librssguard/exceptions/filteringexception.h`/
11 #include "miscellaneous/application.h"cxx . . $ `<file>/src/librssguard/miscellaneous/application.h`/
12 #include "miscellaneous/settings.h"cxx . . $ `<file>/src/librssguard/miscellaneous/settings.h`/
13 #include "miscellaneous/thread.h"cxx . . $ `<file>/src/librssguard/miscellaneous/thread.h`/
14 #include "services/abstract/cacheforserviceroot.h"cxx . . $ `<file>/src/librssguard/services/abstract/cacheforserviceroot.h`/
15 #include "services/abstract/feed.h"cxx . . $ `<file>/src/librssguard/services/abstract/feed.h`/
16 #include "services/abstract/labelsnode.h"cxx . . $ `<file>/src/librssguard/services/abstract/labelsnode.h`/
17
18 #include <QDebug>
19 #include <QJSEngine>
20 #include <QString>
21 #include <QtConcurrentMap>
22
23 FeedDownloadercxx . . $ FeedDownloader#::FeedDownloadercxx . . $ FeedDownloader#FeedDownloader(49f6e7a06ebc5aa8).()
24 : QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(), m_isCacheSynchronizationRunningcxx . . $ FeedDownloader#m_isCacheSynchronizationRunning.(false), m_stopCacheSynchronizationcxx . . $ FeedDownloader#m_stopCacheSynchronization.(false) {
25 qRegisterMetaTypecxx . . $ qRegisterMetaType(5c4306d8553b3696).<FeedDownloadResultscxx . . $ FeedDownloadResults#>("FeedDownloadResults");
26
27 connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(&m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup., &QFutureWatchercxx . . $ QFutureWatcher#<FeedUpdateResult>::resultReadyAtcxx . . $ QFutureWatcherBase#resultReadyAt(d4f767463ce0a6b3)., this, [=](int idx) {
28 FeedUpdateResultcxx . . $ FeedUpdateResult# res = m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup..resultAtcxx . . $ QFutureWatcher#resultAt(b4be2ec6940d8d62).(idx);
29
30 emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! updateProgresscxx . . $ FeedDownloader#updateProgress(e8151f2ee217e1b7).(res.feedcxx . . $ FeedUpdateResult#feed., m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup..progressValuecxx . . $ QFutureWatcherBase#progressValue(455f465bc33b4cdf).(), m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup..progressMaximumcxx . . $ QFutureWatcherBase#progressMaximum(455f465bc33b4cdf).());
31 });
32 connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(&m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup., &QFutureWatchercxx . . $ QFutureWatcher#<FeedUpdateResult>::finishedcxx . . $ QFutureWatcherBase#finished(49f6e7a06ebc5aa8)., this, [=]() {
33 finalizeUpdatecxx . . $ FeedDownloader#finalizeUpdate(49f6e7a06ebc5aa8).();
34 });
35 }
36
37 FeedDownloadercxx . . $ FeedDownloader#::~cxx . . $ FeedDownloader#`~FeedDownloader`(ced63f7c635d850d).FeedDownloadercxx . . $ FeedDownloader#() {
38 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Destroying FeedDownloader instance.";
39 }
40
41 bool FeedDownloadercxx . . $ FeedDownloader#::isUpdateRunningcxx . . $ FeedDownloader#isUpdateRunning(50ce9a9e25b4a850).() const {
42 return !m_feedscxx . . $ FeedDownloader#m_feeds..isEmptycxx . . $ QList#isEmpty(3482b152b9333168).();
43 }
44
45 void FeedDownloadercxx . . $ FeedDownloader#::synchronizeAccountCachescxx . . $ FeedDownloader#synchronizeAccountCaches(2e643a133ad38d24).(const QListcxx . . $ QList#<CacheForServiceRootcxx . . $ CacheForServiceRoot#*>& caches, bool emit_signals) {
46 m_isCacheSynchronizationRunningcxx . . $ FeedDownloader#m_isCacheSynchronizationRunning. = true;
47
48 for (CacheForServiceRootcxx . . $ CacheForServiceRoot#* cache : caches) {
49 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Synchronizing cache back to server on thread"
50 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(getThreadID());
51 cache->saveAllCachedDatacxx . . $ CacheForServiceRoot#saveAllCachedData(b45ddcbc8423892c).(false);
52
53 if (m_stopCacheSynchronizationcxx . . $ FeedDownloader#m_stopCacheSynchronization.) {
54 qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Aborting cache synchronization.";
55
56 m_stopCacheSynchronizationcxx . . $ FeedDownloader#m_stopCacheSynchronization. = false;
57 break;
58 }
59 }
60
61 m_isCacheSynchronizationRunningcxx . . $ FeedDownloader#m_isCacheSynchronizationRunning. = false;
62 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "All caches synchronized.";
63
64 if (emit_signals) {
65 emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! cachesSynchronizedcxx . . $ FeedDownloader#cachesSynchronized(49f6e7a06ebc5aa8).();
66 }
67 }
68
69 void FeedDownloadercxx . . $ FeedDownloader#::updateFeedscxx . . $ FeedDownloader#updateFeeds(bcc73982dd0bdfc6).(const QListcxx . . $ QList#<Feedcxx . . $ Feed#*>& feeds) {
70 m_erroredAccountscxx . . $ FeedDownloader#m_erroredAccounts..clearcxx . . $ QHash#clear(7d74265ff1b37f0c).();
71 m_resultscxx . . $ FeedDownloader#m_results..clearcxx . . $ FeedDownloadResults#clear(49f6e7a06ebc5aa8).();
72 m_feedscxx . . $ FeedDownloader#m_feeds..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
73
74 if (feeds.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) {
75 qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "No feeds to update in worker thread, aborting update.";
76 finalizeUpdatecxx . . $ FeedDownloader#finalizeUpdate(49f6e7a06ebc5aa8).();
77 }
78 else {
79 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Starting feed updates from worker in thread"
80 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(getThreadID());
81
82 // Job starts now.
83 emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! updateStartedcxx . . $ FeedDownloader#updateStarted(49f6e7a06ebc5aa8).();
84 QSetcxx . . $ QSet#<CacheForServiceRootcxx . . $ CacheForServiceRoot#*> cachescxx . . $ QSet#QSet(ced63f7c635d850d).;
85 QMultiHashcxx . . $ QMultiHash#<ServiceRootcxx . . $ ServiceRoot#*, Feedcxx . . $ Feed#*> feeds_per_rootcxx . . $ QMultiHash#QMultiHash(ced63f7c635d850d).;
86
87 for (auto* fd : feeds) {
88 CacheForServiceRootcxx . . $ CacheForServiceRoot#* fd_cache = fd->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).()->toCachecxx . . $ ServiceRoot#toCache(3a91035457800c8).();
89
90 if (fd_cache != nullptr) {
91 caches.insertcxx . . $ QSet#insert(b1720532d625d779).(fd_cache);
92 }
93
94 feeds_per_root.insertcxx . . $ QMultiHash#insert(eb6bb427bb63fb7b).(fd->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).(), fd);
95 }
96
97 synchronizeAccountCachescxx . . $ FeedDownloader#synchronizeAccountCaches(2e643a133ad38d24).(caches.valuescxx . . $ QSet#values(bf6c511543d55010).(), false);
98
99 auto roots = feeds_per_root.uniqueKeyscxx . . $ QMultiHash#uniqueKeys(bf6c511543d55010).();
100 QSqlDatabasecxx . . $ QSqlDatabase# database = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->databasecxx . . $ Application#database(4a253a6ca99872d8).()->drivercxx . . $ DatabaseFactory#driver(5299be7c9afd522d).()->threadSafeConnectioncxx . . $ DatabaseDriver#threadSafeConnection(32d6d64cc6e35a97).(metaObjectcxx . . $ QString#QString(85c52e162fed56f9).()->classNamecxx . . $ QMetaObject#className(a9f41ea0e82d88cf).());
101
102 for (auto* rt : roots) {
103 auto fds = scrambleFeedsWithSameHostcxx . . $ FeedDownloader#scrambleFeedsWithSameHost(e0832f638b4904d0).(feeds_per_root.valuescxx . . $ QMultiHash#values(8fb875fcb58d4a3b).(rt));
104
105 QHashcxx . . $ QHash#<QStringcxx . . $ QString#, QStringListcxx . . $ QStringList#> per_acc_tagscxx . . $ QHash#QHash(ced63f7c635d850d).;
106 QHashcxx . . $ QHash#<QStringcxx . . $ QString#, QHashcxx . . $ QHash#<ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#, QStringListcxx . . $ QStringList#>> per_acc_statescxx . . $ QHash#QHash(ced63f7c635d850d).;
107
108 // Obtain lists of local IDs.
109 if (rt->wantsBaggedIdsOfExistingMessagescxx . . $ ServiceRoot#wantsBaggedIdsOfExistingMessages(50ce9a9e25b4a850).()) {
110 // Tags per account.
111 per_acc_tags =cxx . . $ QHash#`operator=`(f42539bc4a72b04b). DatabaseQueriescxx . . $ DatabaseQueries#::bagsOfMessagescxx . . $ DatabaseQueries#bagsOfMessages(2e507a8771a94db8).(database, rt->labelsNodecxx . . $ ServiceRoot#labelsNode(b773463470738eab).()->labelscxx . . $ LabelsNode#labels(fd3f29dd0362ab36).());
112
113 // This account has activated intelligent downloading of messages.
114 // Prepare bags.
115 for (Feedcxx . . $ Feed#* fd : fds) {
116 QHashcxx . . $ QHash#<ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#, QStringListcxx . . $ QStringList#> per_feed_statescxx . . $ QHash#QHash(ced63f7c635d850d).;
117
118 per_feed_states.insertcxx . . $ QHash#insert(d77b19c31d2eb147).(ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#::Readcxx . . $ ServiceRoot#BagOfMessages#Read.,
119 DatabaseQueriescxx . . $ DatabaseQueries#::bagOfMessagescxx . . $ DatabaseQueries#bagOfMessages(d4ba91b55bc39312).(database, ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#::Readcxx . . $ ServiceRoot#BagOfMessages#Read., fd));
120 per_feed_states.insertcxx . . $ QHash#insert(d77b19c31d2eb147).(ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#::Unreadcxx . . $ ServiceRoot#BagOfMessages#Unread.,
121 DatabaseQueriescxx . . $ DatabaseQueries#::bagOfMessagescxx . . $ DatabaseQueries#bagOfMessages(d4ba91b55bc39312).(database, ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#::Unreadcxx . . $ ServiceRoot#BagOfMessages#Unread., fd));
122 per_feed_states.insertcxx . . $ QHash#insert(d77b19c31d2eb147).(ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#::Starredcxx . . $ ServiceRoot#BagOfMessages#Starred.,
123 DatabaseQueriescxx . . $ DatabaseQueries#::bagOfMessagescxx . . $ DatabaseQueries#bagOfMessages(d4ba91b55bc39312).(database, ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#::Starredcxx . . $ ServiceRoot#BagOfMessages#Starred., fd));
124
125 per_acc_states.insertcxx . . $ QHash#insert(d77b19c31d2eb147).(fd->customIdcxx . . $ RootItem#customId(6ef7b6c27b00b43d).(), per_feed_states);
126
127 FeedUpdateRequestcxx . . $ FeedUpdateRequest# fu;
128
129 fu.accountcxx . . $ FeedUpdateRequest#account. = rt;
130 fu.feedcxx . . $ FeedUpdateRequest#feed. = fd;
131 fu.stated_messagescxx . . $ FeedUpdateRequest#stated_messages. =cxx . . $ QHash#`operator=`(b389532fb067fae5). per_feed_states;
132 fu.tagged_messagescxx . . $ FeedUpdateRequest#tagged_messages. =cxx . . $ QHash#`operator=`(b389532fb067fae5). per_acc_tags;
133
134 m_feedscxx . . $ FeedDownloader#m_feeds..appendcxx . . $ QList#append(200d2dc08238a4ed).(fu);
135 }
136 }
137 else {
138 for (Feedcxx . . $ Feed#* fd : fds) {
139 FeedUpdateRequestcxx . . $ FeedUpdateRequest# fu;
140
141 fu.accountcxx . . $ FeedUpdateRequest#account. = rt;
142 fu.feedcxx . . $ FeedUpdateRequest#feed. = fd;
143
144 m_feedscxx . . $ FeedDownloader#m_feeds..appendcxx . . $ QList#append(200d2dc08238a4ed).(fu);
145 }
146 }
147
148 try {
149 rt->aboutToBeginFeedFetchingcxx . . $ ServiceRoot#aboutToBeginFeedFetching(98bf0ea000ca8bc1).(fds, per_acc_states, per_acc_tags);
150 }
151 catch (const ApplicationExceptioncxx . . $ ApplicationException#& ex) {
152 // Common error showed, all feeds from the root are errored now!
153 m_erroredAccountscxx . . $ FeedDownloader#m_erroredAccounts..insertcxx . . $ QHash#insert(d77b19c31d2eb147).(rt, ex);
154 }
155 }
156
157 stdcxx . . $ std/::functioncxx . . $ std/function#<FeedUpdateResultcxx . . $ FeedUpdateResult#(const FeedUpdateRequestcxx . . $ FeedUpdateRequest#&)> func =
158 [cxx . . $ std/function#function(bdc3712e480e4d04).=](const FeedUpdateRequestcxx . . $ FeedUpdateRequest#& fd) -> FeedUpdateResultcxx . . $ FeedUpdateResult# {
159 #if defined(Q_OS_LINUXcxx . . $ `/usr/include/x86_64-linux-gnu/qt6/QtCore/qsystemdetection.h:100:11`!)
160 setThreadPrioritycxx . . $ setThreadPriority(ec92b42880e59c63).(Prioritycxx . . $ Priority#::Lowestcxx . . $ Lowest.);
161 #endif
162 return updateThreadedFeedcxx . . $ FeedDownloader#updateThreadedFeed(12bca8576c8289ee).(fd);
163 };
164
165 m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup..setFuturecxx . . $ QFutureWatcher#setFuture(a9264f6bda4df76f).(QtConcurrentcxx . . $ QtConcurrent/::mappedcxx . . $ QtConcurrent/mapped(c7f37934ccddc889).(
166 #if QT_VERSION_MAJORcxx . . $ `<external>/9758848313111604122/qconfig.h:67:9`! > 5
167 qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->workHorsePoolcxx . . $ Application#workHorsePool(a728214f96070c42).(),
168 #endif
169 m_feedscxx . . $ FeedDownloader#m_feeds.,
170 func));
171 }
172 }
173
174 void FeedDownloadercxx . . $ FeedDownloader#::clearFeedOverloadcxx . . $ FeedDownloader#clearFeedOverload(1b149201450d1fc7).(Feedcxx . . $ Feed#* feed) {
175 m_overloadedHostscxx . . $ FeedDownloader#m_overloadedHosts..removecxx . . $ QHash#remove(fe1ba53999e710f3).(QUrlcxx . . $ QUrl#QUrl(ea1f3831e370f1cb).(feed->sourcecxx . . $ Feed#source(6ef7b6c27b00b43d).()).hostcxx . . $ QUrl#host(9d7420bec8bfe6c9).());
176 }
177
178 bool FeedDownloadercxx . . $ FeedDownloader#::checkIfFeedOverloadedcxx . . $ FeedDownloader#checkIfFeedOverloaded(14f6d7470dca483).(Feedcxx . . $ Feed#* feed) const {
179 QStringcxx . . $ QString# hostname = QUrlcxx . . $ QUrl#QUrl(ea1f3831e370f1cb).(feed->sourcecxx . . $ Feed#source(6ef7b6c27b00b43d).()).hostcxx . . $ QUrl#host(9d7420bec8bfe6c9).();
180 QDateTimecxx . . $ QDateTime# retry_after = m_overloadedHostscxx . . $ FeedDownloader#m_overloadedHosts..valuecxx . . $ QHash#value(5f65a9ee2c9899ff).(hostname);
181
182 return retry_after.isValidcxx . . $ QDateTime#isValid(50ce9a9e25b4a850).() && retry_after >cxx . . $ `operator>`(ae3dca24290d889b). QDateTimecxx . . $ QDateTime#::currentDateTimeUtccxx . . $ QDateTime#currentDateTimeUtc(bf5129c8228c71c0).();
183 }
184
185 FeedUpdateResultcxx . . $ FeedUpdateResult# FeedDownloadercxx . . $ FeedDownloader#::updateThreadedFeedcxx . . $ FeedDownloader#updateThreadedFeed(12bca8576c8289ee).(const FeedUpdateRequestcxx . . $ FeedUpdateRequest#& fd) {
186 if (m_erroredAccountscxx . . $ FeedDownloader#m_erroredAccounts..containscxx . . $ QHash#contains(5247d2cea5ab73ba).(fd.accountcxx . . $ FeedUpdateRequest#account.)) {
187 // This feed is errored because its account errored when preparing feed update.
188 ApplicationExceptioncxx . . $ ApplicationException# root_ex = m_erroredAccountscxx . . $ FeedDownloader#m_erroredAccounts..valuecxx . . $ QHash#value(5f65a9ee2c9899ff).(fd.accountcxx . . $ FeedUpdateRequest#account.);
189
190 skipFeedUpdateWithErrorcxx . . $ FeedDownloader#skipFeedUpdateWithError(c7206e2ca8047bef).(fd.accountcxx . . $ FeedUpdateRequest#account., fd.feedcxx . . $ FeedUpdateRequest#feed., root_ex);
191 }
192 else {
193 updateOneFeedcxx . . $ FeedDownloader#updateOneFeed(42cca584b6e50687).(fd.accountcxx . . $ FeedUpdateRequest#account., fd.feedcxx . . $ FeedUpdateRequest#feed., fd.stated_messagescxx . . $ FeedUpdateRequest#stated_messages., fd.tagged_messagescxx . . $ FeedUpdateRequest#tagged_messages.);
194 }
195
196 fd.feedcxx . . $ FeedUpdateRequest#feed.->setLastUpdatedcxx . . $ Feed#setLastUpdated(3672ecc950120406).(QDateTimecxx . . $ QDateTime#::currentDateTimeUtccxx . . $ QDateTime#currentDateTimeUtc(bf5129c8228c71c0).());
197
198 FeedUpdateResultcxx . . $ FeedUpdateResult# res;
199
200 res.feedcxx . . $ FeedUpdateResult#feed. = fd.feedcxx . . $ FeedUpdateRequest#feed.;
201
202 return res;
203 }
204
205 void FeedDownloadercxx . . $ FeedDownloader#::skipFeedUpdateWithErrorcxx . . $ FeedDownloader#skipFeedUpdateWithError(c7206e2ca8047bef).(ServiceRootcxx . . $ ServiceRoot#* acc, Feedcxx . . $ Feed#* feed, const ApplicationExceptioncxx . . $ ApplicationException#& ex) {
206 const FeedFetchExceptioncxx . . $ FeedFetchException#* fetch_ex = dynamic_cast<const FeedFetchExceptioncxx . . $ FeedFetchException#*>(&ex);
207
208 if (fetch_ex != nullptr) {
209 feed->setStatuscxx . . $ Feed#setStatus(999e77df611af5d5).(fetch_ex->feedStatuscxx . . $ FeedFetchException#feedStatus(3ef043b41d362a5c).(), fetch_ex->messagecxx . . $ ApplicationException#message(6ef7b6c27b00b43d).());
210 }
211 else {
212 feed->setStatuscxx . . $ Feed#setStatus(999e77df611af5d5).(Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status#::OtherErrorcxx . . $ Feed#Status#OtherError., ex.messagecxx . . $ ApplicationException#message(6ef7b6c27b00b43d).());
213 }
214 }
215
216 void FeedDownloadercxx . . $ FeedDownloader#::stopRunningUpdatecxx . . $ FeedDownloader#stopRunningUpdate(49f6e7a06ebc5aa8).() {
217 m_stopCacheSynchronizationcxx . . $ FeedDownloader#m_stopCacheSynchronization. = true;
218
219 m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup..cancelcxx . . $ QFutureWatcherBase#cancel(49f6e7a06ebc5aa8).();
220 m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup..waitForFinishedcxx . . $ QFutureWatcherBase#waitForFinished(49f6e7a06ebc5aa8).();
221
222 m_feedscxx . . $ FeedDownloader#m_feeds..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
223 }
224
225 void FeedDownloadercxx . . $ FeedDownloader#::updateOneFeedcxx . . $ FeedDownloader#updateOneFeed(42cca584b6e50687).(ServiceRootcxx . . $ ServiceRoot#* acc,
226 Feedcxx . . $ Feed#* feed,
227 const QHashcxx . . $ QHash#<ServiceRootcxx . . $ ServiceRoot#::BagOfMessagescxx . . $ ServiceRoot#BagOfMessages#, QStringListcxx . . $ QStringList#>& stated_messages,
228 const QHashcxx . . $ QHash#<QStringcxx . . $ QString#, QStringListcxx . . $ QStringList#>& tagged_messages) {
229 const bool update_feed_list =
230 qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Feeds), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Feeds::UpdateFeedListDuringFetching)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).();
231
232 if (checkIfFeedOverloadedcxx . . $ FeedDownloader#checkIfFeedOverloaded(14f6d7470dca483).(feed)) {
233 qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_COREcxx . . $ `src/librssguard/definitions/definitions.h:178:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Feed with source" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(feed->source())
234 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "was signalled temporarily being down. Returning no articles for now.";
235
236 feed->setStatuscxx . . $ Feed#setStatus(999e77df611af5d5).(Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status#::NetworkErrorcxx . . $ Feed#Status#NetworkError.,
237 trcxx . . $ FeedDownloader#tr(75d9f1c324b4579d).("feed is in network cooldown mode due to making too many network requests"));
238
239 if (update_feed_list) {
240 acc->itemChangedcxx . . $ ServiceRoot#itemChanged(47657a4e8825adca).({cxx . . $ QList#QList(b6da5b9a9f304025).feed});
241 }
242
243 return;
244 }
245
246 feed->setStatuscxx . . $ Feed#setStatus(999e77df611af5d5).(Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status#::Fetchingcxx . . $ Feed#Status#Fetching.);
247
248 if (update_feed_list) {
249 acc->itemChangedcxx . . $ ServiceRoot#itemChanged(47657a4e8825adca).({cxx . . $ QList#QList(b6da5b9a9f304025).feed});
250 }
251
252 qlonglongcxx . . $ qlonglong# thread_id = getThreadIDcxx . . $ getThreadID(a5d9f2bf8849668d).();
253
254 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Downloading new messages for feed ID" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(feed->customId())
255 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "URL:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(feed->source()) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "title:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(feed->title()) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "in thread "
256 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(thread_id);
257
258 int acc_id = acc->accountIdcxx . . $ ServiceRoot#accountId(455f465bc33b4cdf).();
259 QElapsedTimercxx . . $ QElapsedTimer# tmrcxx . . $ QElapsedTimer#QElapsedTimer(ced63f7c635d850d).;
260 tmr.startcxx . . $ QElapsedTimer#start(ced63f7c635d850d).();
261
262 try {
263 QSqlDatabasecxx . . $ QSqlDatabase# database = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->databasecxx . . $ Application#database(4a253a6ca99872d8).()->drivercxx . . $ DatabaseFactory#driver(5299be7c9afd522d).()->threadSafeConnectioncxx . . $ DatabaseDriver#threadSafeConnection(32d6d64cc6e35a97).(metaObjectcxx . . $ QString#QString(85c52e162fed56f9).()->classNamecxx . . $ QMetaObject#className(a9f41ea0e82d88cf).());
264 QListcxx . . $ QList#<Messagecxx . . $ Message#> msgs = feed->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).()->obtainNewMessagescxx . . $ ServiceRoot#obtainNewMessages(490368a1e149090e).(feed, stated_messages, tagged_messages);
265
266 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Downloaded" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). NONQUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:429:9`!(msgs.size()) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "messages for feed ID"
267 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_COMMAcxx . . $ `src/librssguard/definitions/definitions.h:431:9`!(feed->customId()) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "operation took" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). NONQUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:429:9`!(tmr.nsecsElapsed() / 1000)
268 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "microseconds.";
269
270 clearFeedOverloadcxx . . $ FeedDownloader#clearFeedOverload(1b149201450d1fc7).(feed);
271
272 bool fix_future_datetimes =
273 qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::FixupFutureArticleDateTimes)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).();
274
275 // Now, sanitize messages (tweak encoding etc.).
276 for (auto& msg : msgs) {
277 msg.m_accountIdcxx . . $ Message#m_accountId. = acc_id;
278 msg.sanitizecxx . . $ Message#sanitize(5058ebe3145e2c46).(feed, fix_future_datetimes);
279 }
280
281 QMutexLocker lckcxx . . $ QMutexLocker#QMutexLocker(35605a8b3c396497).(&m_mutexDbcxx . . $ FeedDownloader#m_mutexDb.);
282
283 if (!feed->messageFilterscxx . . $ Feed#messageFilters(98143e7d5e66961a).().isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) {
284 tmr.restartcxx . . $ QElapsedTimer#restart(9969456818c7299).();
285
286 // Perform per-message filtering.
287 QJSEnginecxx . . $ QJSEngine# filter_enginecxx . . $ QJSEngine#QJSEngine(49f6e7a06ebc5aa8).;
288
289 // Create JavaScript communication wrapper for the message.
290 MessageObjectcxx . . $ MessageObject# msg_objcxx . . $ MessageObject#MessageObject(13126ae026653ba1).(&database, feed, feed->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).(), true);
291
292 MessageFiltercxx . . $ MessageFilter#::initializeFilteringEnginecxx . . $ MessageFilter#initializeFilteringEngine(276667ffe634e0f5).(filter_engine, &msg_obj);
293
294 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Setting up JS evaluation took " <<cxx . . $ QDebug#`operator<<`(f416a4561cb9723d). tmr.nsecsElapsedcxx . . $ QElapsedTimer#nsecsElapsed(6b0412d51016192f).() / 1000
295 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). " microseconds.";
296
297 QListcxx . . $ QList#<Messagecxx . . $ Message#> read_msgscxx . . $ QList#QList(ced63f7c635d850d)., important_msgscxx . . $ QList#QList(ced63f7c635d850d).;
298
299 for (int i = 0; i < msgs.sizecxx . . $ QList#size(6b0412d51016192f).(); i++) {
300 Messagecxx . . $ Message# msg_original(msgs[cxx . . $ QList#`operator[]`(f5945173c490e616).i]);
301 Messagecxx . . $ Message#* msg_tweaked_by_filter = &msgs[cxx . . $ QList#`operator[]`(f5945173c490e616).i];
302
303 // Attach live message object to wrapper.
304 tmr.restartcxx . . $ QElapsedTimer#restart(9969456818c7299).();
305 msg_obj.setMessagecxx . . $ MessageObject#setMessage(aadc68b38cb9a8b0).(msg_tweaked_by_filter);
306 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Hooking message took " <<cxx . . $ QDebug#`operator<<`(f416a4561cb9723d). tmr.nsecsElapsedcxx . . $ QElapsedTimer#nsecsElapsed(6b0412d51016192f).() / 1000 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). " microseconds.";
307
308 auto feed_filters = feed->messageFilterscxx . . $ Feed#messageFilters(98143e7d5e66961a).();
309 bool remove_msg = false;
310
311 for (int j = 0; j < feed_filters.sizecxx . . $ QList#size(6b0412d51016192f).(); j++) {
312 QPointercxx . . $ QPointer#<MessageFiltercxx . . $ MessageFilter#> filter = feed_filters.atcxx . . $ QList#at(c7965f769b39929).(j);
313
314 if (filter.isNullcxx . . $ QPointer#isNull(3482b152b9333168).()) {
315 qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`!
316 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Article filter was probably deleted, removing its pointer from list of filters.";
317 feed_filters.removeAtcxx . . $ QList#removeAt(35cb52607f6af42f).(j--);
318 continue;
319 }
320
321 MessageFiltercxx . . $ MessageFilter#* msg_filter = filter.datacxx . . $ QPointer#data(34d6acfd341ba7ab).();
322
323 tmr.restartcxx . . $ QElapsedTimer#restart(9969456818c7299).();
324
325 try {
326 MessageObjectcxx . . $ MessageObject#::FilteringActioncxx . . $ MessageObject#FilteringAction# decision = msg_filter->filterMessagecxx . . $ MessageFilter#filterMessage(5a356bc886cdb17d).(&filter_engine);
327
328 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Running filter script, it took " <<cxx . . $ QDebug#`operator<<`(f416a4561cb9723d). tmr.nsecsElapsedcxx . . $ QElapsedTimer#nsecsElapsed(6b0412d51016192f).() / 1000
329 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). " microseconds.";
330
331 switch (decision) {
332 case MessageObjectcxx . . $ MessageObject#::FilteringActioncxx . . $ MessageObject#FilteringAction#::Acceptcxx . . $ MessageObject#FilteringAction#Accept.:
333 // Message is normally accepted, it could be tweaked by the filter.
334 continue;
335
336 case MessageObjectcxx . . $ MessageObject#::FilteringActioncxx . . $ MessageObject#FilteringAction#::Ignorecxx . . $ MessageObject#FilteringAction#Ignore.:
337 case MessageObjectcxx . . $ MessageObject#::FilteringActioncxx . . $ MessageObject#FilteringAction#::Purgecxx . . $ MessageObject#FilteringAction#Purge.:
338 default:
339 // Remove the message, we do not want it.
340 remove_msg = true;
341 break;
342 }
343 }
344 catch (const FilteringExceptioncxx . . $ FilteringException#& ex) {
345 qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`!
346 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Error when evaluating filtering JS function: " <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(ex.message())
347 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). " Accepting message.";
348 continue;
349 }
350
351 // If we reach this point. Then we ignore the message which is by now
352 // already removed, go to next message.
353 break;
354 }
355
356 if (!msg_original.m_isReadcxx . . $ Message#m_isRead. && msg_tweaked_by_filter->m_isReadcxx . . $ Message#m_isRead.) {
357 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Message with custom ID:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(msg_original.m_customId)
358 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "was marked as read by message scripts.";
359
360 read_msgs <<cxx . . $ QList#`operator<<`(ddd37d5bfdbbfc74). *msg_tweaked_by_filter;
361 }
362
363 if (!msg_original.m_isImportantcxx . . $ Message#m_isImportant. && msg_tweaked_by_filter->m_isImportantcxx . . $ Message#m_isImportant.) {
364 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Message with custom ID:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(msg_original.m_customId)
365 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "was marked as important by message scripts.";
366
367 important_msgs <<cxx . . $ QList#`operator<<`(ddd37d5bfdbbfc74). *msg_tweaked_by_filter;
368 }
369
370 // NOTE: We only remember what labels were added/removed in filters
371 // and store the fact to server (of synchronized) and local DB later.
372 // This is mainly because articles might not even be in DB yet.
373 // So first insert articles, then update their label assignments etc.
374 for (Labelcxx . . $ Label#* lbl : stdcxx . . $ std/::as_constcxx . . $ std/as_const(1dc117cbefefc300).(msg_original.m_assignedLabelscxx . . $ Message#m_assignedLabels.)) {
375 if (!msg_tweaked_by_filter->m_assignedLabelscxx . . $ Message#m_assignedLabels..containscxx . . $ QListSpecialMethodsBase#contains(7349e39e0b02d05c).(lbl)) {
376 // Label is not there anymore, it was deassigned.
377 msg_tweaked_by_filter->m_deassignedLabelsByFiltercxx . . $ Message#m_deassignedLabelsByFilter. <<cxx . . $ QList#`operator<<`(ddd37d5bfdbbfc74). lbl;
378 }
379 }
380
381 for (Labelcxx . . $ Label#* lbl : stdcxx . . $ std/::as_constcxx . . $ std/as_const(1dc117cbefefc300).(msg_tweaked_by_filter->m_assignedLabelscxx . . $ Message#m_assignedLabels.)) {
382 if (!msg_original.m_assignedLabelscxx . . $ Message#m_assignedLabels..containscxx . . $ QListSpecialMethodsBase#contains(7349e39e0b02d05c).(lbl)) {
383 // Label is in new message, but is not in old message, it
384 // was newly assigned.
385 msg_tweaked_by_filter->m_assignedLabelsByFiltercxx . . $ Message#m_assignedLabelsByFilter. <<cxx . . $ QList#`operator<<`(ddd37d5bfdbbfc74). lbl;
386 }
387 }
388
389 if (remove_msg) {
390 msgs.removeAtcxx . . $ QList#removeAt(35cb52607f6af42f).(i--);
391 }
392 }
393
394 if (!read_msgs.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) {
395 // Now we push new read states to the service.
396 if (feed->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).()->onBeforeSetMessagesReadcxx . . $ ServiceRoot#onBeforeSetMessagesRead(560bab74201c5167).(feed, read_msgs, RootItemcxx . . $ RootItem#::ReadStatuscxx . . $ RootItem#ReadStatus#::Readcxx . . $ RootItem#ReadStatus#Read.)) {
397 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Notified services about messages marked as read by message filters.";
398 }
399 else {
400 qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`!
401 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Notification of services about messages marked as read by message filters FAILED.";
402 }
403 }
404
405 if (!important_msgs.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) {
406 // Now we push new read states to the service.
407 auto list = boolinqcxx . . $ boolinq/::fromcxx . . $ boolinq/from(1a44d082b2747720).(important_msgs)
408 .selectcxx . . $ boolinq/Linq#select(a3f5bd4cd382e0ee).([](const Messagecxx . . $ Message#& msg) {
409 return ImportanceChangecxx . . $ std/pair#pair(14d64bafa7379ebc).(msg, RootItemcxx . . $ RootItem#::Importancecxx . . $ RootItem#Importance#::Importantcxx . . $ RootItem#Importance#Important.);
410 })
411 .toStdListcxx . . $ boolinq/Linq#toStdList(2989115be80c3067).();
412 QListcxx . . $ QList#<ImportanceChangecxx . . $ ImportanceChange#> chngs = FROM_STD_LISTcxx . . $ `src/librssguard/definitions/definitions.h:405:9`!(QList<ImportanceChange>, list);
413
414 if (feed->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).()->onBeforeSwitchMessageImportancecxx . . $ ServiceRoot#onBeforeSwitchMessageImportance(3cf6dccd01820b2).(feed, chngs)) {
415 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`!
416 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Notified services about messages marked as important by message filters.";
417 }
418 else {
419 qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`!
420 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Notification of services about messages marked as important by message filters FAILED.";
421 }
422 }
423 }
424
425 removeDuplicateMessagescxx . . $ FeedDownloader#removeDuplicateMessages(bcfa8667954cc170).(msgs);
426 removeTooOldMessagescxx . . $ FeedDownloader#removeTooOldMessages(e4b2289ccabdc775).(feed, msgs);
427
428 tmr.restartcxx . . $ QElapsedTimer#restart(9969456818c7299).();
429 auto updated_messages = acc->updateMessagescxx . . $ ServiceRoot#updateMessages(94545357301d5fab).(msgs, feed, false, nullptr);
430
431 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Updating messages in DB took" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). NONQUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:429:9`!(tmr.nsecsElapsed() / 1000)
432 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "microseconds.";
433
434 if (feed->statuscxx . . $ Feed#status(3ef043b41d362a5c).() != Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status#::NewMessagescxx . . $ Feed#Status#NewMessages.) {
435 feed->setStatuscxx . . $ Feed#setStatus(999e77df611af5d5).((!updated_messages.m_allcxx . . $ UpdatedArticles#m_all..isEmptycxx . . $ QList#isEmpty(3482b152b9333168).() || !updated_messages.m_unreadcxx . . $ UpdatedArticles#m_unread..isEmptycxx . . $ QList#isEmpty(3482b152b9333168).())
436 ? Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status#::NewMessagescxx . . $ Feed#Status#NewMessages.
437 : Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status#::Normalcxx . . $ Feed#Status#Normal.);
438 }
439
440 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(f416a4561cb9723d). updated_messages.m_unreadcxx . . $ UpdatedArticles#m_unread..sizecxx . . $ QList#size(6b0412d51016192f).() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). " unread messages and"
441 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). NONQUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:429:9`!(updated_messages.m_all.size()) "total messages for feed"
442 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(feed->customId()) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "stored in DB.";
443
444 m_resultscxx . . $ FeedDownloader#m_results..appendUpdatedFeedcxx . . $ FeedDownloadResults#appendUpdatedFeed(c40737f7b92cda08).(feed, updated_messages.m_unreadcxx . . $ UpdatedArticles#m_unread.);
445 }
446 catch (const FeedFetchExceptioncxx . . $ FeedFetchException#& feed_ex) {
447 qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_NETWORKcxx . . $ `src/librssguard/definitions/definitions.h:168:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Error when fetching feed:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(feed_ex.feedStatus())
448 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "message:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(feed_ex.message());
449
450 m_resultscxx . . $ FeedDownloader#m_results..appendErroredFeedcxx . . $ FeedDownloadResults#appendErroredFeed(93981391c4b73a5b).(feed, feed_ex.messagecxx . . $ ApplicationException#message(6ef7b6c27b00b43d).());
451 feed->setStatuscxx . . $ Feed#setStatus(999e77df611af5d5).(feed_ex.feedStatuscxx . . $ FeedFetchException#feedStatus(3ef043b41d362a5c).(), feed_ex.messagecxx . . $ ApplicationException#message(6ef7b6c27b00b43d).());
452
453 if (feed_ex.feedStatuscxx . . $ FeedFetchException#feedStatus(3ef043b41d362a5c).() == Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status#::NetworkErrorcxx . . $ Feed#Status#NetworkError. && !feed_ex.datacxx . . $ FeedFetchException#data(23280f95d1ccaa1f).().isNullcxx . . $ QVariant#isNull(50ce9a9e25b4a850).()) {
454 NetworkResultcxx . . $ NetworkResult# network_result = feed_ex.datacxx . . $ FeedFetchException#data(23280f95d1ccaa1f).().valuecxx . . $ QVariant#value(1e6269539e51e84a).<NetworkResultcxx . . $ NetworkResult#>();
455
456 if (network_result.m_httpCodecxx . . $ NetworkResult#m_httpCode. == HTTP_CODE_TOO_MANY_REQUESTScxx . . $ `src/librssguard/definitions/definitions.h:158:9`! ||
457 network_result.m_httpCodecxx . . $ NetworkResult#m_httpCode. == HTTP_CODE_UNAVAILABLEcxx . . $ `src/librssguard/definitions/definitions.h:159:9`!) {
458 QDateTimecxx . . $ QDateTime# safe_dt = NetworkFactorycxx . . $ NetworkFactory#::extractRetryAftercxx . . $ NetworkFactory#extractRetryAfter(d82b2249834d7665).(network_result.m_headerscxx . . $ NetworkResult#m_headers..valuecxx . . $ QMap#value(6f0b2e7f225a8193).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("retry-after")));
459
460 m_overloadedHostscxx . . $ FeedDownloader#m_overloadedHosts..insertcxx . . $ QHash#insert(d77b19c31d2eb147).(QUrlcxx . . $ QUrl#QUrl(ea1f3831e370f1cb).(feed->sourcecxx . . $ Feed#source(6ef7b6c27b00b43d).()).hostcxx . . $ QUrl#host(9d7420bec8bfe6c9).(), safe_dt);
461
462 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_COREcxx . . $ `src/librssguard/definitions/definitions.h:178:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Extracted Retry-After value is" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(safe_dt);
463 qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_COREcxx . . $ `src/librssguard/definitions/definitions.h:178:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Feed" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(feed->source())
464 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "indicates that there is too many requests right now on the same host.";
465 }
466 }
467 }
468 catch (const ApplicationExceptioncxx . . $ ApplicationException#& app_ex) {
469 qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_NETWORKcxx . . $ `src/librssguard/definitions/definitions.h:168:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Unknown error when fetching feed:"
470 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "message:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(app_ex.message());
471
472 m_resultscxx . . $ FeedDownloader#m_results..appendErroredFeedcxx . . $ FeedDownloadResults#appendErroredFeed(93981391c4b73a5b).(feed, app_ex.messagecxx . . $ ApplicationException#message(6ef7b6c27b00b43d).());
473 feed->setStatuscxx . . $ Feed#setStatus(999e77df611af5d5).(Feedcxx . . $ Feed#::Statuscxx . . $ Feed#Status#::OtherErrorcxx . . $ Feed#Status#OtherError., app_ex.messagecxx . . $ ApplicationException#message(6ef7b6c27b00b43d).());
474 }
475
476 if (update_feed_list) {
477 acc->itemChangedcxx . . $ ServiceRoot#itemChanged(47657a4e8825adca).({cxx . . $ QList#QList(b6da5b9a9f304025).feed});
478 }
479
480 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Made progress in feed updates, total feeds count "
481 <<cxx . . $ QDebug#`operator<<`(6e3b7ae53f380c3). m_watcherLookupcxx . . $ FeedDownloader#m_watcherLookup..progressValuecxx . . $ QFutureWatcherBase#progressValue(455f465bc33b4cdf).() + 1 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "/" <<cxx . . $ QDebug#`operator<<`(f416a4561cb9723d). m_feedscxx . . $ FeedDownloader#m_feeds..sizecxx . . $ QList#size(6b0412d51016192f).() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). " (id of feed is " <<cxx . . $ QDebug#`operator<<`(6e3b7ae53f380c3). feed->idcxx . . $ RootItem#id(455f465bc33b4cdf).() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). ").";
482 }
483
484 void FeedDownloadercxx . . $ FeedDownloader#::finalizeUpdatecxx . . $ FeedDownloader#finalizeUpdate(49f6e7a06ebc5aa8).() {
485 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_FEEDDOWNLOADERcxx . . $ `src/librssguard/definitions/definitions.h:171:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Finished feed updates in thread" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(getThreadID());
486
487 m_feedscxx . . $ FeedDownloader#m_feeds..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
488
489 if (!m_resultscxx . . $ FeedDownloader#m_results..erroredFeedscxx . . $ FeedDownloadResults#erroredFeeds(6d71e1f7a9ea0a7f).().isEmptycxx . . $ QHash#isEmpty(3482b152b9333168).()) {
490 qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->showGuiMessagecxx . . $ Application#showGuiMessage(cf433640a87c3b52).(Notificationcxx . . $ Notification#::Eventcxx . . $ Notification#Event#::ArticlesFetchingErrorcxx . . $ Notification#Event#ArticlesFetchingError.,
491 {cxx . . $ GuiMessage#GuiMessage(b833bfd374dccacd).QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Some feeds have error"),
492 QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Some feeds threw an error when fetching articles."),
493 QSystemTrayIconcxx . . $ QSystemTrayIcon#::MessageIconcxx . . $ QSystemTrayIcon#MessageIcon#::Warningcxx . . $ QSystemTrayIcon#Warning.});
494 }
495
496 // Update of feeds has finished.
497 // NOTE: This means that now "update lock" can be unlocked
498 // and feeds can be added/edited/deleted and application
499 // can eventually quit.
500 emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! updateFinishedcxx . . $ FeedDownloader#updateFinished(c87b5265ecd7e3fb).(m_resultscxx . . $ FeedDownloader#m_results.);
501 }
502
503 bool FeedDownloadercxx . . $ FeedDownloader#::isCacheSynchronizationRunningcxx . . $ FeedDownloader#isCacheSynchronizationRunning(50ce9a9e25b4a850).() const {
504 return m_isCacheSynchronizationRunningcxx . . $ FeedDownloader#m_isCacheSynchronizationRunning.;
505 }
506
507 void FeedDownloadercxx . . $ FeedDownloader#::removeDuplicateMessagescxx . . $ FeedDownloader#removeDuplicateMessages(bcfa8667954cc170).(QListcxx . . $ QList#<Messagecxx . . $ Message#>& messages) {
508 auto idx = 0;
509
510 while (idx < messages.sizecxx . . $ QList#size(6b0412d51016192f).()) {
511 Messagecxx . . $ Message#& message = messages[cxx . . $ QList#`operator[]`(f5945173c490e616).idx];
512 stdcxx . . $ std/::functioncxx . . $ std/function#<bool(const Messagecxx . . $ Message#& a, const Messagecxx . . $ Message#& b)> is_duplicatecxx . . $ std/function#function(ced63f7c635d850d).;
513
514 if (message.m_idcxx . . $ Message#m_id. > 0) {
515 is_duplicate =cxx . . $ std/function#`operator=`(842f3727de83eb28). [](const Messagecxx . . $ Message#& a, const Messagecxx . . $ Message#& b) {
516 return a.m_idcxx . . $ Message#m_id. == b.m_idcxx . . $ Message#m_id.;
517 };
518 }
519 else if (message.m_customIdcxx . . $ Message#m_customId..isEmptycxx . . $ QString#isEmpty(3482b152b9333168).()) {
520 is_duplicate =cxx . . $ std/function#`operator=`(842f3727de83eb28). [](const Messagecxx . . $ Message#& a, const Messagecxx . . $ Message#& b) {
521 return stdcxx . . $ std/::tiecxx . . $ std/tie(988772b69a7ca893).(a.m_titlecxx . . $ Message#m_title., a.m_urlcxx . . $ Message#m_url., a.m_authorcxx . . $ Message#m_author.) ==cxx . . $ std/`operator==`(48af00471b8240b). stdcxx . . $ std/::tiecxx . . $ std/tie(988772b69a7ca893).(b.m_titlecxx . . $ Message#m_title., b.m_urlcxx . . $ Message#m_url., b.m_authorcxx . . $ Message#m_author.);
522 };
523 }
524 else {
525 is_duplicate =cxx . . $ std/function#`operator=`(842f3727de83eb28). [](const Messagecxx . . $ Message#& a, const Messagecxx . . $ Message#& b) {
526 return a.m_customIdcxx . . $ Message#m_customId. ==cxx . . $ `operator==`(5bc2975d2d751687). b.m_customIdcxx . . $ Message#m_customId.;
527 };
528 }
529
530 auto next_idx = idx + 1; // Index of next message to check after removing all duplicates.
531 auto last_idx = idx; // Index of the last kept duplicate.
532
533 idx = next_idx;
534
535 // Remove all duplicate messages, and keep the message with the latest created date.
536 // If the created date is identical for all duplicate messages then keep the last message in the list.
537 while (idx < messages.sizecxx . . $ QList#size(6b0412d51016192f).()) {
538 auto& last_duplicate = messages[cxx . . $ QList#`operator[]`(f5945173c490e616).last_idx];
539
540 if (is_duplicate(cxx . . $ std/function#`operator()`(39e0826ffb540481).last_duplicate, messages[cxx . . $ QList#`operator[]`(f5945173c490e616).idx])) {
541 if (last_duplicate.m_createdcxx . . $ Message#m_created. <=cxx . . $ `operator<=`(ae3dca24290d889b). messages[cxx . . $ QList#`operator[]`(f5945173c490e616).idx].m_createdcxx . . $ Message#m_created.) {
542 // The last seen message was created earlier or at the same date -- keep the current, and remove the last.
543 qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_COREcxx . . $ `src/librssguard/definitions/definitions.h:178:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Removing article" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(last_duplicate.m_title)
544 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "before saving articles to DB, because it is duplicate.";
545
546 messages.removeAtcxx . . $ QList#removeAt(35cb52607f6af42f).(last_idx);
547 if (last_idx + 1 == next_idx) {
548 // The `next_idx` was pointing to the message following the duplicate. With that duplicate removed the
549 // next index needs to be adjusted.
550 next_idx = last_idx;
551 }
552
553 last_idx = idx;
554 ++idx;
555 }
556 else {
557 qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_COREcxx . . $ `src/librssguard/definitions/definitions.h:178:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Removing article" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(messages[idx].m_title)
558 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "before saving articles to DB, because it is duplicate.";
559
560 messages.removeAtcxx . . $ QList#removeAt(35cb52607f6af42f).(idx);
561 }
562 }
563 else {
564 ++idx;
565 }
566 }
567
568 idx = next_idx;
569 }
570 }
571
572 void FeedDownloadercxx . . $ FeedDownloader#::removeTooOldMessagescxx . . $ FeedDownloader#removeTooOldMessages(e4b2289ccabdc775).(Feedcxx . . $ Feed#* feed, QListcxx . . $ QList#<Messagecxx . . $ Message#>& msgs) {
573 const Feedcxx . . $ Feed#::ArticleIgnoreLimitcxx . . $ Feed#ArticleIgnoreLimit# art = feed->articleIgnoreLimitcxx . . $ Feed#articleIgnoreLimit(a6099ccba00faa1d).();
574
575 if (!art.m_addAnyArticlesToDbcxx . . $ Feed#ArticleIgnoreLimit#m_addAnyArticlesToDb.) {
576 QDateTimecxx . . $ QDateTime# dt_to_avoidcxx . . $ QDateTime#QDateTime(ced63f7c635d850d).;
577
578 if (art.m_dtToAvoidcxx . . $ Feed#ArticleIgnoreLimit#m_dtToAvoid..isValidcxx . . $ QDateTime#isValid(50ce9a9e25b4a850).() && art.m_dtToAvoidcxx . . $ Feed#ArticleIgnoreLimit#m_dtToAvoid..toMSecsSinceEpochcxx . . $ QDateTime#toMSecsSinceEpoch(98833e9ab7de59a4).() > 0) {
579 dt_to_avoid =cxx . . $ QDateTime#`operator=`(c9ee2a3e4c661ab0). art.m_dtToAvoidcxx . . $ Feed#ArticleIgnoreLimit#m_dtToAvoid.;
580 }
581 else if (art.m_hoursToAvoidcxx . . $ Feed#ArticleIgnoreLimit#m_hoursToAvoid. > 0) {
582 dt_to_avoid =cxx . . $ QDateTime#`operator=`(6dbf9ff24243cdf2). QDateTimecxx . . $ QDateTime#::currentDateTimeUtccxx . . $ QDateTime#currentDateTimeUtc(bf5129c8228c71c0).().addSecscxx . . $ QDateTime#addSecs(95f9ba7c82d0c5e8).((art.m_hoursToAvoidcxx . . $ Feed#ArticleIgnoreLimit#m_hoursToAvoid. * -3600));
583 }
584 else if (qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::AvoidOldArticles)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).()) {
585 QDateTimecxx . . $ QDateTime# global_dt_to_avoid =
586 qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::DateTimeToAvoidArticle)).toDateTimecxx . . $ QVariant#toDateTime(4e062b5c490497ac).();
587 int global_hours_to_avoid =
588 qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::HoursToAvoidArticle)).toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).();
589
590 if (global_dt_to_avoid.isValidcxx . . $ QDateTime#isValid(50ce9a9e25b4a850).() && global_dt_to_avoid.toMSecsSinceEpochcxx . . $ QDateTime#toMSecsSinceEpoch(98833e9ab7de59a4).() > 0) {
591 dt_to_avoid =cxx . . $ QDateTime#`operator=`(c9ee2a3e4c661ab0). global_dt_to_avoid;
592 }
593 else if (global_hours_to_avoid > 0) {
594 dt_to_avoid =cxx . . $ QDateTime#`operator=`(6dbf9ff24243cdf2). QDateTimecxx . . $ QDateTime#::currentDateTimeUtccxx . . $ QDateTime#currentDateTimeUtc(bf5129c8228c71c0).().addSecscxx . . $ QDateTime#addSecs(95f9ba7c82d0c5e8).(global_hours_to_avoid * -3600);
595 }
596 }
597
598 if (dt_to_avoid.isValidcxx . . $ QDateTime#isValid(50ce9a9e25b4a850).()) {
599 for (int i = 0; i < msgs.sizecxx . . $ QList#size(6b0412d51016192f).(); i++) {
600 const auto& mss = msgs.atcxx . . $ QList#at(c7965f769b39929).(i);
601
602 if (mss.m_createdFromFeedcxx . . $ Message#m_createdFromFeed. && mss.m_createdcxx . . $ Message#m_created. <cxx . . $ `operator<`(ae3dca24290d889b). dt_to_avoid) {
603 qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_COREcxx . . $ `src/librssguard/definitions/definitions.h:178:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Removing message" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(mss.m_title) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "for being too old.";
604 msgs.removeAtcxx . . $ QList#removeAt(35cb52607f6af42f).(i--);
605 }
606 }
607 }
608 }
609 }
610
611 QListcxx . . $ QList#<Feedcxx . . $ Feed#*> FeedDownloadercxx . . $ FeedDownloader#::scrambleFeedsWithSameHostcxx . . $ FeedDownloader#scrambleFeedsWithSameHost(e0832f638b4904d0).(const QListcxx . . $ QList#<Feedcxx . . $ Feed#*>& feeds) const {
612 return feeds;
613 }
614
615 QStringcxx . . $ QString# FeedDownloadResultscxx . . $ FeedDownloadResults#::overviewcxx . . $ FeedDownloadResults#overview(3f3c3d0e9c0eb37f).(int how_many_feeds) const {
616 QStringListcxx . . $ QStringList# resultcxx . . $ QList#QList(ced63f7c635d850d).;
617
618 for (int i = 0, number_items_output = qMincxx . . $ qMin(f07f1046a2823333).(how_many_feeds, m_updatedFeedscxx . . $ FeedDownloadResults#m_updatedFeeds..sizecxx . . $ QHash#size(6b0412d51016192f).()); i < number_items_output; i++) {
619 auto* fd = m_updatedFeedscxx . . $ FeedDownloadResults#m_updatedFeeds..keyscxx . . $ QHash#keys(bf6c511543d55010).().atcxx . . $ QList#at(c7965f769b39929).(i);
620 auto msgs = m_updatedFeedscxx . . $ FeedDownloadResults#m_updatedFeeds..valuecxx . . $ QHash#value(5f65a9ee2c9899ff).(fd);
621
622 if (fd->isQuietcxx . . $ Feed#isQuiet(50ce9a9e25b4a850).()) {
623 continue;
624 }
625
626 result.appendcxx . . $ QList#append(1262c8661f7a27a7).(fd->titlecxx . . $ RootItem#title(6ef7b6c27b00b43d).() +cxx . . $ operator+(adfbdceb504720ce). QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!(": ") +cxx . . $ operator+(adfbdceb504720ce). QStringcxx . . $ QString#::numbercxx . . $ QString#number(391c8d1a7da534d1).(msgs.sizecxx . . $ QList#size(6b0412d51016192f).()));
627 }
628
629 QStringcxx . . $ QString# res_str = result.joincxx . . $ QListSpecialMethods#join(5555d9024dcf93fb).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("\n"));
630
631 if (m_updatedFeedscxx . . $ FeedDownloadResults#m_updatedFeeds..sizecxx . . $ QHash#size(6b0412d51016192f).() > how_many_feeds) {
632 res_str +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("\n\n+ %n other feeds.", nullptr, m_updatedFeedscxx . . $ FeedDownloadResults#m_updatedFeeds..sizecxx . . $ QHash#size(6b0412d51016192f).() - how_many_feeds);
633 }
634
635 return res_strcxx . . $ QString#QString(28715ad661ad3cec).;
636 }
637
638 void FeedDownloadResultscxx . . $ FeedDownloadResults#::appendUpdatedFeedcxx . . $ FeedDownloadResults#appendUpdatedFeed(c40737f7b92cda08).(Feedcxx . . $ Feed#* feed, const QListcxx . . $ QList#<Messagecxx . . $ Message#>& updated_unread_msgs) {
639 if (!updated_unread_msgs.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) {
640 m_updatedFeedscxx . . $ FeedDownloadResults#m_updatedFeeds..insertcxx . . $ QHash#insert(d77b19c31d2eb147).(feed, updated_unread_msgs);
641 }
642 }
643
644 void FeedDownloadResultscxx . . $ FeedDownloadResults#::appendErroredFeedcxx . . $ FeedDownloadResults#appendErroredFeed(93981391c4b73a5b).(Feedcxx . . $ Feed#* feed, const QStringcxx . . $ QString#& error) {
645 m_erroredFeedscxx . . $ FeedDownloadResults#m_erroredFeeds..insertcxx . . $ QHash#insert(d77b19c31d2eb147).(feed, error);
646 }
647
648 void FeedDownloadResultscxx . . $ FeedDownloadResults#::clearcxx . . $ FeedDownloadResults#clear(49f6e7a06ebc5aa8).() {
649 m_updatedFeedscxx . . $ FeedDownloadResults#m_updatedFeeds..clearcxx . . $ QHash#clear(7d74265ff1b37f0c).();
650 m_erroredFeedscxx . . $ FeedDownloadResults#m_erroredFeeds..clearcxx . . $ QHash#clear(7d74265ff1b37f0c).();
651 }
652
653 QHashcxx . . $ QHash#<Feedcxx . . $ Feed#*, QStringcxx . . $ QString#> FeedDownloadResultscxx . . $ FeedDownloadResults#::erroredFeedscxx . . $ FeedDownloadResults#erroredFeeds(6d71e1f7a9ea0a7f).() const {
654 return m_erroredFeedscxx . . $ QHash#QHash(2d9b93d3b37616d3).;
655 }
656
657 QHashcxx . . $ QHash#<Feedcxx . . $ Feed#*, QListcxx . . $ QList#<Messagecxx . . $ Message#>> FeedDownloadResultscxx . . $ FeedDownloadResults#::updatedFeedscxx . . $ FeedDownloadResults#updatedFeeds(d6158a28bfdf01c).() const {
658 return m_updatedFeedscxx . . $ QHash#QHash(2d9b93d3b37616d3).;
659 }