summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget.cpp
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-08-17 13:41:51 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-08-17 14:03:18 (GMT)
commit85edfcbde9f1d2f77a05edb8d01361c76234f47c (patch)
tree2ea157a78561ca64fdc6a1edc226b12b610aa6d1 /src/gui/graphicsview/qgraphicswidget.cpp
parent53807e58770f27d46ca8ecaa33a3d5f7b6925517 (diff)
downloadQt-85edfcbde9f1d2f77a05edb8d01361c76234f47c.zip
Qt-85edfcbde9f1d2f77a05edb8d01361c76234f47c.tar.gz
Qt-85edfcbde9f1d2f77a05edb8d01361c76234f47c.tar.bz2
Merge QGV delta from kinetic-declarativeui into master.
New flag: QGraphicsItem::ItemNegativeZStacksBehindParent, which makes it easy to toggle stack-behind based on the value of Z alone. Add interface initializations to QGV classes. Add a simple internal focus policy to QGraphicsItem to allow derived items to be focusable without allowing clickfocus. Reviewed-by: Alexis
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 64881b5..4b41f1f 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -258,7 +258,7 @@ QGraphicsWidget::~QGraphicsWidget()
//we check if we have a layout previously
if (d->layout) {
- delete d->layout;
+ QGraphicsLayout *temp = d->layout;
foreach (QGraphicsItem * item, childItems()) {
// In case of a custom layout which doesn't remove and delete items, we ensure that
// the parent layout item does not point to the deleted layout. This code is here to
@@ -269,6 +269,8 @@ QGraphicsWidget::~QGraphicsWidget()
widget->setParentLayoutItem(0);
}
}
+ d->layout = 0;
+ delete temp;
}
// Remove this graphics widget from widgetStyles