diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-06-29 11:47:24 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-06-29 11:54:31 (GMT) |
commit | b6171cfbe3b1453a2c46f78db0df4819e4e5e54f (patch) | |
tree | bc86f0aa2843d484094b01118771955b285212dc /src/gui/styles | |
parent | 4efa1ba22825fb9a8be572dbf595cb29a4e4840b (diff) | |
download | Qt-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/gui/styles')
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 3 |
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); |