QIcon: remove redundant nullptr check

Remove a redundant nullptr check found by CodeChecker.

Change-Id: I03327475e1df8de27459457fc8fc2c66592889ab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Christian Ehrlicher 2024-05-29 19:04:22 +02:00
parent f26ada15a7
commit 6843e5d26d

View File

@ -304,6 +304,8 @@ QPixmap QPixmapIconEngine::scaledPixmap(const QSize &size, QIcon::Mode mode, QIc
QPixmapIconEngineEntry *pe = bestMatch(size, scale, mode, state, false); QPixmapIconEngineEntry *pe = bestMatch(size, scale, mode, state, false);
if (pe) if (pe)
pm = pe->pixmap; pm = pe->pixmap;
else
return pm;
if (pm.isNull()) { if (pm.isNull()) {
removePixmapEntry(pe); removePixmapEntry(pe);
@ -315,7 +317,7 @@ QPixmap QPixmapIconEngine::scaledPixmap(const QSize &size, QIcon::Mode mode, QIc
const auto actualSize = adjustSize(size, pm.size()); const auto actualSize = adjustSize(size, pm.size());
QString key = "qt_"_L1 QString key = "qt_"_L1
% HexString<quint64>(pm.cacheKey()) % HexString<quint64>(pm.cacheKey())
% HexString<quint8>(pe ? pe->mode : QIcon::Normal) % HexString<quint8>(pe->mode)
% HexString<quint64>(QGuiApplication::palette().cacheKey()) % HexString<quint64>(QGuiApplication::palette().cacheKey())
% HexString<uint>(actualSize.width()) % HexString<uint>(actualSize.width())
% HexString<uint>(actualSize.height()); % HexString<uint>(actualSize.height());