diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-25 21:15:43 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-02-02 12:49:25 +0000 |
commit | daee9af969a04a2919a948ba1f5d314626925a9a (patch) | |
tree | 19f40c501ea42e4fa4deea7d4e102b863d6c6bab /examples/widgets/painting | |
parent | df39627fa33392a71ab79aadaa57e5c5e650e79e (diff) |
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 <eirik.aavitsland@qt.io>
Diffstat (limited to 'examples/widgets/painting')
-rw-r--r-- | examples/widgets/painting/shared/arthurstyle.cpp | 6 |
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(); |