diff options
author | Kevin Ottens <ervin@kde.org> | 2010-04-29 18:45:15 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-04-29 18:47:08 (GMT) |
commit | a98bb4bf1b7c2b98d5294801ceed910704e2439c (patch) | |
tree | 7f7f61369a233dae0b7861626004b748d9558d44 /tests/auto/qtabwidget | |
parent | dd4bb9811a5fa55bd0dff805e55d72d14bcafd48 (diff) | |
download | Qt-a98bb4bf1b7c2b98d5294801ceed910704e2439c.zip Qt-a98bb4bf1b7c2b98d5294801ceed910704e2439c.tar.gz Qt-a98bb4bf1b7c2b98d5294801ceed910704e2439c.tar.bz2 |
Set the enabled state on the page when changing the QTabWidget
Enabling/disabling a tab of QTabWidget should also change the
state of the widget. Otherwhise it is possible to have a page
enabled for a disabled widget.
Merge-request: 2354
Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
Diffstat (limited to 'tests/auto/qtabwidget')
-rw-r--r-- | tests/auto/qtabwidget/tst_qtabwidget.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/qtabwidget/tst_qtabwidget.cpp b/tests/auto/qtabwidget/tst_qtabwidget.cpp index 4491fb3..504579f 100644 --- a/tests/auto/qtabwidget/tst_qtabwidget.cpp +++ b/tests/auto/qtabwidget/tst_qtabwidget.cpp @@ -259,11 +259,14 @@ void tst_QTabWidget::tabEnabled() int index = addPage(); tw->setTabEnabled(index, true); - QVERIFY(tw->isTabEnabled(index) == true); + QVERIFY(tw->isTabEnabled(index)); + QVERIFY(tw->widget(index)->isEnabled()); tw->setTabEnabled(index, false); - QVERIFY(tw->isTabEnabled(index) == false); + QVERIFY(!tw->isTabEnabled(index)); + QVERIFY(!tw->widget(index)->isEnabled()); tw->setTabEnabled(index, true); - QVERIFY(tw->isTabEnabled(index) == true); + QVERIFY(tw->isTabEnabled(index)); + QVERIFY(tw->widget(index)->isEnabled()); removePage(index); } |