summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSebastian Sauer <sebastian.sauer@kdab.com>2010-07-21 15:09:53 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-07-21 15:09:53 (GMT)
commitc2f14423632c840bacd0254f90cd6132ed62a390 (patch)
tree5f77e3fc5fed6780e795be832d52963a87e7d5cf /src/plugins
parentde8a755a16abf0ddd0e3d8606dc6541716bb1f6f (diff)
downloadQt-c2f14423632c840bacd0254f90cd6132ed62a390.zip
Qt-c2f14423632c840bacd0254f90cd6132ed62a390.tar.gz
Qt-c2f14423632c840bacd0254f90cd6132ed62a390.tar.bz2
Improve QAccessible for QAccessibleTabBar
On QAccessibleTabBar::text return text of the current tab for the case the QTabBar itself is asked for it's Name. Merge-request: 2405 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp
index 8be1560..803786f 100644
--- a/src/plugins/accessible/widgets/complexwidgets.cpp
+++ b/src/plugins/accessible/widgets/complexwidgets.cpp
@@ -1512,10 +1512,14 @@ QString QAccessibleTabBar::text(Text t, int child) const
default:
break;
}
- } else if (child > 0) {
+ } else {
switch (t) {
case Name:
- return qt_accStripAmp(tabBar()->tabText(child - 1));
+ if (child > 0)
+ return qt_accStripAmp(tabBar()->tabText(child - 1));
+ else if (tabBar()->currentIndex() != -1)
+ return qt_accStripAmp(tabBar()->tabText(tabBar()->currentIndex()));
+ break;
default:
break;
}