]> git.lyx.org Git - features.git/commitdiff
Fix Qt deprecation warn for QPixmapCache::find()
authorScott Kostyshak <skostysh@lyx.org>
Sat, 7 Mar 2020 03:46:18 +0000 (22:46 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Sat, 7 Mar 2020 03:46:18 +0000 (22:46 -0500)
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

index 6ab81ce20706d5884b69a0c603736d90e0234db1..74fe357971da0f4fba805a928738a93576088a01 100644 (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()) {