equal
deleted
inserted
replaced
161 void widgetSendsGeometryChanges(); |
161 void widgetSendsGeometryChanges(); |
162 void respectHFW(); |
162 void respectHFW(); |
163 void addChildInpolishEvent(); |
163 void addChildInpolishEvent(); |
164 void polishEvent(); |
164 void polishEvent(); |
165 void polishEvent2(); |
165 void polishEvent2(); |
|
166 void initialShow(); |
166 |
167 |
167 // Task fixes |
168 // Task fixes |
168 void task236127_bspTreeIndexFails(); |
169 void task236127_bspTreeIndexFails(); |
169 void task243004_setStyleCrash(); |
170 void task243004_setStyleCrash(); |
170 void task250119_shortcutContext(); |
171 void task250119_shortcutContext(); |
2854 |
2855 |
2855 // Make sure the item got polish event. |
2856 // Make sure the item got polish event. |
2856 QVERIFY(widget->events.contains(QEvent::Polish)); |
2857 QVERIFY(widget->events.contains(QEvent::Polish)); |
2857 } |
2858 } |
2858 |
2859 |
|
2860 void tst_QGraphicsWidget::initialShow() |
|
2861 { |
|
2862 class MyGraphicsWidget : public QGraphicsWidget |
|
2863 { public: |
|
2864 MyGraphicsWidget() : repaints(0) {} |
|
2865 int repaints; |
|
2866 void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget*) { ++repaints; } |
|
2867 void polishEvent() { update(); } |
|
2868 }; |
|
2869 |
|
2870 QGraphicsScene scene; |
|
2871 MyGraphicsWidget *widget = new MyGraphicsWidget; |
|
2872 |
|
2873 QGraphicsView view(&scene); |
|
2874 view.show(); |
|
2875 QTest::qWaitForWindowShown(&view); |
|
2876 |
|
2877 QTest::qWait(100); |
|
2878 scene.addItem(widget); |
|
2879 QTest::qWait(100); |
|
2880 |
|
2881 QCOMPARE(widget->repaints, 1); |
|
2882 } |
|
2883 |
2859 void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() |
2884 void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() |
2860 { |
2885 { |
2861 QGraphicsScene scene; |
2886 QGraphicsScene scene; |
2862 QGraphicsWidget* parent1 = new QGraphicsWidget; |
2887 QGraphicsWidget* parent1 = new QGraphicsWidget; |
2863 QGraphicsWidget* child1_0 = new QGraphicsWidget; |
2888 QGraphicsWidget* child1_0 = new QGraphicsWidget; |