From 5f377ecf7a473094908f9355b4c22fdcbd83c0d5 Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Tue, 6 Apr 2010 13:43:38 +1000 Subject: Remove qWait functions as it is used in QTRY_* macros. Reviewed-by: rohan mcgovern --- tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 36 ++++++++-------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index 49b840f..dbd4a23 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -277,9 +277,8 @@ void tst_QGraphicsEffect::draw() // Make sure installing the effect triggers a repaint. CustomEffect *effect = new CustomEffect; item->setGraphicsEffect(effect); - QTest::qWait(50); - QCOMPARE(effect->numRepaints, 1); - QCOMPARE(item->numRepaints, 1); + QTRY_COMPARE(effect->numRepaints, 1); + QTRY_COMPARE(item->numRepaints, 1); // Make sure QPainter* and QStyleOptionGraphicsItem* stays persistent // during QGraphicsEffect::draw/QGraphicsItem::paint. @@ -293,26 +292,23 @@ void tst_QGraphicsEffect::draw() // Make sure updating the source triggers a repaint. item->update(); - QTest::qWait(50); - QCOMPARE(effect->numRepaints, 1); - QCOMPARE(item->numRepaints, 1); + QTRY_COMPARE(effect->numRepaints, 1); + QTRY_COMPARE(item->numRepaints, 1); QVERIFY(effect->m_sourceChangedFlags & QGraphicsEffect::SourceInvalidated); effect->reset(); item->reset(); // Make sure changing the effect's bounding rect triggers a repaint. effect->setMargin(20); - QTest::qWait(50); - QCOMPARE(effect->numRepaints, 1); - QCOMPARE(item->numRepaints, 1); + QTRY_COMPARE(effect->numRepaints, 1); + QTRY_COMPARE(item->numRepaints, 1); effect->reset(); item->reset(); // Make sure change the item's bounding rect triggers a repaint. item->setRect(0, 0, 50, 50); - QTest::qWait(50); - QCOMPARE(effect->numRepaints, 1); - QCOMPARE(item->numRepaints, 1); + QTRY_COMPARE(effect->numRepaints, 1); + QTRY_COMPARE(item->numRepaints, 1); QVERIFY(effect->m_sourceChangedFlags & QGraphicsEffect::SourceBoundingRectChanged); effect->reset(); item->reset(); @@ -320,8 +316,7 @@ void tst_QGraphicsEffect::draw() // Make sure the effect is the one to issue a repaint of the item. effect->doNothingInDraw = true; item->update(); - QTest::qWait(50); - QCOMPARE(effect->numRepaints, 1); + QTRY_COMPARE(effect->numRepaints, 1); QCOMPARE(item->numRepaints, 0); effect->doNothingInDraw = false; effect->reset(); @@ -336,9 +331,8 @@ void tst_QGraphicsEffect::draw() item->reset(); effect->setEnabled(true); - QTest::qWait(50); - QCOMPARE(effect->numRepaints, 1); - QCOMPARE(item->numRepaints, 1); + QTRY_COMPARE(effect->numRepaints, 1); + QTRY_COMPARE(item->numRepaints, 1); effect->reset(); item->reset(); @@ -352,8 +346,7 @@ void tst_QGraphicsEffect::draw() QPointer ptr = effect; item->setGraphicsEffect(0); QVERIFY(!ptr); - QTest::qWait(50); - QCOMPARE(item->numRepaints, 1); + QTRY_COMPARE(item->numRepaints, 1); } void tst_QGraphicsEffect::opacity() @@ -515,7 +508,6 @@ void tst_QGraphicsEffect::drawPixmapItem() QTRY_VERIFY(effect->repaints >= 1); item->rotate(180); - QTest::qWait(50); QTRY_VERIFY(effect->repaints >= 2); } @@ -560,9 +552,8 @@ void tst_QGraphicsEffect::deviceCoordinateTranslateCaching() int numRepaints = item->numRepaints; item->translate(10, 0); - QTest::qWait(50); - QVERIFY(item->numRepaints == numRepaints); + QTRY_VERIFY(item->numRepaints == numRepaints); } void tst_QGraphicsEffect::inheritOpacity() @@ -588,7 +579,6 @@ void tst_QGraphicsEffect::inheritOpacity() int numRepaints = item->numRepaints; rectItem->setOpacity(1); - QTest::qWait(50); // item should have been rerendered due to opacity changing QTRY_VERIFY(item->numRepaints > numRepaints); -- cgit v0.12 From f8f83e3a9177531169c3c2b525c868b6f4016381 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Tue, 6 Apr 2010 13:25:59 +0300 Subject: Fixed modal dialog not to have automatic "Exit" right softkey in S60. During softkey refactoring this piece of code get changes, but the changed code did not work correctly if window had no softkey actions. Switched back to old way where softkey source is stored to variable, and windowType is asked from stored variable. If softkey source is dialog or popup, "Exit" is not added automatically to RSK. Task-number: QT-2203 Reviewed-by: Sami Merila --- src/gui/kernel/qsoftkeymanager.cpp | 1 + src/gui/kernel/qsoftkeymanager_common_p.h | 3 ++- src/gui/kernel/qsoftkeymanager_s60.cpp | 13 ++----------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 923144a..23f1481 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -242,6 +242,7 @@ bool QSoftKeyManager::handleUpdateSoftKeys() d->requestedSoftKeyActions.clear(); bool recursiveMerging = false; QWidget *source = softkeySource(NULL, recursiveMerging); + d->initialSoftKeySource = source; while (source) { if (appendSoftkeys(*source, level)) ++level; diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h index 460d0dc..04ddf7d 100644 --- a/src/gui/kernel/qsoftkeymanager_common_p.h +++ b/src/gui/kernel/qsoftkeymanager_common_p.h @@ -70,6 +70,7 @@ protected: static QSoftKeyManager *self; QHash keyedActions; QMultiHash requestedSoftKeyActions; + QWidget *initialSoftKeySource; }; @@ -79,4 +80,4 @@ QT_END_NAMESPACE QT_END_HEADER -#endif // QSOFTKEYMANAGER_COMMON_P_H \ No newline at end of file +#endif // QSOFTKEYMANAGER_COMMON_P_H diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index 9812d72..7d643c2 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -312,17 +312,8 @@ bool QSoftKeyManagerPrivateS60::setMiddleSoftkey(CEikButtonGroupContainer &cba) bool QSoftKeyManagerPrivateS60::setRightSoftkey(CEikButtonGroupContainer &cba) { if (!setSoftkey(cba, QAction::NegativeSoftKey, RSK_POSITION)) { - Qt::WindowType windowType = Qt::Window; - QAction *action = requestedSoftKeyActions.value(0); - if (action) { - QWidget *actionParent = action->parentWidget(); - Q_ASSERT_X(actionParent, Q_FUNC_INFO, "No parent set for softkey action!"); - - QWidget *actionWindow = actionParent->window(); - Q_ASSERT_X(actionWindow, Q_FUNC_INFO, "Softkey action does not have window!"); - windowType = actionWindow->windowType(); - } - + const Qt::WindowType windowType = initialSoftKeySource + ? initialSoftKeySource->window()->windowType() : Qt::Window; if (windowType != Qt::Dialog && windowType != Qt::Popup) { QString text(QSoftKeyManager::tr("Exit")); TPtrC nativeText = qt_QString2TPtrC(text); -- cgit v0.12 From a70d247d81d2f49faab522af5e4c2a815682c78a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 6 Apr 2010 15:32:29 +0200 Subject: Fix crash for multiscript text in QTextEngine::boundingBox() The logClusters pointer is already adjusted for the item, so it should be indexed relative to the item, hence from 0 to itemLength-1. Adding pos to the index would give us a random value for all script items > 0. Thus this would sometimes crash for text that spanned several scripts, since we would sometimes get a value back which was outside the bounds of the glyph array. Task-number: QTBUG-9374 Reviewed-by: Samuel --- src/gui/text/qtextengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index b826588..eaa80d3 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1648,7 +1648,7 @@ glyph_metrics_t QTextEngine::boundingBox(int from, int len) const } } - glyph_t glyph = glyphs.glyphs[logClusters[pos + ilen - 1]]; + glyph_t glyph = glyphs.glyphs[logClusters[ilen - 1]]; glyph_metrics_t gi = fe->boundingBox(glyph); if (gi.isValid()) gm.width -= qRound(gi.xoff - gi.x - gi.width); -- cgit v0.12 From 307d9d3f5f95fe0ebcd834adca9f3f8c46264ab2 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 6 Apr 2010 16:49:25 +0200 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( e3dc4ef2b801d91e115c54f833fa7766d392ceda ) Changes in WebKit/qt since the last update: * r51006 -- https://bugs.webkit.org/show_bug.cgi?id=31475 -- Crash in StringHash::equal due to unaligned string data --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 14 ++++++++++++++ src/3rdparty/webkit/WebCore/platform/text/StringHash.h | 12 ++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 4de7ad8..45608c5 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - ecfa4583e573ce4dff1f0df12f6bdba3022376e5 + e3dc4ef2b801d91e115c54f833fa7766d392ceda diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 2bd506b..a2bd5c3 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2009-11-15 Dave Tapuska + + Reviewed by George Staikos. + + Compare UChars single unit at a time as opposed to the uint32_t + approach as casting to unaligned addresses may cause a bus failure + on ARMv5 and below. This change replicates the same defines that + exists in AtomicString.cpp + + https://bugs.webkit.org/show_bug.cgi?id=31475 + + * platform/text/StringHash.h: + (WebCore::StringHash::equal): + 2010-03-25 yael aharon Reviewed by Laszlo Gombos. diff --git a/src/3rdparty/webkit/WebCore/platform/text/StringHash.h b/src/3rdparty/webkit/WebCore/platform/text/StringHash.h index 336dce3..5d01ea8 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/StringHash.h +++ b/src/3rdparty/webkit/WebCore/platform/text/StringHash.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved + * Copyright (C) Research In Motion Limited 2009. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -47,6 +48,16 @@ namespace WebCore { if (aLength != bLength) return false; +#if PLATFORM(ARM) || PLATFORM(SH4) + const UChar* aChars = a->characters(); + const UChar* bChars = b->characters(); + for (unsigned i = 0; i != aLength; ++i) { + if (*aChars++ != *bChars++) + return false; + } + return true; +#else + /* Do it 4-bytes-at-a-time on architectures where it's safe */ const uint32_t* aChars = reinterpret_cast(a->characters()); const uint32_t* bChars = reinterpret_cast(b->characters()); @@ -59,6 +70,7 @@ namespace WebCore { return false; return true; +#endif } static unsigned hash(const RefPtr& key) { return key->hash(); } -- cgit v0.12 From b81f90ac0ff2be8f73bda785bb644281d515c291 Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Wed, 7 Apr 2010 14:12:37 +1000 Subject: Remove qWait functions as it is used in QTRY_* macros. Reviewed-by: jason mcdonald --- .../tst_qgraphicseffectsource.cpp | 25 ++++++++--------- tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp | 21 ++++++--------- .../tst_qgraphicsproxywidget.cpp | 31 +++++----------------- 3 files changed, 25 insertions(+), 52 deletions(-) diff --git a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp index be03481..49f110e 100644 --- a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp +++ b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp @@ -48,6 +48,8 @@ #include +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= @@ -220,9 +222,8 @@ void tst_QGraphicsEffectSource::styleOption() QCOMPARE(item->numRepaints, 0); QCOMPARE(effect->numRepaints, 0); item->update(); - QTest::qWait(50); - QCOMPARE(item->numRepaints, 1); - QCOMPARE(effect->numRepaints, 1); + QTRY_COMPARE(item->numRepaints, 1); + QTRY_COMPARE(effect->numRepaints, 1); } void tst_QGraphicsEffectSource::isPixmap() @@ -255,10 +256,9 @@ void tst_QGraphicsEffectSource::update() QCOMPARE(effect->numRepaints, 0); effect->source()->update(); - QTest::qWait(50); - QCOMPARE(item->numRepaints, 1); - QCOMPARE(effect->numRepaints, 1); + QTRY_COMPARE(item->numRepaints, 1); + QTRY_COMPARE(effect->numRepaints, 1); } void tst_QGraphicsEffectSource::boundingRect() @@ -273,22 +273,20 @@ void tst_QGraphicsEffectSource::boundingRect() // We can at least check that the device bounding rect was correct in QGraphicsEffect::draw. effect->storeDeviceDependentStuff = true; effect->source()->update(); - QTest::qWait(50); const QTransform deviceTransform = item->deviceTransform(view->viewportTransform()); - QCOMPARE(effect->sourceDeviceBoundingRect, deviceTransform.mapRect(itemBoundingRect)); + QTRY_COMPARE(effect->sourceDeviceBoundingRect, deviceTransform.mapRect(itemBoundingRect)); // Bounding rect in logical coordinates is of course fine. - QCOMPARE(effect->source()->boundingRect(Qt::LogicalCoordinates), itemBoundingRect); + QTRY_COMPARE(effect->source()->boundingRect(Qt::LogicalCoordinates), itemBoundingRect); // Make sure default value is Qt::LogicalCoordinates. - QCOMPARE(effect->source()->boundingRect(), itemBoundingRect); + QTRY_COMPARE(effect->source()->boundingRect(), itemBoundingRect); } void tst_QGraphicsEffectSource::deviceRect() { effect->storeDeviceDependentStuff = true; effect->source()->update(); - QTest::qWait(50); - QCOMPARE(effect->deviceRect, view->viewport()->rect()); + QTRY_COMPARE(effect->deviceRect, view->viewport()->rect()); } void tst_QGraphicsEffectSource::pixmap() @@ -299,8 +297,7 @@ void tst_QGraphicsEffectSource::pixmap() // We can at least verify a valid pixmap from QGraphicsEffect::draw. effect->storeDeviceDependentStuff = true; effect->source()->update(); - QTest::qWait(50); - QVERIFY(!effect->deviceCoordinatesPixmap.isNull()); + QTRY_VERIFY(!effect->deviceCoordinatesPixmap.isNull()); // Pixmaps in logical coordinates we can do fine. QPixmap pixmap1 = effect->source()->pixmap(Qt::LogicalCoordinates); diff --git a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp index fb2e145..dad3279 100644 --- a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp +++ b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp @@ -44,6 +44,8 @@ #include #include +#include "../../shared/util.h" + //TESTED_CLASS=QGraphicsLayout //TESTED_FILES= @@ -423,22 +425,15 @@ void tst_QGraphicsLayout::alternativeLayoutItems() view.resize(150, 150); view.show(); - QApplication::processEvents(); - QTest::qWait(750); - QApplication::processEvents(); - - QCOMPARE(static_cast(li1->graphicsItem())->rect(), QRectF( 0, 0, 33, 99)); - QCOMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(33, 0, 33, 99)); - QCOMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(66, 0, 33, 99)); + QTRY_COMPARE(static_cast(li1->graphicsItem())->rect(), QRectF( 0, 0, 33, 99)); + QTRY_COMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(33, 0, 33, 99)); + QTRY_COMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(66, 0, 33, 99)); lout->setOrientation(Qt::Vertical); - QApplication::processEvents(); - QTest::qWait(750); - QApplication::processEvents(); - QCOMPARE(static_cast(li1->graphicsItem())->rect(), QRectF(0, 0, 99, 33)); - QCOMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(0, 33, 99, 33)); - QCOMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(0, 66, 99, 33)); + QTRY_COMPARE(static_cast(li1->graphicsItem())->rect(), QRectF(0, 0, 99, 33)); + QTRY_COMPARE(static_cast(li2->graphicsItem())->rect(), QRectF(0, 33, 99, 33)); + QTRY_COMPARE(static_cast(li3->graphicsItem())->rect(), QRectF(0, 66, 99, 33)); } diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 23b3458..e46709b 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -787,7 +787,6 @@ void tst_QGraphicsProxyWidget::focusNextPrevChild() view.show(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QApplication::processEvents(); QTRY_COMPARE(QApplication::activeWindow(), &view); if (hasScene) { scene.addItem(proxy); @@ -836,7 +835,6 @@ void tst_QGraphicsProxyWidget::focusOutEvent() view.activateWindow(); view.setFocus(); QTest::qWaitForWindowShown(&view); - QApplication::processEvents(); QTRY_VERIFY(view.isVisible()); QTRY_COMPARE(QApplication::activeWindow(), &view); @@ -989,7 +987,6 @@ void tst_QGraphicsProxyWidget::hoverEnterLeaveEvent() // in QTest::mouseMove(&view, QPoint(50, 50)); - QTest::qWait(25); QTRY_COMPARE(widget->testAttribute(Qt::WA_UnderMouse), hasWidget ? true : false); // ### this attribute isn't supported QCOMPARE(widget->enterCount, hasWidget ? 1 : 0); @@ -999,11 +996,10 @@ void tst_QGraphicsProxyWidget::hoverEnterLeaveEvent() // out QTest::mouseMove(&view, QPoint(10, 10)); - QTest::qWait(25); // QTRY_COMPARE(widget->testAttribute(Qt::WA_UnderMouse), false); // ### this attribute isn't supported - QCOMPARE(widget->leaveCount, hasWidget ? 1 : 0); - QCOMPARE(widget->hoverLeave, (hasWidget && hoverEnabled) ? 1 : 0); + QTRY_COMPARE(widget->leaveCount, hasWidget ? 1 : 0); + QTRY_COMPARE(widget->hoverLeave, (hasWidget && hoverEnabled) ? 1 : 0); // does not work on all platforms //QCOMPARE(widget->moveCount, 0); @@ -1071,7 +1067,6 @@ void tst_QGraphicsProxyWidget::hoverMoveEvent() // move a little bit QTest::mouseMove(&view, QPoint(60, 60)); - QTest::qWait(12); QTRY_COMPARE(widget->hoverEnter, (hasWidget && hoverEnabled) ? 1 : 0); QCOMPARE(widget->moveCount, (hasWidget && mouseTracking) || (hasWidget && mouseDown) ? 1 : 0); @@ -1097,7 +1092,6 @@ void tst_QGraphicsProxyWidget::keyPressEvent() view.viewport()->setFocus(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QApplication::processEvents(); QTRY_COMPARE(QApplication::activeWindow(), &view); SubQGraphicsProxyWidget *proxy = new SubQGraphicsProxyWidget; @@ -1305,13 +1299,11 @@ void tst_QGraphicsProxyWidget::paintEvent() scene.addItem(&proxy); //make sure we flush all the paint events - QTest::qWait(30); QTRY_VERIFY(proxy.paintCount > 1); QTest::qWait(30); proxy.paintCount = 0; w->update(); - QTest::qWait(30); QTRY_COMPARE(proxy.paintCount, 1); //the widget should have been painted now } @@ -1504,7 +1496,6 @@ void tst_QGraphicsProxyWidget::scrollUpdate() view.paintEventRegion = QRegion(); view.npaints = 0; QTimer::singleShot(0, widget, SLOT(updateScroll())); - QTest::qWait(50); QTRY_COMPARE(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), @@ -2483,9 +2474,7 @@ void tst_QGraphicsProxyWidget::popup_basic() QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center()))); - QTest::qWait(12); - - QCOMPARE(box->pos(), QPoint()); + QTRY_COMPARE(box->pos(), QPoint()); QCOMPARE(proxy->childItems().count(), 1); QGraphicsProxyWidget *child = (QGraphicsProxyWidget*)(proxy->childItems())[0]; @@ -2498,7 +2487,6 @@ void tst_QGraphicsProxyWidget::popup_basic() QSKIP("Does not work due to SH_Combobox_Popup", SkipAll); QCOMPARE(child->widget()->parent(), static_cast(box)); - QTest::qWait(12); QTRY_COMPARE(proxy->pos(), QPointF(box->pos())); QCOMPARE(child->x(), qreal(box->x())); QCOMPARE(child->y(), qreal(box->rect().bottom())); @@ -2583,13 +2571,11 @@ void tst_QGraphicsProxyWidget::changingCursor_basic() // in QTest::mouseMove(view.viewport(), view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center()))); sendMouseMove(view.viewport(), view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center()))); - QTest::qWait(12); QTRY_COMPARE(view.viewport()->cursor().shape(), Qt::IBeamCursor); // out QTest::mouseMove(view.viewport(), QPoint(1, 1)); sendMouseMove(view.viewport(), QPoint(1, 1)); - QTest::qWait(12); QTRY_COMPARE(view.viewport()->cursor().shape(), Qt::ArrowCursor); #endif } @@ -2615,9 +2601,8 @@ void tst_QGraphicsProxyWidget::tooltip_basic() // in QTest::mouseMove(view.viewport(), view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center()))); - QTest::qWait(3000); - QCOMPARE(proxy->childItems().count(), 1); + QTRY_COMPARE(proxy->childItems().count(), 1); QGraphicsProxyWidget *child = (QGraphicsProxyWidget*)(proxy->childItems())[0]; QVERIFY(child->isWidget()); QVERIFY(child->widget()); @@ -3348,7 +3333,6 @@ void tst_QGraphicsProxyWidget::updateAndDelete() #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&view); #endif - QTest::qWait(20); QTRY_VERIFY(view.npaints > 0); const QRect itemDeviceBoundingRect = proxy->deviceTransform(view.viewportTransform()) @@ -3361,8 +3345,7 @@ void tst_QGraphicsProxyWidget::updateAndDelete() // Update and hide. proxy->update(); proxy->hide(); - QTest::qWait(50); - QCOMPARE(view.npaints, 1); + QTRY_COMPARE(view.npaints, 1); QCOMPARE(view.paintEventRegion, expectedRegion); proxy->show(); @@ -3373,8 +3356,7 @@ void tst_QGraphicsProxyWidget::updateAndDelete() // Update and delete. proxy->update(); delete proxy; - QTest::qWait(50); - QCOMPARE(view.npaints, 1); + QTRY_COMPARE(view.npaints, 1); QCOMPARE(view.paintEventRegion, expectedRegion); } @@ -3439,7 +3421,6 @@ void tst_QGraphicsProxyWidget::clickFocus() qt_x11_wait_for_window_manager(&view); #endif QApplication::setActiveWindow(&view); - QTest::qWait(25); QTRY_COMPARE(QApplication::activeWindow(), &view); QVERIFY(!proxy->hasFocus()); -- cgit v0.12