From 828ac562cb3fbec415c54d83736976377c0b291f Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 7 Dec 2023 15:13:28 +0100 Subject: [PATCH] edit mirrors of aqt --- aqt/settings.ini | 9 +++++---- src/librssguard/network-web/webfactory.cpp | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/aqt/settings.ini b/aqt/settings.ini index eb98172a2..a43ad7682 100644 --- a/aqt/settings.ini +++ b/aqt/settings.ini @@ -5,12 +5,13 @@ baseurl: https://mirror.netcologne.de/qtproject [mirrors] trusted_mirrors: https://download.qt.io + https://mirrors.ocf.berkeley.edu/qt + https://ftp.jaist.ac.jp/pub/qtproject + http://ftp1.nluug.nl/languages/qt + https://mirrors.dotsrc.org/qtproject blacklist: http://mirrors.ustc.edu.cn http://mirrors.tuna.tsinghua.edu.cn http://mirrors.geekpie.club fallbacks: - https://mirrors.ocf.berkeley.edu/qt - https://ftp.jaist.ac.jp/pub/qtproject - http://ftp1.nluug.nl/languages/qt - https://mirrors.dotsrc.org/qtproject \ No newline at end of file + \ No newline at end of file diff --git a/src/librssguard/network-web/webfactory.cpp b/src/librssguard/network-web/webfactory.cpp index 863787856..21ceb1ea9 100644 --- a/src/librssguard/network-web/webfactory.cpp +++ b/src/librssguard/network-web/webfactory.cpp @@ -328,7 +328,10 @@ QString WebFactory::limitSizeOfHtmlImages(const QString& html, int desired_width } } else { - // No dimensions given or just height. + // No dimensions given. + // In this case we simply rely on original image dimensions + // if no specific limit is set. + // Too wide images will get downscaled. if (desired_max_height > 0) { attrs.insert("height", QString::number(desired_max_height)); } @@ -337,6 +340,7 @@ QString WebFactory::limitSizeOfHtmlImages(const QString& html, int desired_width else { attrs.remove("width"); attrs.remove("height"); + if (desired_max_height > 0) { attrs.insert("style", QSL("max-height: %1px !important;").arg(desired_max_height)); }