Remove more inconsistencies with invisible.
Visible status should not influence child count and other properties. Reviewed-by: Jan-Arve (cherry picked from commit b6a6953d21a95c402e8a5010c1ea5131509eeea3) Change-Id: I854349bfe48ab3d81bb9eee284965461b1e66aef Reviewed-on: http://codereview.qt.nokia.com/3019 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>bb10
parent
fe59af2c00
commit
7465b55d9c
|
|
@ -83,8 +83,6 @@ QAbstractSpinBox *QAccessibleAbstractSpinBox::abstractSpinBox() const
|
|||
/*! \reimp */
|
||||
int QAccessibleAbstractSpinBox::childCount() const
|
||||
{
|
||||
if (!abstractSpinBox()->isVisible())
|
||||
return 0;
|
||||
return ValueDown;
|
||||
}
|
||||
|
||||
|
|
@ -344,8 +342,6 @@ QDoubleSpinBox *QAccessibleDoubleSpinBox::doubleSpinBox() const
|
|||
/*! \reimp */
|
||||
int QAccessibleDoubleSpinBox::childCount() const
|
||||
{
|
||||
if (!doubleSpinBox()->isVisible())
|
||||
return 0;
|
||||
return ValueDown;
|
||||
}
|
||||
|
||||
|
|
@ -410,8 +406,6 @@ QVariant QAccessibleDoubleSpinBox::invokeMethodEx(QAccessible::Method, int, cons
|
|||
/*! \reimp */
|
||||
QString QAccessibleDoubleSpinBox::text(Text textType, int child) const
|
||||
{
|
||||
if (!doubleSpinBox()->isVisible())
|
||||
return QString();
|
||||
switch (textType) {
|
||||
case Name:
|
||||
if (child == ValueUp)
|
||||
|
|
@ -540,16 +534,12 @@ QRect QAccessibleScrollBar::rect(int child) const
|
|||
/*! \reimp */
|
||||
int QAccessibleScrollBar::childCount() const
|
||||
{
|
||||
if (!scrollBar()->isVisible())
|
||||
return 0;
|
||||
return LineDown;
|
||||
}
|
||||
|
||||
/*! \reimp */
|
||||
QString QAccessibleScrollBar::text(Text t, int child) const
|
||||
{
|
||||
if (!scrollBar()->isVisible())
|
||||
return QString();
|
||||
switch (t) {
|
||||
case Value:
|
||||
if (!child || child == Position)
|
||||
|
|
@ -698,16 +688,12 @@ QRect QAccessibleSlider::rect(int child) const
|
|||
/*! \reimp */
|
||||
int QAccessibleSlider::childCount() const
|
||||
{
|
||||
if (!slider()->isVisible())
|
||||
return 0;
|
||||
return PageRight;
|
||||
}
|
||||
|
||||
/*! \reimp */
|
||||
QString QAccessibleSlider::text(Text t, int child) const
|
||||
{
|
||||
if (!slider()->isVisible())
|
||||
return QString();
|
||||
switch (t) {
|
||||
case Value:
|
||||
if (!child || child == 2)
|
||||
|
|
@ -932,15 +918,11 @@ QRect QAccessibleDial::rect(int child) const
|
|||
|
||||
int QAccessibleDial::childCount() const
|
||||
{
|
||||
if (!dial()->isVisible())
|
||||
return 0;
|
||||
return SliderHandle;
|
||||
}
|
||||
|
||||
QString QAccessibleDial::text(Text textType, int child) const
|
||||
{
|
||||
if (!dial()->isVisible())
|
||||
return QString();
|
||||
if (textType == Value && child >= Self && child <= SliderHandle)
|
||||
return QString::number(dial()->value());
|
||||
if (textType == Name) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue