diff options
author | David Faure <david.faure@kdab.com> | 2018-10-02 15:28:19 +0200 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2018-10-04 01:07:00 +0000 |
commit | 80cc6bcec4b204e50d1f2c7460a0b91c7d9ea6f9 (patch) | |
tree | 10cc3b7d49dca7eb59a58ddb4421d2ac2f452e72 /src/widgets/widgets/qabstractscrollarea.cpp | |
parent | 4f4a33196dc37a9405a8dbd20a1e63d36e000d2f (diff) |
QIcon::addFile: don't use QMimeDatabase for every PNG being loaded
Commit 710ff392d9 introduced this fallback code for the case where the
extension was empty. Let's make it happen only in that case, so that the
much more common case of "foo.png" doesn't go through
iconEngineFromSuffix twice, nor through QMimeDatabase (which has to load
and parse an XML file in order to determine preferredSuffix(),
unfortunately).
Found using heaptrack.
Change-Id: Iab6b71e1fa23916029c9e2ba25447a12d70f88a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets/widgets/qabstractscrollarea.cpp')
0 files changed, 0 insertions, 0 deletions