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:
parent
197a46313d
commit
2bb83f6b16
@ -1187,6 +1187,9 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
|
|||||||
if (!alreadyAdded)
|
if (!alreadyAdded)
|
||||||
d->engine->addFile(fileName, size, mode, state);
|
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.
|
// Check if a "@Nx" file exists and add it.
|
||||||
QString atNxFileName = qt_findAtNxFile(fileName, qApp->devicePixelRatio());
|
QString atNxFileName = qt_findAtNxFile(fileName, qApp->devicePixelRatio());
|
||||||
if (atNxFileName != fileName)
|
if (atNxFileName != fileName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user