From daee9af969a04a2919a948ba1f5d314626925a9a Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 25 Jan 2019 21:15:43 +0100 Subject: QtGui: mark obsolete QPixmapCache::find() functions as deprecated QPixmapCache::find(QString) and QPixmapCache::find(QString, QPixmap&) are deprecated since Qt4 times. Explicit mark them as deprecated so they can be removed with Qt6. Change-Id: Iaf185f69afe02203559a1c812fbb4a95c9049a1d Reviewed-by: Eirik Aavitsland --- examples/widgets/painting/shared/arthurstyle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/widgets') 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(); -- cgit v1.2.3