QFusionStyle paints sliders outside of clip

When painting a slider the QFusionStyle overrides the existing clip
on QPainter thereby causing itself to be painting unclipped.

Changes replace clipping with intersection clipping.

Task-number: QTBUG-40530
Change-Id: I0135928c36ca1d23c906cf82c584ded01720b1cc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
Allan Sandfeld Jensen 2014-08-08 14:38:22 +02:00
parent 347be657b7
commit b3431a9553

View File

@ -2890,7 +2890,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
clipRect = QRect(groove.left(), groove.top(), groove.width(), handle.top() - groove.top()); clipRect = QRect(groove.left(), groove.top(), groove.width(), handle.top() - groove.top());
} }
painter->save(); painter->save();
painter->setClipRect(clipRect.adjusted(0, 0, 1, 1)); painter->setClipRect(clipRect.adjusted(0, 0, 1, 1), Qt::IntersectClip);
painter->drawPixmap(groove.topLeft(), cache); painter->drawPixmap(groove.topLeft(), cache);
painter->restore(); painter->restore();
} }