Backport QPixmap::find() deprecation warning fixes

This commit is contained in:
Juergen Spitzmueller 2021-03-13 12:05:36 +01:00
parent 85ece5fb3d
commit f02e79e204
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ public:
QString const name = ":" + toqstr(list_->icon(index.row()));
if (name == ":")
return scaled;
if (!QPixmapCache::find("completion" + name, scaled)) {
if (!QPixmapCache::find("completion" + name, &scaled)) {
// load icon from disk
QPixmap p = QPixmap(name);
if (!p.isNull()) {

View File

@ -418,7 +418,7 @@ void GuiPainter::text(int x, int y, docstring const & s,
// Morover the first/last element is possibly not the right one since the glyph may have changed.
int const lb = min(fm.lbearing(s[0]), 0);
int const mA = fm.maxAscent();
if (QPixmapCache::find(key, pm)) {
if (QPixmapCache::find(key, &pm)) {
// Draw the cached pixmap.
drawPixmap(x + lb, y - mA, pm);
return;