summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-02-01 17:03:06 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-02-01 17:41:15 (GMT)
commit94f5f21ac88de0d940d6ac27d222f1ef8e66d939 (patch)
treeeeb9fb223894bbb646de372cf60e0adc8d40a395 /tests
parentafe0f17eb5974adbedd1bc1f2fcd98459d92df47 (diff)
downloadQt-94f5f21ac88de0d940d6ac27d222f1ef8e66d939.zip
Qt-94f5f21ac88de0d940d6ac27d222f1ef8e66d939.tar.gz
Qt-94f5f21ac88de0d940d6ac27d222f1ef8e66d939.tar.bz2
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')
-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 ea90ae3..1fb323e 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"