From 4e4c0055d59978850796ff8c1b5015e17459e8d2 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Wed, 31 Mar 2010 02:17:28 +0200 Subject: Revert "Add a a layout property in QGraphicsWidget." This reverts commit 87fae30fc63460e0ed2cc98f55a22e28d7520311. This drop the support of QML on top of 4.6 --- src/gui/graphicsview/qgraphicswidget.cpp | 1 - src/gui/graphicsview/qgraphicswidget.h | 2 -- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 654a432..131ee87 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -801,7 +801,6 @@ void QGraphicsWidget::setLayout(QGraphicsLayout *l) l->setParentLayoutItem(this); l->d_func()->reparentChildItems(this); l->invalidate(); - emit layoutChanged(); } /*! diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h index 730674c..468a134 100644 --- a/src/gui/graphicsview/qgraphicswidget.h +++ b/src/gui/graphicsview/qgraphicswidget.h @@ -82,7 +82,6 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay Q_PROPERTY(Qt::WindowFlags windowFlags READ windowFlags WRITE setWindowFlags) Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle) Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry NOTIFY geometryChanged) - Q_PROPERTY(QGraphicsLayout* layout READ layout WRITE setLayout NOTIFY layoutChanged) public: QGraphicsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0); ~QGraphicsWidget(); @@ -177,7 +176,6 @@ public: Q_SIGNALS: void geometryChanged(); - void layoutChanged(); public Q_SLOTS: bool close(); diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index b78ef26..5a3a54c 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -942,7 +942,6 @@ void tst_QGraphicsWidget::layout() layout->addItem(item); children.append(item); } - QSignalSpy spy(&widget, SIGNAL(layoutChanged())); widget.setLayout(layout); QTRY_COMPARE(widget.layout(), static_cast(layout)); @@ -951,7 +950,7 @@ void tst_QGraphicsWidget::layout() QCOMPARE(item->parentWidget(), (QGraphicsWidget *)&widget); QVERIFY(item->geometry() != QRectF(0, 0, -1, -1)); } - QCOMPARE(spy.count(), 1); + // don't crash widget.setLayout(0); } -- cgit v0.12