mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Simplify statement
This commit is contained in:
parent
07de39ff17
commit
deb9a6b37f
@ -631,7 +631,7 @@ void TrackerFiltersList::handleFavicoDownload(const QString& url, const QString&
|
|||||||
QIcon icon(filePath);
|
QIcon icon(filePath);
|
||||||
//Detect a non-decodable icon
|
//Detect a non-decodable icon
|
||||||
QList<QSize> sizes = icon.availableSizes();
|
QList<QSize> sizes = icon.availableSizes();
|
||||||
bool invalid = (sizes.size() > 0 ? icon.pixmap(sizes.first()).isNull() : true);
|
bool invalid = (sizes.isEmpty() || icon.pixmap(sizes.first()).isNull());
|
||||||
if (invalid) {
|
if (invalid) {
|
||||||
if (url.endsWith(".ico", Qt::CaseInsensitive)) {
|
if (url.endsWith(".ico", Qt::CaseInsensitive)) {
|
||||||
Logger::instance()->addMessage(tr("Couldn't decode favicon for URL '%1'. Trying to download favicon in PNG format.").arg(url),
|
Logger::instance()->addMessage(tr("Couldn't decode favicon for URL '%1'. Trying to download favicon in PNG format.").arg(url),
|
||||||
|
Loading…
Reference in New Issue
Block a user