summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin Ottens <ervin@kde.org>2010-04-29 18:45:15 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-04-29 18:47:08 (GMT)
commita98bb4bf1b7c2b98d5294801ceed910704e2439c (patch)
tree7f7f61369a233dae0b7861626004b748d9558d44 /tests
parentdd4bb9811a5fa55bd0dff805e55d72d14bcafd48 (diff)
downloadQt-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')
-rw-r--r--tests/auto/qtabwidget/tst_qtabwidget.cpp9
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);
}