QIcon: don't search for high-res svg icons

There is no need to search for high-res svg icons - a svg scalable by
design. Also the QSvgIconEngine does not support it.

Pick-to: 6.8
Change-Id: Ib76c887900ce77268e9c0253cb697b8de9e7f10e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c64774eef72411029f7c2fb611328f25b83ff8ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2024-12-11 19:22:09 +01:00 committed by Qt Cherry-pick Bot
parent 197a46313d
commit 2bb83f6b16

View File

@ -1187,6 +1187,9 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
if (!alreadyAdded)
d->engine->addFile(fileName, size, mode, state);
if (d->engine->key() == "svg"_L1) // not needed and also not supported
return;
// Check if a "@Nx" file exists and add it.
QString atNxFileName = qt_findAtNxFile(fileName, qApp->devicePixelRatio());
if (atNxFileName != fileName)