Commit c63c918
QLabel: don't cache scaled pixmap in QIcon
Caching the scaled QPixmap directly in QIcon is not a good idea
- the cached pixmap might be used as starting point for a pixmap with
another size so it gets blurry
- QIcon has no caching mechanism to throw away unneeded QPixmaps after
some time so the memory usage grows indefinitely
Fixes: QTBUG-134930
Change-Id: Ic490ba15438a5cd07a555692e1d08cd1c211d005
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7a238e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 04cb0a1)
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>1 parent 4c02701 commit c63c918
1 file changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
1054 | 1055 | | |
1055 | 1056 | | |
1056 | 1057 | | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1060 | 1073 | | |
1061 | 1074 | | |
1062 | 1075 | | |
| |||
0 commit comments