From f02e79e20415ca04c6ebd130d58c80f2ffa9babd Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 13 Mar 2021 12:05:36 +0100 Subject: [PATCH] Backport QPixmap::find() deprecation warning fixes --- src/frontends/qt4/GuiCompleter.cpp | 2 +- src/frontends/qt4/GuiPainter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiCompleter.cpp b/src/frontends/qt4/GuiCompleter.cpp index 767bb6bac7..6da6b51182 100644 --- a/src/frontends/qt4/GuiCompleter.cpp +++ b/src/frontends/qt4/GuiCompleter.cpp @@ -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()) { diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp index c635c6f827..3d950aac9f 100644 --- a/src/frontends/qt4/GuiPainter.cpp +++ b/src/frontends/qt4/GuiPainter.cpp @@ -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;