summaryrefslogtreecommitdiff
path: root/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
diff options
context:
space:
mode:
authorJohn Tapsell <john.tapsell.ext@basyskom.de>2011-05-27 07:31:55 +0100
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2011-05-27 13:02:31 +0200
commit575e832fd053df98e60aefebbc5843a4864f2523 (patch)
tree218fea560ec7064698536aa60aeec7188f540803 /doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
parent6c10e72fc838f8f9f5c3a3e4a297088b1725262c (diff)
downloadqt4-tools-575e832fd053df98e60aefebbc5843a4864f2523.tar.gz
Fixed move a QGraphicsWidget and invalidate its layout at the same time
QGraphicsWidget::setGeometry() could sometimes call QGraphicsLayoutItem::setGeometry() with an uninitialized rectangle. This happened in the specific case where the widget had a layout that was not active, and where setPos was called on the widget. This would in turn cause it to enter setGeometry() where it would act as expected. However, due to the fact that we sent a LayoutRequest event at the end of that function, it could result in that QGraphicsLayout::activate() would call setGeometry again. Now, we would actually enter setGeometry, where wd->inSetPos == 1. Then, we would not enter the "if (!wd->inSetPos)" block nor the "if (moved)" block. It would then end up calling QGraphicsLayoutItem::setGeometry(newGeom), where newGeom was uninitialized. Bug happens only when QGraphicsLayout::setInstantInvalidatePropagation(true) was used, because that was the condition for sending the layout request from setGeometry() Tracked down and written by Stanislav Ionascu. Reviewed-by: Jan-Arve Sæther
Diffstat (limited to 'doc/src/snippets/code/src_script_qscriptvalueiterator.cpp')
0 files changed, 0 insertions, 0 deletions