summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index bf0acc9..157fbe5 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -74,7 +74,6 @@ QT_BEGIN_NAMESPACE
\brief The QGraphicsWidget class is the base class for all widget
items in a QGraphicsScene.
\since 4.4
- \ingroup multimedia
\ingroup graphicsview-api
QGraphicsWidget is an extended base item that provides extra functionality
@@ -258,7 +257,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 +268,8 @@ QGraphicsWidget::~QGraphicsWidget()
widget->setParentLayoutItem(0);
}
}
+ d->layout = 0;
+ delete temp;
}
// Remove this graphics widget from widgetStyles