mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
Backport QPixmap::find() deprecation warning fixes
This commit is contained in:
parent
85ece5fb3d
commit
f02e79e204
@ -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()) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user