QPrintPreviewWidget: use QSignalBlocker

Change-Id: Ic2d48c8e2c9c3c6f06e67ebf7e12bd4899b421aa
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2013-10-26 11:05:26 +02:00 committed by The Qt Project
parent abbffdd4be
commit 64050fe92e

View File

@ -162,9 +162,10 @@ signals:
protected:
void resizeEvent(QResizeEvent* e)
{
const bool blocked = verticalScrollBar()->blockSignals(true); // Don't change page, QTBUG-14517
{
const QSignalBlocker blocker(verticalScrollBar()); // Don't change page, QTBUG-14517
QGraphicsView::resizeEvent(e);
verticalScrollBar()->blockSignals(blocked);
}
emit resized();
}