diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-04 10:37:11 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-04 10:37:11 (GMT) |
commit | 8bc0456491e5a7e1fc677fce6e76932ab0d923e8 (patch) | |
tree | 2e0634859448e83372cb9e381ac38e4bfbbe3a41 /tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | |
parent | b3ccc9b30c3a176021b6205193b8baa416e9e813 (diff) | |
parent | 24c56ac5309150cf7ba42cd974df4e98d97ebb81 (diff) | |
download | Qt-8bc0456491e5a7e1fc677fce6e76932ab0d923e8.zip Qt-8bc0456491e5a7e1fc677fce6e76932ab0d923e8.tar.gz Qt-8bc0456491e5a7e1fc677fce6e76932ab0d923e8.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Build fix for Sun Studio
Finish to resolve merge conflict.
Fixes QMenu to only have static POD members
QScript: Test against QMetaType::QVariant instead of against the string
Fixes tst_QScriptExtQObject::connectAndDisconnect
Fix source compatibility of qRegisterMetaType
Fix warnings on MSVC
Updating documentation for how to build QWS with tslib
sizeHint of checkbox/radiobutton without text is not correct
Some cleanup of outdated src/3rdparty stuff
Revert "Fixes crash when destroying a QGraphicsItem."
Add config.test for multimedia/qml
Fix QVariant autotest
Fix compilation of Q_DECLARE_METATYPE(QVariant) by introducing QMetaType::QVariant
fixed a memory leak when restoring a state in QMainWindow
Make the sub-menu accessible via its shortcut even if it is the current
remove a warning on windows and simplify a bit the code
Add and use QGLContextPrivate::eglSurfaceForDevice()
QMetaType: Now we can register typedefs.
Diffstat (limited to 'tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 269ec24..7c1b97e 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -438,7 +438,6 @@ private slots: void QTBUG_6738_missingUpdateWithSetParent(); void QTBUG_7714_fullUpdateDiscardingOpacityUpdate2(); void QT_2653_fullUpdateDiscardingOpacityUpdate(); - void QT_2649_focusScope(); private: QList<QGraphicsItem *> paintedItems; @@ -10003,61 +10002,5 @@ void tst_QGraphicsItem::QTBUG_7714_fullUpdateDiscardingOpacityUpdate2() QTRY_COMPARE(view.repaints, 1); } -void tst_QGraphicsItem::QT_2649_focusScope() -{ - QGraphicsScene *scene = new QGraphicsScene; - - QGraphicsRectItem *subFocusItem = new QGraphicsRectItem; - subFocusItem->setFlags(QGraphicsItem::ItemIsFocusable); - subFocusItem->setFocus(); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem); - - QGraphicsRectItem *scope = new QGraphicsRectItem; - scope->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsFocusScope); - scope->setFocus(); - subFocusItem->setParentItem(scope); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem); - - QGraphicsRectItem *rootItem = new QGraphicsRectItem; - rootItem->setFlags(QGraphicsItem::ItemIsFocusable); - scope->setParentItem(rootItem); - QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem); - - scene->addItem(rootItem); - - QEvent windowActivate(QEvent::WindowActivate); - qApp->sendEvent(scene, &windowActivate); - scene->setFocus(); - - QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0); - QVERIFY(subFocusItem->hasFocus()); - - //If we hide the focusScope, the entire subFocus chain should be cleared - scope->hide(); - - QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusItem(), (QGraphicsItem *)0); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)0); - QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0); - QVERIFY(!subFocusItem->hasFocus()); - - delete scene; -} - QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" |