From 8d923ea94f49eee3ad6cda201a04b1125031ebe7 Mon Sep 17 00:00:00 2001 From: zccrs Date: Mon, 13 Aug 2018 16:41:27 +0800 Subject: [PATCH] fix: return a null pixmap in QIcon::pixmap Change-Id: I22929fdf7fc5d3aee53da133ef8fe0b0d2a88eab --- platformthemeplugin/qdeepintheme.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platformthemeplugin/qdeepintheme.cpp b/platformthemeplugin/qdeepintheme.cpp index ee63ef41..166dbcb8 100644 --- a/platformthemeplugin/qdeepintheme.cpp +++ b/platformthemeplugin/qdeepintheme.cpp @@ -228,6 +228,8 @@ class XdgIconProxyEngine : public QIconEngine #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) if (id == QIconEngine::ScaledPixmapHook) { + engine->ensureLoaded(); + QIconEngine::ScaledPixmapArgument &arg = *reinterpret_cast(data); // QIcon::pixmap() multiplies size by the device pixel ratio. const int integerScale = qCeil(arg.scale);