Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QIcon::addFile: don't use QMimeDatabase for every PNG being loaded
Commit 710ff39 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 <[email protected]>
- Loading branch information