summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicswidget
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-05-17 18:00:03 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-05-17 18:00:03 (GMT)
commit91a1f7a1c408052b1d284d6b901819964e338fe5 (patch)
treedf7103f0ea0cb9d98f4b641d72c0f8b0ebdf2498 /tests/auto/qgraphicswidget
parent94a3356d5eb7b255d439efe2699bf3a9b025e8eb (diff)
parent509ef11ab4ba6165c16d9d311c4a1bf7cdfd2528 (diff)
downloadQt-91a1f7a1c408052b1d284d6b901819964e338fe5.zip
Qt-91a1f7a1c408052b1d284d6b901819964e338fe5.tar.gz
Qt-91a1f7a1c408052b1d284d6b901819964e338fe5.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
Diffstat (limited to 'tests/auto/qgraphicswidget')
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index 5a1d20b..ed8ff04 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -169,6 +169,7 @@ private slots:
void initialShow();
void initialShow2();
void itemChangeEvents();
+ void itemSendGeometryPosChangesDeactivated();
// Task fixes
void task236127_bspTreeIndexFails();
@@ -3030,6 +3031,34 @@ void tst_QGraphicsWidget::itemChangeEvents()
QTRY_VERIFY(!item->valueDuringEvents.value(QEvent::EnabledChange).toBool());
}
+void tst_QGraphicsWidget::itemSendGeometryPosChangesDeactivated()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QGraphicsWidget *item = new QGraphicsWidget;
+ scene.addItem(item);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ item->setGeometry(QRectF(0, 0, 50, 50));
+ QTRY_COMPARE(item->geometry(), QRectF(0, 0, 50, 50));
+
+ item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false);
+ item->setGeometry(QRectF(0, 0, 60, 60));
+ QCOMPARE(item->geometry(), QRectF(0, 0, 60, 60));
+ QCOMPARE(item->pos(), QPointF(0, 0));
+ item->setPos(QPointF(10, 10));
+ QCOMPARE(item->pos(), QPointF(10, 10));
+ QCOMPARE(item->geometry(), QRectF(10, 10, 60, 60));
+
+ item->setFlag(QGraphicsItem::ItemSendsScenePositionChanges, false);
+ item->setGeometry(QRectF(0, 0, 60, 60));
+ QCOMPARE(item->geometry(), QRectF(0, 0, 60, 60));
+ QCOMPARE(item->pos(), QPointF(0, 0));
+ item->setPos(QPointF(10, 10));
+ QCOMPARE(item->pos(), QPointF(10, 10));
+ QCOMPARE(item->geometry(), QRectF(10, 10, 60, 60));
+}
+
void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems()
{
QGraphicsScene scene;