summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-06-29 11:47:24 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-06-29 11:54:31 (GMT)
commitb6171cfbe3b1453a2c46f78db0df4819e4e5e54f (patch)
treebc86f0aa2843d484094b01118771955b285212dc /src
parent4efa1ba22825fb9a8be572dbf595cb29a4e4840b (diff)
downloadQt-b6171cfbe3b1453a2c46f78db0df4819e4e5e54f.zip
Qt-b6171cfbe3b1453a2c46f78db0df4819e4e5e54f.tar.gz
Qt-b6171cfbe3b1453a2c46f78db0df4819e4e5e54f.tar.bz2
Fix coverity warning
Coverity was complaining because we were not checking the return value of find() but instead using the pixmap handle to check the result. This makes the call more consistent Reviewed-by: mgoetz
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qgtkstyle.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 218f651..e2dcfba 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -686,11 +686,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
const QString pmKey = QString(QLS("windowframe %0")).arg(option->state);
QPixmap pixmap;
- QPixmapCache::find(pmKey, pixmap);
QRect pmRect(QPoint(0,0), QSize(pmSize, pmSize));
// Only draw through style once
- if (pixmap.isNull()) {
+ if (!QPixmapCache::find(pmKey, pixmap)) {
pixmap = QPixmap(pmSize, pmSize);
pixmap.fill(Qt::transparent);
QPainter pmPainter(&pixmap);