From b6171cfbe3b1453a2c46f78db0df4819e4e5e54f Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Mon, 29 Jun 2009 13:47:24 +0200 Subject: 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 --- src/gui/styles/qgtkstyle.cpp | 3 +-- 1 file changed, 1 insertion(+), 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); -- cgit v0.12