| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/gui/notifications/articlelistnotification.cpp`/ |
| 2 | |
| 3 | #include "gui/notifications/articlelistnotification.h"cxx . . $ `<file>/src/librssguard/gui/notifications/articlelistnotification.h`/ |
| 4 | |
| 5 | #include "core/articlelistnotificationmodel.h"cxx . . $ `<file>/src/librssguard/core/articlelistnotificationmodel.h`/ |
| 6 | #include "database/databasequeries.h"cxx . . $ `<file>/src/librssguard/database/databasequeries.h`/ |
| 7 | #include "miscellaneous/iconfactory.h"cxx . . $ `<file>/src/librssguard/miscellaneous/iconfactory.h`/ |
| 8 | #include "network-web/webfactory.h"cxx . . $ `<file>/src/librssguard/network-web/webfactory.h`/ |
| 9 | |
| 10 | #include <QMouseEvent> |
| 11 | #include <QTreeView> |
| 12 | |
| 13 | ArticleListNotificationcxx . . $ ArticleListNotification#::ArticleListNotificationcxx . . $ ArticleListNotification#ArticleListNotification(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent) |
| 14 | : BaseToastNotificationcxx . . $ BaseToastNotification#(parent), m_modelcxx . . $ ArticleListNotification#m_model.(new ArticleListNotificationModelcxx . . $ ArticleListNotificationModel#ArticleListNotificationModel(749de1b6ae65bddd).(this)) { |
| 15 | m_uicxx . . $ ArticleListNotification#m_ui..setupUicxx . . $ Ui_ArticleListNotification#setupUi(d194de0c0f68c28b).(this); |
| 16 | |
| 17 | setupHeadingcxx . . $ BaseToastNotification#setupHeading(d3201a35e6c48b56).(m_uicxx . . $ ArticleListNotification#m_ui..m_lblTitlecxx . . $ Ui_ArticleListNotification#m_lblTitle.); |
| 18 | setupCloseButtoncxx . . $ BaseToastNotification#setupCloseButton(6f406f547f7da55f).(m_uicxx . . $ ArticleListNotification#m_ui..m_btnClosecxx . . $ Ui_ArticleListNotification#m_btnClose.); |
| 19 | |
| 20 | m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->viewportcxx . . $ QAbstractScrollArea#viewport(27f420ad5cce8994).()->installEventFiltercxx . . $ QObject#installEventFilter(749de1b6ae65bddd).(this); |
| 21 | |
| 22 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnNextPagecxx . . $ Ui_ArticleListNotification#m_btnNextPage.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->iconscxx . . $ Application#icons(d976db2a0d825b70).()->fromThemecxx . . $ IconFactory#fromTheme(e457fbbee8993f3).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("arrow-right"), QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("stock_right"))); |
| 23 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnPreviousPagecxx . . $ Ui_ArticleListNotification#m_btnPreviousPage.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->iconscxx . . $ Application#icons(d976db2a0d825b70).()->fromThemecxx . . $ IconFactory#fromTheme(e457fbbee8993f3).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("arrow-left"), QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("stock_left"))); |
| 24 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnOpenArticleListcxx . . $ Ui_ArticleListNotification#m_btnOpenArticleList.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->iconscxx . . $ Application#icons(d976db2a0d825b70).()->fromThemecxx . . $ IconFactory#fromTheme(e457fbbee8993f3).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("view-list-details"))); |
| 25 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnOpenWebBrowsercxx . . $ Ui_ArticleListNotification#m_btnOpenWebBrowser.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->iconscxx . . $ Application#icons(d976db2a0d825b70).()->fromThemecxx . . $ IconFactory#fromTheme(e457fbbee8993f3).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("document-open"))); |
| 26 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnMarkAllReadcxx . . $ Ui_ArticleListNotification#m_btnMarkAllRead.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->iconscxx . . $ Application#icons(d976db2a0d825b70).()->fromThemecxx . . $ IconFactory#fromTheme(e457fbbee8993f3).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("mail-mark-read"))); |
| 27 | |
| 28 | m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->setModelcxx . . $ QTreeView#setModel(c6e1f1e42522b780).(m_modelcxx . . $ ArticleListNotification#m_model.); |
| 29 | |
| 30 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_modelcxx . . $ ArticleListNotification#m_model., |
| 31 | &ArticleListNotificationModelcxx . . $ ArticleListNotificationModel#::nextPagePossibleChangedcxx . . $ ArticleListNotificationModel#nextPagePossibleChanged(b45ddcbc8423892c)., |
| 32 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnNextPagecxx . . $ Ui_ArticleListNotification#m_btnNextPage., |
| 33 | &PlainToolButtoncxx . . $ PlainToolButton#::setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).); |
| 34 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_modelcxx . . $ ArticleListNotification#m_model., |
| 35 | &ArticleListNotificationModelcxx . . $ ArticleListNotificationModel#::previousPagePossibleChangedcxx . . $ ArticleListNotificationModel#previousPagePossibleChanged(b45ddcbc8423892c)., |
| 36 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnPreviousPagecxx . . $ Ui_ArticleListNotification#m_btnPreviousPage., |
| 37 | &PlainToolButtoncxx . . $ PlainToolButton#::setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).); |
| 38 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ ArticleListNotification#m_ui..m_btnNextPagecxx . . $ Ui_ArticleListNotification#m_btnNextPage., &PlainToolButtoncxx . . $ PlainToolButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., m_modelcxx . . $ ArticleListNotification#m_model., &ArticleListNotificationModelcxx . . $ ArticleListNotificationModel#::nextPagecxx . . $ ArticleListNotificationModel#nextPage(49f6e7a06ebc5aa8).); |
| 39 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ ArticleListNotification#m_ui..m_btnPreviousPagecxx . . $ Ui_ArticleListNotification#m_btnPreviousPage., &PlainToolButtoncxx . . $ PlainToolButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., m_modelcxx . . $ ArticleListNotification#m_model., &ArticleListNotificationModelcxx . . $ ArticleListNotificationModel#::previousPagecxx . . $ ArticleListNotificationModel#previousPage(49f6e7a06ebc5aa8).); |
| 40 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ ArticleListNotification#m_ui..m_btnMarkAllReadcxx . . $ Ui_ArticleListNotification#m_btnMarkAllRead., &PlainToolButtoncxx . . $ PlainToolButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &ArticleListNotificationcxx . . $ ArticleListNotification#::markAllReadcxx . . $ ArticleListNotification#markAllRead(49f6e7a06ebc5aa8).); |
| 41 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles., |
| 42 | &QAbstractItemViewcxx . . $ QAbstractItemView#::doubleClickedcxx . . $ QAbstractItemView#doubleClicked(87a6de385263c395)., |
| 43 | this, |
| 44 | &ArticleListNotificationcxx . . $ ArticleListNotification#::openArticleInWebBrowsercxx . . $ ArticleListNotification#openArticleInWebBrowser(49f6e7a06ebc5aa8).); |
| 45 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ ArticleListNotification#m_ui..m_btnOpenWebBrowsercxx . . $ Ui_ArticleListNotification#m_btnOpenWebBrowser., &PlainToolButtoncxx . . $ PlainToolButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &ArticleListNotificationcxx . . $ ArticleListNotification#::openArticleInWebBrowsercxx . . $ ArticleListNotification#openArticleInWebBrowser(49f6e7a06ebc5aa8).); |
| 46 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ ArticleListNotification#m_ui..m_btnOpenArticleListcxx . . $ Ui_ArticleListNotification#m_btnOpenArticleList., |
| 47 | &PlainToolButtoncxx . . $ PlainToolButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., |
| 48 | this, |
| 49 | &ArticleListNotificationcxx . . $ ArticleListNotification#::openArticleInArticleListcxx . . $ ArticleListNotification#openArticleInArticleList(49f6e7a06ebc5aa8).); |
| 50 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->selectionModelcxx . . $ QAbstractItemView#selectionModel(cc7a226abaf79c2f).(), |
| 51 | &QItemSelectionModelcxx . . $ QItemSelectionModel#::currentChangedcxx . . $ QItemSelectionModel#currentChanged(d855417dd4a40a0)., |
| 52 | this, |
| 53 | &ArticleListNotificationcxx . . $ ArticleListNotification#::onMessageSelectedcxx . . $ ArticleListNotification#onMessageSelected(d855417dd4a40a0).); |
| 54 | |
| 55 | m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->setAttributecxx . . $ QWidget#setAttribute(52fc7bf162518f7f).(Qtcxx . . $ Qt/::WA_NoSystemBackgroundcxx . . $ Qt/WA_NoSystemBackground., true); |
| 56 | |
| 57 | // Make background transparent. |
| 58 | auto pal = m_uicxx . . $ QPalette#QPalette(f826ed73d5553cd5)..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->palettecxx . . $ QWidget#palette(a7bd6a16d2c88209).(); |
| 59 | pal.setColorcxx . . $ QPalette#setColor(4fd5272df43acd68).(QPalettecxx . . $ QPalette#::ColorRolecxx . . $ QPalette#ColorRole#::Basecxx . . $ QPalette#Base., Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::transparentcxx . . $ Qt/transparent.); |
| 60 | m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(pal); |
| 61 | |
| 62 | connectcxx . . $ QObject#connect(dad3a9587f3dce3c).(m_uicxx . . $ ArticleListNotification#m_ui..m_cmbFeedscxx . . $ Ui_ArticleListNotification#m_cmbFeeds., |
| 63 | QOverloadcxx . . $ QOverload#<int>::ofcxx . . $ QOverload#of(adaf930115d2ed26).(&QComboBoxcxx . . $ QComboBox#::currentIndexChangedcxx . . $ QComboBox#currentIndexChanged(d4f767463ce0a6b3).), |
| 64 | this, |
| 65 | &ArticleListNotificationcxx . . $ ArticleListNotification#::showFeedcxx . . $ ArticleListNotification#showFeed(d4f767463ce0a6b3).); |
| 66 | } |
| 67 | |
| 68 | void ArticleListNotificationcxx . . $ ArticleListNotification#::loadResultscxx . . $ ArticleListNotification#loadResults(71ebfcbf8d5f12fc).(const QHashcxx . . $ QHash#<Feedcxx . . $ Feed#*, QListcxx . . $ QList#<Messagecxx . . $ Message#>>& new_messages) { |
| 69 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_NOTIFICATIONScxx . . $ `src/librssguard/definitions/definitions.h:177:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Setting up RESULTS notification."; |
| 70 | setupTimedClosingcxx . . $ BaseToastNotification#setupTimedClosing(b45ddcbc8423892c).(false); |
| 71 | |
| 72 | m_newMessagescxx . . $ ArticleListNotification#m_newMessages. =cxx . . $ QHash#`operator=`(b389532fb067fae5). new_messages; |
| 73 | |
| 74 | m_uicxx . . $ ArticleListNotification#m_ui..m_cmbFeedscxx . . $ Ui_ArticleListNotification#m_cmbFeeds.->modelcxx . . $ QComboBox#model(c9c1e11e7bd96493).()->sortcxx . . $ QAbstractItemModel#sort(11168df8d4e8286d).(0, Qtcxx . . $ Qt/::SortOrdercxx . . $ Qt/SortOrder#::AscendingOrdercxx . . $ Qt/AscendingOrder.); |
| 75 | m_uicxx . . $ ArticleListNotification#m_ui..m_cmbFeedscxx . . $ Ui_ArticleListNotification#m_cmbFeeds.->clearcxx . . $ QComboBox#clear(49f6e7a06ebc5aa8).(); |
| 76 | |
| 77 | auto ks = new_messages.keyscxx . . $ QHash#keys(bf6c511543d55010).(); |
| 78 | |
| 79 | stdcxx . . $ std/::sortcxx . . $ std/sort(4d3091562df4e52e).(ks.begincxx . . $ QList#begin(ca2520f641887418).(), ks.endcxx . . $ QList#end(ca2520f641887418).(), [](Feedcxx . . $ Feed#* lhs, Feedcxx . . $ Feed#* rhs) { |
| 80 | return QStringcxx . . $ QString#::comparecxx . . $ QString#compare(1f3f562f55dad5ec).(lhs->sanitizedTitlecxx . . $ RootItem#sanitizedTitle(6ef7b6c27b00b43d).(), rhs->sanitizedTitlecxx . . $ RootItem#sanitizedTitle(6ef7b6c27b00b43d).(), Qtcxx . . $ Qt/::CaseSensitivitycxx . . $ Qt/CaseSensitivity#::CaseInsensitivecxx . . $ Qt/CaseInsensitive.) < 0; |
| 81 | }); |
| 82 | |
| 83 | for (Feedcxx . . $ Feed#* fd : ks) { |
| 84 | if (fd->isQuietcxx . . $ Feed#isQuiet(50ce9a9e25b4a850).()) { |
| 85 | continue; |
| 86 | } |
| 87 | |
| 88 | if (m_newMessagescxx . . $ ArticleListNotification#m_newMessages.[cxx . . $ QHash#`operator[]`(bbd415b616967878).fd].sizecxx . . $ QList#size(6b0412d51016192f).() > 0) { |
| 89 | m_uicxx . . $ ArticleListNotification#m_ui..m_cmbFeedscxx . . $ Ui_ArticleListNotification#m_cmbFeeds.->addItemcxx . . $ QComboBox#addItem(1c60a90c724e6bfb).(fd->sanitizedTitlecxx . . $ RootItem#sanitizedTitle(6ef7b6c27b00b43d).(), QVariantcxx . . $ QVariant#::fromValuecxx . . $ QVariant#fromValue(8eccd985207c29dd).(fd)); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | m_uicxx . . $ ArticleListNotification#m_ui..m_lblTitlecxx . . $ Ui_ArticleListNotification#m_lblTitle.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(trcxx . . $ ArticleListNotification#tr(75d9f1c324b4579d).("%n feeds fetched", nullptr, m_uicxx . . $ ArticleListNotification#m_ui..m_cmbFeedscxx . . $ Ui_ArticleListNotification#m_cmbFeeds.->countcxx . . $ QComboBox#count(455f465bc33b4cdf).())); |
| 94 | m_uicxx . . $ ArticleListNotification#m_ui..m_lblTitlecxx . . $ Ui_ArticleListNotification#m_lblTitle.->setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(m_uicxx . . $ ArticleListNotification#m_ui..m_lblTitlecxx . . $ Ui_ArticleListNotification#m_lblTitle.->textcxx . . $ QLabel#text(6ef7b6c27b00b43d).()); |
| 95 | } |
| 96 | |
| 97 | void ArticleListNotificationcxx . . $ ArticleListNotification#::openArticleInArticleListcxx . . $ ArticleListNotification#openArticleInArticleList(49f6e7a06ebc5aa8).() { |
| 98 | emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! openingArticleInArticleListRequestedcxx . . $ ArticleListNotification#openingArticleInArticleListRequested(12e982556975822d).(m_uicxx . . $ ArticleListNotification#m_ui..m_cmbFeedscxx . . $ Ui_ArticleListNotification#m_cmbFeeds.->currentDatacxx . . $ QComboBox#currentData(fb36142a814bbf95).().valuecxx . . $ QVariant#value(1e6269539e51e84a).<Feedcxx . . $ Feed#*>(), selectedMessagecxx . . $ ArticleListNotification#selectedMessage(9bb122cad34d6630).()); |
| 99 | |
| 100 | if (m_newMessagescxx . . $ ArticleListNotification#m_newMessages..sizecxx . . $ QHash#size(6b0412d51016192f).() == 1 && m_newMessagescxx . . $ ArticleListNotification#m_newMessages..valuecxx . . $ QHash#value(5f65a9ee2c9899ff).(m_newMessagescxx . . $ ArticleListNotification#m_newMessages..keyscxx . . $ QHash#keys(bf6c511543d55010).().atcxx . . $ QList#at(c7965f769b39929).(0)).sizecxx . . $ QList#size(6b0412d51016192f).() == 1) { |
| 101 | // We only have 1 message in 1 feed. |
| 102 | emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! closeRequestedcxx . . $ BaseToastNotification#closeRequested(8310c1ebbd6d7163).(this); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | void ArticleListNotificationcxx . . $ ArticleListNotification#::onMessageSelectedcxx . . $ ArticleListNotification#onMessageSelected(d855417dd4a40a0).(const QModelIndexcxx . . $ QModelIndex#& current, const QModelIndexcxx . . $ QModelIndex#& previous) { |
| 107 | Q_UNUSEDcxx . . $ `<external>/17563275351362271547/qtpreprocessorsupport.h:20:9`!(previous) |
| 108 | |
| 109 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnOpenArticleListcxx . . $ Ui_ArticleListNotification#m_btnOpenArticleList.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).()); |
| 110 | |
| 111 | try { |
| 112 | Messagecxx . . $ Message# msg = selectedMessagecxx . . $ ArticleListNotification#selectedMessage(9bb122cad34d6630).(); |
| 113 | |
| 114 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnOpenWebBrowsercxx . . $ Ui_ArticleListNotification#m_btnOpenWebBrowser.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!msg.m_urlcxx . . $ Message#m_url..isEmptycxx . . $ QString#isEmpty(3482b152b9333168).()); |
| 115 | } |
| 116 | catch (...) { |
| 117 | m_uicxx . . $ ArticleListNotification#m_ui..m_btnOpenWebBrowsercxx . . $ Ui_ArticleListNotification#m_btnOpenWebBrowser.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | void ArticleListNotificationcxx . . $ ArticleListNotification#::showFeedcxx . . $ ArticleListNotification#showFeed(d4f767463ce0a6b3).(int index) { |
| 122 | Q_UNUSEDcxx . . $ `<external>/17563275351362271547/qtpreprocessorsupport.h:20:9`!(index) |
| 123 | m_modelcxx . . $ ArticleListNotification#m_model.->setArticlescxx . . $ ArticleListNotificationModel#setArticles(2ca5a41c5027f22d).(m_newMessagescxx . . $ ArticleListNotification#m_newMessages..valuecxx . . $ QHash#value(5f65a9ee2c9899ff).(selectedFeedcxx . . $ ArticleListNotification#selectedFeed(352ac1c57353565c).())); |
| 124 | onMessageSelectedcxx . . $ ArticleListNotification#onMessageSelected(d855417dd4a40a0).({cxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).}, {cxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).}); |
| 125 | } |
| 126 | |
| 127 | void ArticleListNotificationcxx . . $ ArticleListNotification#::openArticleInWebBrowsercxx . . $ ArticleListNotification#openArticleInWebBrowser(49f6e7a06ebc5aa8).() { |
| 128 | Feedcxx . . $ Feed#* fd = selectedFeedcxx . . $ ArticleListNotification#selectedFeed(352ac1c57353565c).(); |
| 129 | Messagecxx . . $ Message# msg = selectedMessagecxx . . $ ArticleListNotification#selectedMessage(9bb122cad34d6630).(); |
| 130 | |
| 131 | markAsReadcxx . . $ ArticleListNotification#markAsRead(c40737f7b92cda08).(fd, {cxx . . $ QList#QList(b6da5b9a9f304025).msg}); |
| 132 | emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! reloadMessageListRequestedcxx . . $ ArticleListNotification#reloadMessageListRequested(b45ddcbc8423892c).(false); |
| 133 | |
| 134 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->webcxx . . $ Application#web(ad68e16c93841931).()->openUrlInExternalBrowsercxx . . $ WebFactory#openUrlInExternalBrowser(dd54f9efb9153ea5).(msgcxx . . $ QUrl#QUrl(ea1f3831e370f1cb)..m_urlcxx . . $ Message#m_url.); |
| 135 | |
| 136 | if (m_newMessagescxx . . $ ArticleListNotification#m_newMessages..sizecxx . . $ QHash#size(6b0412d51016192f).() == 1 && m_newMessagescxx . . $ ArticleListNotification#m_newMessages..valuecxx . . $ QHash#value(5f65a9ee2c9899ff).(m_newMessagescxx . . $ ArticleListNotification#m_newMessages..keyscxx . . $ QHash#keys(bf6c511543d55010).().atcxx . . $ QList#at(c7965f769b39929).(0)).sizecxx . . $ QList#size(6b0412d51016192f).() == 1) { |
| 137 | // We only have 1 message in 1 feed. |
| 138 | emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! closeRequestedcxx . . $ BaseToastNotification#closeRequested(8310c1ebbd6d7163).(this); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | void ArticleListNotificationcxx . . $ ArticleListNotification#::markAllReadcxx . . $ ArticleListNotification#markAllRead(49f6e7a06ebc5aa8).() { |
| 143 | for (Feedcxx . . $ Feed#* fd : m_newMessagescxx . . $ ArticleListNotification#m_newMessages..keyscxx . . $ QHash#keys(bf6c511543d55010).()) { |
| 144 | markAsReadcxx . . $ ArticleListNotification#markAsRead(c40737f7b92cda08).(fd, m_newMessagescxx . . $ ArticleListNotification#m_newMessages..valuecxx . . $ QHash#value(5f65a9ee2c9899ff).(fd)); |
| 145 | } |
| 146 | |
| 147 | emitcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:51:10`! reloadMessageListRequestedcxx . . $ ArticleListNotification#reloadMessageListRequested(b45ddcbc8423892c).(false); |
| 148 | } |
| 149 | |
| 150 | void ArticleListNotificationcxx . . $ ArticleListNotification#::markAsReadcxx . . $ ArticleListNotification#markAsRead(c40737f7b92cda08).(Feedcxx . . $ Feed#* feed, const QListcxx . . $ QList#<Messagecxx . . $ Message#>& articles) { |
| 151 | ServiceRootcxx . . $ ServiceRoot#* acc = feed->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).(); |
| 152 | QStringListcxx . . $ QStringList# message_idscxx . . $ QList#QList(ced63f7c635d850d).; |
| 153 | message_ids.reservecxx . . $ QList#reserve(35cb52607f6af42f).(articles.sizecxx . . $ QList#size(6b0412d51016192f).()); |
| 154 | |
| 155 | // Obtain IDs of all desired messages. |
| 156 | for (const Messagecxx . . $ Message#& message : articles) { |
| 157 | message_ids.appendcxx . . $ QList#append(1262c8661f7a27a7).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(message.m_idcxx . . $ Message#m_id.)); |
| 158 | } |
| 159 | |
| 160 | if (acc->onBeforeSetMessagesReadcxx . . $ ServiceRoot#onBeforeSetMessagesRead(560bab74201c5167).(feed, articles, RootItemcxx . . $ RootItem#::ReadStatuscxx . . $ RootItem#ReadStatus#::Readcxx . . $ RootItem#ReadStatus#Read.)) { |
| 161 | auto db = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->databasecxx . . $ Application#database(4a253a6ca99872d8).()->drivercxx . . $ DatabaseFactory#driver(5299be7c9afd522d).()->connectioncxx . . $ DatabaseDriver#connection(32d6d64cc6e35a97).(metaObjectcxx . . $ QString#QString(85c52e162fed56f9).()->classNamecxx . . $ QMetaObject#className(a9f41ea0e82d88cf).()); |
| 162 | |
| 163 | if (DatabaseQueriescxx . . $ DatabaseQueries#::markMessagesReadUnreadcxx . . $ DatabaseQueries#markMessagesReadUnread(4554379270358a8).(db, message_ids, RootItemcxx . . $ RootItem#::ReadStatuscxx . . $ RootItem#ReadStatus#::Readcxx . . $ RootItem#ReadStatus#Read.)) { |
| 164 | acc->onAfterSetMessagesReadcxx . . $ ServiceRoot#onAfterSetMessagesRead(560bab74201c5167).(feed, articles, RootItemcxx . . $ RootItem#::ReadStatuscxx . . $ RootItem#ReadStatus#::Readcxx . . $ RootItem#ReadStatus#Read.); |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | Feedcxx . . $ Feed#* ArticleListNotificationcxx . . $ ArticleListNotification#::selectedFeedcxx . . $ ArticleListNotification#selectedFeed(352ac1c57353565c).(int index) const { |
| 170 | if (index < 0) { |
| 171 | return m_uicxx . . $ ArticleListNotification#m_ui..m_cmbFeedscxx . . $ Ui_ArticleListNotification#m_cmbFeeds.->currentDatacxx . . $ QComboBox#currentData(fb36142a814bbf95).().valuecxx . . $ QVariant#value(1e6269539e51e84a).<Feedcxx . . $ Feed#*>(); |
| 172 | } |
| 173 | else { |
| 174 | return m_uicxx . . $ ArticleListNotification#m_ui..m_cmbFeedscxx . . $ Ui_ArticleListNotification#m_cmbFeeds.->itemDatacxx . . $ QComboBox#itemData(db8258505c7ad0b0).(index).valuecxx . . $ QVariant#value(1e6269539e51e84a).<Feedcxx . . $ Feed#*>(); |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | Messagecxx . . $ Message# ArticleListNotificationcxx . . $ ArticleListNotification#::selectedMessagecxx . . $ ArticleListNotification#selectedMessage(9bb122cad34d6630).() const { |
| 179 | if (m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).()) { |
| 180 | return m_modelcxx . . $ ArticleListNotification#m_model.->messagecxx . . $ ArticleListNotificationModel#message(a029b2e5d25672da).(m_uicxx . . $ ArticleListNotification#m_ui..m_treeArticlescxx . . $ Ui_ArticleListNotification#m_treeArticles.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).()); |
| 181 | } |
| 182 | else { |
| 183 | throw ApplicationExceptioncxx . . $ ApplicationException#(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("message cannot be loaded, wrong index")); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | bool ArticleListNotificationcxx . . $ ArticleListNotification#::eventFiltercxx . . $ ArticleListNotification#eventFilter(978aa4af1d030efa).(QObjectcxx . . $ QObject#* watched, QEventcxx . . $ QEvent#* event) { |
| 188 | if (event->typecxx . . $ QEvent#type(916a8de57f4d422b).() == QEventcxx . . $ QEvent#::Typecxx . . $ QEvent#Type#::MouseButtonReleasecxx . . $ QEvent#MouseButtonRelease.) { |
| 189 | if (dynamic_cast<QMouseEventcxx . . $ QMouseEvent#*>(event)->buttoncxx . . $ QSinglePointEvent#button(4a2598559eeedfc9).() == Qtcxx . . $ Qt/::MouseButtoncxx . . $ Qt/MouseButton#::MiddleButtoncxx . . $ Qt/MiddleButton.) { |
| 190 | openArticleInArticleListcxx . . $ ArticleListNotification#openArticleInArticleList(49f6e7a06ebc5aa8).(); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | return BaseToastNotificationcxx . . $ BaseToastNotification#::eventFiltercxx . . $ BaseToastNotification#eventFilter(978aa4af1d030efa).(watched, event); |
| 195 | } |