summaryrefslogtreecommitdiff
path: root/src/widgets/styles/qpixmapstyle.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-17 14:15:53 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-17 14:43:26 +0100
commite5ac4afbf954a3e1616ce8543d46ddc668d0374f (patch)
treebe6d97001edebd5cb74c64aaf0010f3cc76a7293 /src/widgets/styles/qpixmapstyle.cpp
parente3ed95dd44b95b6e9361b562807e711d7ce5a58b (diff)
parent03c1a6ac717e3c5693653a5e294214056bda970e (diff)
downloadqtbase-e5ac4afbf954a3e1616ce8543d46ddc668d0374f.tar.gz
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: mkspecs/features/mac/default_post.prf mkspecs/features/uikit/default_post.prf Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
Diffstat (limited to 'src/widgets/styles/qpixmapstyle.cpp')
-rw-r--r--src/widgets/styles/qpixmapstyle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/styles/qpixmapstyle.cpp b/src/widgets/styles/qpixmapstyle.cpp
index b51860045d..e973a96a91 100644
--- a/src/widgets/styles/qpixmapstyle.cpp
+++ b/src/widgets/styles/qpixmapstyle.cpp
@@ -628,10 +628,10 @@ void QPixmapStyle::drawCachedPixmap(QPixmapStyle::ControlDescriptor control, con
QPainter *p) const
{
Q_D(const QPixmapStyle);
- if (!d->descriptors.contains(control))
+ auto descriptor = d->descriptors.constFind(control);
+ if (descriptor == d->descriptors.constEnd())
return;
- const QPixmapStyleDescriptor &desc = d->descriptors.value(control);
- const QPixmap pix = d->getCachedPixmap(control, desc, rect.size());
+ const QPixmap pix = d->getCachedPixmap(control, descriptor.value(), rect.size());
Q_ASSERT(!pix.isNull());
p->drawPixmap(rect, pix);
}