summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp71
1 files changed, 0 insertions, 71 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index b8061da..cefff80 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -164,7 +164,6 @@ public slots:
void init();
private slots:
- void explicitDeleteAutoFocusProxy();
void construction();
void constructionWithParent();
void destruction();
@@ -284,9 +283,7 @@ private slots:
void hitTestUntransformableItem();
void hitTestGraphicsEffectItem();
void focusProxy();
- void autoDetectFocusProxy();
void subFocus();
- void reverseCreateAutoFocusProxy();
void focusProxyDeletion();
void negativeZStacksBehindParent();
void setGraphicsEffect();
@@ -7551,31 +7548,6 @@ void tst_QGraphicsItem::focusProxy()
QCOMPARE(item3->focusProxy(), (QGraphicsItem *)0);
}
-void tst_QGraphicsItem::autoDetectFocusProxy()
-{
- QGraphicsScene scene;
- QGraphicsItem *item = scene.addRect(0, 0, 10, 10);
- item->setFlag(QGraphicsItem::ItemIsFocusable);
-
- QGraphicsItem *item2 = scene.addRect(0, 0, 10, 10);
- item2->setParentItem(item);
- item2->setFlag(QGraphicsItem::ItemIsFocusable);
-
- QGraphicsItem *item3 = scene.addRect(0, 0, 10, 10);
- item3->setParentItem(item2);
- item3->setFlag(QGraphicsItem::ItemIsFocusable);
-
- item->setFlag(QGraphicsItem::ItemAutoDetectsFocusProxy);
- QCOMPARE(item->focusProxy(), (QGraphicsItem *)0);
-
- item2->setFocus();
- QCOMPARE(item->focusProxy(), item2);
- item3->setFocus();
- QCOMPARE(item->focusProxy(), item3);
- item3->clearFocus();
- QCOMPARE(item->focusProxy(), item3);
-}
-
void tst_QGraphicsItem::subFocus()
{
// Construct a text item that's not part of a scene (yet)
@@ -7635,49 +7607,6 @@ void tst_QGraphicsItem::subFocus()
QVERIFY(text2->hasFocus());
}
-void tst_QGraphicsItem::reverseCreateAutoFocusProxy()
-{
- QGraphicsTextItem *text = new QGraphicsTextItem;
- text->setTextInteractionFlags(Qt::TextEditorInteraction);
- text->setFlag(QGraphicsItem::ItemAutoDetectsFocusProxy);
-
- QGraphicsTextItem *text2 = new QGraphicsTextItem;
- text2->setTextInteractionFlags(Qt::TextEditorInteraction);
- text2->setFocus();
- QVERIFY(!text2->hasFocus());
- QCOMPARE(text->focusProxy(), (QGraphicsItem *)0);
- text2->setParentItem(text);
- QCOMPARE(text->focusProxy(), (QGraphicsItem *)text2);
- QCOMPARE(text->focusItem(), (QGraphicsItem *)text2);
-
- QGraphicsScene scene;
- scene.addItem(text);
- QVERIFY(text2->hasFocus());
-}
-
-void tst_QGraphicsItem::explicitDeleteAutoFocusProxy()
-{
- QGraphicsTextItem *text = new QGraphicsTextItem;
- text->setTextInteractionFlags(Qt::TextEditorInteraction);
- text->setFlag(QGraphicsItem::ItemAutoDetectsFocusProxy);
-
- QGraphicsTextItem *text2 = new QGraphicsTextItem;
- text2->setTextInteractionFlags(Qt::TextEditorInteraction);
- text2->setFocus();
- QVERIFY(!text2->hasFocus());
- QCOMPARE(text->focusProxy(), (QGraphicsItem *)0);
- text2->setParentItem(text);
- QCOMPARE(text->focusProxy(), (QGraphicsItem *)text2);
- QCOMPARE(text->focusItem(), (QGraphicsItem *)text2);
-
- QGraphicsScene scene;
- scene.addItem(text);
- QVERIFY(text2->hasFocus());
-
- delete text2;
- QCOMPARE(text->focusProxy(), (QGraphicsItem *)0);
-}
-
void tst_QGraphicsItem::focusProxyDeletion()
{
QGraphicsRectItem *rect = new QGraphicsRectItem;