summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-04-06 14:22:04 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-04-06 14:26:14 (GMT)
commitfc0a71e4b4e4ce1e0f57c6d7be6bd9d935062fc2 (patch)
treef0d7387dcd82fc5ed2651d34ccdfcafda938cfb8 /tests
parenta93551a2e3e590400b09bc076d3a6883c162b75d (diff)
downloadQt-fc0a71e4b4e4ce1e0f57c6d7be6bd9d935062fc2.zip
Qt-fc0a71e4b4e4ce1e0f57c6d7be6bd9d935062fc2.tar.gz
Qt-fc0a71e4b4e4ce1e0f57c6d7be6bd9d935062fc2.tar.bz2
Update the autotest to pass again due to a previous behaviuour change.
Font propagation changed slightly in some cases due to change 22d472c17167c4ca8df5678842768ab63b7baadd. However, the change is sane - its just the autotest that is not optimal. Task-number: 246215 Reviewed-by: andreas
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index d1d1857..b99f111 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -1475,7 +1475,7 @@ void tst_QGraphicsProxyWidget::scrollUpdate()
view.paintEventRegion = QRegion();
view.npaints = 0;
QTimer::singleShot(0, widget, SLOT(updateScroll()));
- QTest::qWait(500);
+ QTest::qWait(500);
QCOMPARE(view.npaints, 2);
// QRect(0, 0, 200, 12) is the first update, expanded (-2, -2, 2, 2)
// QRect(0, 12, 102, 10) is the scroll update, expanded (-2, -2, 2, 2),
@@ -2582,7 +2582,7 @@ void tst_QGraphicsProxyWidget::childPos()
{
#ifdef Q_OS_IRIX
QSKIP("This test is not reliable on IRIX.", SkipAll);
-#endif
+#endif
QFETCH(bool, moveCombo);
QFETCH(QPoint, comboPos);
QFETCH(QPointF, proxyPos);
@@ -2797,6 +2797,7 @@ void tst_QGraphicsProxyWidget::palettePropagation()
void tst_QGraphicsProxyWidget::fontPropagation()
{
// Construct a font with an unlikely setup
+ QGraphicsScene scene;
QFont lineEditFont = QApplication::font("QLineEdit");
QFont font = lineEditFont;
font.setPointSize(43);
@@ -2805,6 +2806,7 @@ void tst_QGraphicsProxyWidget::fontPropagation()
QGraphicsProxyWidget proxy;
proxy.setWidget(edit);
+ scene.addItem(&proxy);
EventSpy editSpy(edit);
EventSpy proxySpy(&proxy);
@@ -2825,6 +2827,7 @@ void tst_QGraphicsProxyWidget::fontPropagation()
// Proxy to widget
proxy.setFont(font);
+ QApplication::processEvents(); // wait for QEvent::Polish
QVERIFY(proxy.testAttribute(Qt::WA_SetFont));
QCOMPARE(editSpy.counts[QEvent::FontChange], 3);
QCOMPARE(proxySpy.counts[QEvent::FontChange], 1);
@@ -2893,7 +2896,7 @@ void tst_QGraphicsProxyWidget::createProxyForChildWidget()
edit2->setText("QLineEdit 2");
QCheckBox *checkbox = new QCheckBox("QCheckBox");
QVBoxLayout *vlayout = new QVBoxLayout;
-
+
vlayout->addWidget(edit1);
vlayout->addWidget(edit2);
vlayout->addWidget(checkbox);
@@ -2916,7 +2919,7 @@ void tst_QGraphicsProxyWidget::createProxyForChildWidget()
QVERIFY(window.graphicsProxyWidget() == 0);
QVERIFY(checkbox->graphicsProxyWidget() == 0);
-
+
QGraphicsProxyWidget *windowProxy = scene.addWidget(&window);
QGraphicsView view(&scene);
view.show();
@@ -2946,10 +2949,10 @@ void tst_QGraphicsProxyWidget::createProxyForChildWidget()
QVERIFY(boxProxy->size() == box->size());
QTest::qWait(10);
-
+
QSignalSpy spy(checkbox, SIGNAL(clicked()));
-
+
QTest::mousePress(view.viewport(), Qt::LeftButton, 0,
view.mapFromScene(checkboxProxy->mapToScene(QPointF(8,8))));
QTRY_COMPARE(spy.count(), 0);
@@ -2958,7 +2961,7 @@ void tst_QGraphicsProxyWidget::createProxyForChildWidget()
QTRY_COMPARE(spy.count(), 1);
-
+
boxProxy->setWidget(0);
QVERIFY(checkbox->graphicsProxyWidget() == 0);
@@ -3006,10 +3009,10 @@ void tst_QGraphicsProxyWidget::actionsContextMenu()
widget->addAction(new QAction("item 2", widget));
widget->addAction(new QAction("item 3", widget));
widget->setContextMenuPolicy(Qt::ActionsContextMenu);
-
+
QGraphicsScene scene;
scene.addWidget(widget);
-
+
QGraphicsView view(&scene);
view.show();
#ifdef Q_WS_X11