Commit f708b248aec810a1dcad1f13e1c16390244c9834
- Diff rendering mode:
- inline
- side by side
src/gui/image/qpixmap.cpp
(4 / 5)
|   | |||
| 831 | 831 | if (QPixmapCache::find(key, *this)) | |
| 832 | 832 | return true; | |
| 833 | 833 | ||
| 834 | if (!data) | ||
| 835 | data = QPixmapData::create(0, 0, QPixmapData::PixmapType); | ||
| 836 | |||
| 837 | if (data->fromFile(fileName, format, flags)) { | ||
| 834 | QPixmapData *tmp = QPixmapData::create(0, 0, QPixmapData::PixmapType); | ||
| 835 | if (tmp->fromFile(fileName, format, flags)) { | ||
| 836 | data = tmp; | ||
| 838 | 837 | QPixmapCache::insert(key, *this); | |
| 839 | 838 | return true; | |
| 840 | 839 | } | |
| 841 | |||
| 840 | delete tmp; | ||
| 842 | 841 | return false; | |
| 843 | 842 | } | |
| 844 | 843 |

