Return name and allow actions for invisible accessible items.
There is no reason not to report the name or allow actions when a widget is invisible. Reviewed-by: Morten Sorvig (cherry picked from commit b88b2cb05c56a4c936a073ccf53c9fb3ad50d5d8)
This commit is contained in:
parent
0683ff9f74
commit
a92f96efa2
@ -131,7 +131,7 @@ QString QAccessibleButton::actionText(int action, Text text, int child) const
|
||||
/*! \reimp */
|
||||
bool QAccessibleButton::doAction(int action, int child, const QVariantList ¶ms)
|
||||
{
|
||||
if (child || !widget()->isEnabled() || !widget()->isVisible())
|
||||
if (child || !widget()->isEnabled())
|
||||
return false;
|
||||
|
||||
switch (action) {
|
||||
@ -394,9 +394,6 @@ QRect QAccessibleToolButton::rect(int child) const
|
||||
QString QAccessibleToolButton::text(Text t, int child) const
|
||||
{
|
||||
QString str;
|
||||
if (!toolButton()->isVisible())
|
||||
return str;
|
||||
|
||||
switch (t) {
|
||||
case Name:
|
||||
str = toolButton()->text();
|
||||
@ -468,7 +465,7 @@ QString QAccessibleToolButton::actionText(int action, Text text, int child) cons
|
||||
*/
|
||||
bool QAccessibleToolButton::doAction(int action, int child, const QVariantList ¶ms)
|
||||
{
|
||||
if (!widget()->isEnabled() || !widget()->isVisible())
|
||||
if (!widget()->isEnabled())
|
||||
return false;
|
||||
if (action == 1 || child == ButtonDropMenu) {
|
||||
if(!child)
|
||||
@ -527,8 +524,6 @@ QAccessible::Role QAccessibleDisplay::role(int child) const
|
||||
QString QAccessibleDisplay::text(Text t, int child) const
|
||||
{
|
||||
QString str;
|
||||
if (!widget()->isVisible())
|
||||
return str;
|
||||
switch (t) {
|
||||
case Name:
|
||||
str = widget()->accessibleName();
|
||||
@ -688,8 +683,6 @@ QLineEdit *QAccessibleLineEdit::lineEdit() const
|
||||
QString QAccessibleLineEdit::text(Text t, int child) const
|
||||
{
|
||||
QString str;
|
||||
if (!lineEdit()->isVisible())
|
||||
return str;
|
||||
switch (t) {
|
||||
case Value:
|
||||
if (lineEdit()->echoMode() == QLineEdit::Normal)
|
||||
@ -706,8 +699,6 @@ QString QAccessibleLineEdit::text(Text t, int child) const
|
||||
/*! \reimp */
|
||||
void QAccessibleLineEdit::setText(Text t, int control, const QString &text)
|
||||
{
|
||||
if (!lineEdit()->isVisible())
|
||||
return;
|
||||
if (t != Value || control) {
|
||||
QAccessibleWidgetEx::setText(t, control, text);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user