Skip to content

Commit

Permalink
fix: return a null pixmap in QIcon::pixmap
Browse files Browse the repository at this point in the history
Change-Id: I22929fdf7fc5d3aee53da133ef8fe0b0d2a88eab
  • Loading branch information
zccrs committed Aug 13, 2018
1 parent 5b2d2f1 commit 8d923ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platformthemeplugin/qdeepintheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<QIconEngine::ScaledPixmapArgument*>(data);
// QIcon::pixmap() multiplies size by the device pixel ratio.
const int integerScale = qCeil(arg.scale);
Expand Down

0 comments on commit 8d923ea

Please sign in to comment.