Fix error: 'find' is deprecated: Use bool find(const QString &, QPixmap *)

instead.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-07-24 15:10:13 +03:00
parent 16a5adbbd4
commit 8e481d6fea
2 changed files with 2 additions and 2 deletions

View file

@ -214,7 +214,7 @@ QPixmap QPixmapFromCache(const QString &pixmapPath)
{ {
QPixmap pixmap; QPixmap pixmap;
if (not QPixmapCache::find(pixmapPath, pixmap)) if (not QPixmapCache::find(pixmapPath, &pixmap))
{ {
pixmap = QPixmap(pixmapPath); pixmap = QPixmap(pixmapPath);
QPixmapCache::insert(pixmapPath, pixmap); QPixmapCache::insert(pixmapPath, pixmap);

View file

@ -130,7 +130,7 @@ void StyleHelper::drawIconWithShadow(const QIcon &icon, const QRect &rect, QPain
QPixmap cache; QPixmap cache;
QString pixmapName = QString::fromLatin1("icon %0 %1 %2").arg(icon.cacheKey()).arg(iconMode).arg(rect.height()); QString pixmapName = QString::fromLatin1("icon %0 %1 %2").arg(icon.cacheKey()).arg(iconMode).arg(rect.height());
if (!QPixmapCache::find(pixmapName, cache)) if (!QPixmapCache::find(pixmapName, &cache))
{ {
// High-dpi support: The in parameters (rect, radius, offset) are in // High-dpi support: The in parameters (rect, radius, offset) are in
// device-independent pixels. The call to QIcon::pixmap() below might // device-independent pixels. The call to QIcon::pixmap() below might