@@ -681,7 +681,9 @@ RootItem* TtRssGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons, co
681
681
auto * parent = new RootItem ();
682
682
683
683
// Chop the "api/" from the end of the address.
684
- qDebug (" TT-RSS: Base address to '%s' to get feed icons." , qPrintable (base_address));
684
+ qDebugNN << LOGSEC_TTRSS
685
+ << " Base address to get feed icons is"
686
+ << QUOTE_W_SPACE_DOT (base_address);
685
687
686
688
if (status () == TTRSS_API_STATUS_OK) {
687
689
// We have data, construct object tree according to data.
@@ -731,22 +733,26 @@ RootItem* TtRssGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons, co
731
733
// We have feed.
732
734
auto * feed = new TtRssFeed ();
733
735
734
- IOFactory::writeFile (" aa.json" , QJsonDocument (item).toJson ());
735
-
736
736
if (obtain_icons) {
737
737
QString icon_path = item[QSL (" icon" )].type () == QJsonValue::String ? item[QSL (" icon" )].toString () : QString ();
738
738
739
739
if (!icon_path.isEmpty ()) {
740
740
// Chop the "api/" suffix out and append
741
741
QString full_icon_address = base_address + QL1C (' /' ) + icon_path;
742
742
QIcon icon;
743
+ auto res = NetworkFactory::downloadIcon ({ { full_icon_address, true } },
744
+ DOWNLOAD_TIMEOUT,
745
+ icon,
746
+ proxy);
743
747
744
- if (NetworkFactory::downloadIcon ({ { full_icon_address, true } },
745
- DOWNLOAD_TIMEOUT,
746
- icon,
747
- proxy) == QNetworkReply::NoError) {
748
+ if (res == QNetworkReply::NoError) {
748
749
feed->setIcon (icon);
749
750
}
751
+ else {
752
+ qWarningNN << LOGSEC_TTRSS
753
+ << " Failed to download icon with error"
754
+ << QUOTE_W_SPACE_DOT (res);
755
+ }
750
756
}
751
757
}
752
758
0 commit comments