[LyX/master] Fix Qt deprecation warn for QPixmapCache::find()

Scott Kostyshak skostysh at lyx.org
Sat Mar 7 03:32:10 UTC 2020


commit c6f4682b7521c9733aa6a6de3b319f7648ef0d20
Author: Scott Kostyshak <skostysh at lyx.org>
Date:   Fri Mar 6 22:46:18 2020 -0500

    Fix Qt deprecation warn for QPixmapCache::find()
    
    Fix the following warning from Qt 5.14.1:
    
      error: ‘static bool QPixmapCache::find(const QString&, QPixmap&)’ is deprecated: Use bool find(const QString &, QPixmap*) instead [-Werror=deprecated-declarations]
---
 src/frontends/qt/GuiCompleter.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiCompleter.cpp b/src/frontends/qt/GuiCompleter.cpp
index 6ab81ce..74fe357 100644
--- a/src/frontends/qt/GuiCompleter.cpp
+++ b/src/frontends/qt/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()) {


More information about the lyx-cvs mailing list