Remove warning about non existing paint device engine
authorTitta Heikkala <titta.heikkala@digia.com>
Thu, 16 Aug 2012 08:27:57 +0000 (11:27 +0300)
committerQt by Nokia <qt-info@nokia.com>
Tue, 21 Aug 2012 06:58:40 +0000 (08:58 +0200)
commit929e934969c621d7c1773e4233c14d358de4d385
tree24b6483cc2380832820ef05205fc6cf4955dc215
parent97150f169fbec63dbc49def5ee48781b97a4b610
Remove warning about non existing paint device engine

The QWindowsVistaStyle::drawPrimitive() method was trying to draw the
pixmap for an item in an item view even if the section width was zero
or less then zero. This resulted "QPainter::begin: Paint device
returned engine == 0, type: 2" error.
It's now checked that the width and the height of the section is
greater than zero before creating the painter.

Task-number: QTBUG-26047
Change-Id: I36dd2792fd505be773951e5ac36b0e3362ec2292
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/widgets/styles/qwindowsvistastyle.cpp