From 7df54ad534d2856f3bb48a92fe874a764c1537ff Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Fri, 8 Sep 2023 09:19:16 +0300 Subject: [PATCH] Don't limit max RSS feed file size PR #19576. --- src/base/rss/feed_serializer.cpp | 3 +-- src/gui/aboutdialog.cpp | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/base/rss/feed_serializer.cpp b/src/base/rss/feed_serializer.cpp index 062360ba7..ce097c41c 100644 --- a/src/base/rss/feed_serializer.cpp +++ b/src/base/rss/feed_serializer.cpp @@ -45,8 +45,7 @@ const int ARTICLEDATALIST_TYPEID = qRegisterMetaType>(); void RSS::Private::FeedSerializer::load(const Path &dataFileName, const QString &url) { - const int fileMaxSize = 10 * 1024 * 1024; - const auto readResult = Utils::IO::readFile(dataFileName, fileMaxSize); + const auto readResult = Utils::IO::readFile(dataFileName, -1); if (!readResult) { if (readResult.error().status == Utils::IO::ReadError::NotExist) diff --git a/src/gui/aboutdialog.cpp b/src/gui/aboutdialog.cpp index 32d21884a..6c4f6464b 100644 --- a/src/gui/aboutdialog.cpp +++ b/src/gui/aboutdialog.cpp @@ -74,22 +74,19 @@ AboutDialog::AboutDialog(QWidget *parent) m_ui->labelMascot->setPixmap(Utils::Gui::scaledPixmap(Path(u":/icons/mascot.png"_s), this)); // Thanks - if (const auto readResult = Utils::IO::readFile(Path(u":/thanks.html"_s), -1, QIODevice::Text) - ; readResult) + if (const auto readResult = Utils::IO::readFile(Path(u":/thanks.html"_s), -1, QIODevice::Text)) { m_ui->textBrowserThanks->setHtml(QString::fromUtf8(readResult.value())); } // Translation - if (const auto readResult = Utils::IO::readFile(Path(u":/translators.html"_s), -1, QIODevice::Text) - ; readResult) + if (const auto readResult = Utils::IO::readFile(Path(u":/translators.html"_s), -1, QIODevice::Text)) { m_ui->textBrowserTranslation->setHtml(QString::fromUtf8(readResult.value())); } // License - if (const auto readResult = Utils::IO::readFile(Path(u":/gpl.html"_s), -1, QIODevice::Text) - ; readResult) + if (const auto readResult = Utils::IO::readFile(Path(u":/gpl.html"_s), -1, QIODevice::Text)) { m_ui->textBrowserLicense->setHtml(QString::fromUtf8(readResult.value())); }