summaryrefslogtreecommitdiff
path: root/tests/auto/qwidget
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-02-01 18:03:06 +0100
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-02-01 18:41:15 +0100
commit94f5f21ac88de0d940d6ac27d222f1ef8e66d939 (patch)
treeeeb9fb223894bbb646de372cf60e0adc8d40a395 /tests/auto/qwidget
parentafe0f17eb5974adbedd1bc1f2fcd98459d92df47 (diff)
downloadqt4-tools-94f5f21ac88de0d940d6ac27d222f1ef8e66d939.tar.gz
Assert failure when setting a widget focus proxy as its successor in tab order
Now we check that and skip it from the tab list. Auto-test included. Reviewed-by: leo Task-number: QTBUG-7532
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index ea90ae3f82..1fb323e7b0 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -396,6 +396,8 @@ private slots:
void focusProxyAndInputMethods();
void scrollWithoutBackingStore();
+ void taskQTBUG_7532_tabOrderWithFocusProxy();
+
private:
bool ensureScreenSize(int width, int height);
QWidget *testWidget;
@@ -9783,5 +9785,17 @@ void tst_QWidget::scrollWithoutBackingStore()
QCOMPARE(child.pos(),QPoint(25,25));
}
+void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy()
+{
+ QWidget w;
+ w.setFocusPolicy(Qt::TabFocus);
+ QWidget *fp = new QWidget(&w);
+ fp->setFocusPolicy(Qt::TabFocus);
+ w.setFocusProxy(fp);
+ QWidget::setTabOrder(&w, fp);
+
+ // No Q_ASSERT, then it's allright.
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"