Don't use deprecated QPixmapCache::find overload
Silence compile time warning and show correct usage in example snippet. Change-Id: I1936f006e4b5f3ca71bbc0100ed039beeb459271 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
parent
048f0a00fa
commit
295a16b0d3
@ -49,9 +49,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
//! [0]
|
||||
QPixmap* pp;
|
||||
QPixmap p;
|
||||
if ((pp=QPixmapCache::find("my_big_image", pm))) {
|
||||
if (QPixmap *pp = QPixmapCache::find("my_big_image"))) {
|
||||
p = *pp;
|
||||
} else {
|
||||
p.load("bigimage.png");
|
||||
|
@ -6125,7 +6125,7 @@ QIcon QCommonStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption
|
||||
const QString cacheKey = QLatin1String("qt_mac_constructQIconFromIconRef") + QString::number(standardIcon) + QString::number(size.width());
|
||||
if (standardIcon >= QStyle::SP_CustomBase) {
|
||||
mainIcon = theme->standardPixmap(sp, QSizeF(size));
|
||||
} else if (QPixmapCache::find(cacheKey, mainIcon) == false) {
|
||||
} else if (QPixmapCache::find(cacheKey, &mainIcon) == false) {
|
||||
mainIcon = theme->standardPixmap(sp, QSizeF(size));
|
||||
QPixmapCache::insert(cacheKey, mainIcon);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user