summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/shared/arthurstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/painting/shared/arthurstyle.cpp')
-rw-r--r--examples/widgets/painting/shared/arthurstyle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/painting/shared/arthurstyle.cpp b/examples/widgets/painting/shared/arthurstyle.cpp
index f4fc76bda6..3df9d9a6dc 100644
--- a/examples/widgets/painting/shared/arthurstyle.cpp
+++ b/examples/widgets/painting/shared/arthurstyle.cpp
@@ -61,10 +61,10 @@
QPixmap cached(const QString &img)
{
- if (QPixmap *p = QPixmapCache::find(img))
- return *p;
-
QPixmap pm;
+ if (QPixmapCache::find(img, &pm))
+ return pm;
+
pm = QPixmap::fromImage(QImage(img), Qt::OrderedDither | Qt::OrderedAlphaDither);
if (pm.isNull())
return QPixmap();