Accessibility: rather than assert, just warn.
Screen readers do random things with the dbus interface, we should be careful when handling what they send. Change-Id: Ie8fc515c8d399dae9b5e892a135b54a1820d09e2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
0a7e8350ae
commit
e8ca2e008f
@ -2144,11 +2144,13 @@ bool AtSpiAdaptor::tableInterface(const QAIPointer &interface, const QString &fu
|
||||
} else if (function == QLatin1String("GetAccessibleAt")) {
|
||||
int row = message.arguments().at(0).toInt();
|
||||
int column = message.arguments().at(1).toInt();
|
||||
Q_ASSERT(interface->tableInterface());
|
||||
Q_ASSERT(row >= 0);
|
||||
Q_ASSERT(column >= 0);
|
||||
Q_ASSERT(row < interface->tableInterface()->rowCount());
|
||||
Q_ASSERT(column < interface->tableInterface()->columnCount());
|
||||
if ((row < 0) ||
|
||||
(column < 0) ||
|
||||
(row >= interface->tableInterface()->rowCount()) ||
|
||||
(column >= interface->tableInterface()->columnCount())) {
|
||||
qWarning() << "WARNING: invalid index for tableInterface GetAccessibleAt (" << row << ", " << column << ")";
|
||||
return false;
|
||||
}
|
||||
|
||||
QSpiObjectReference ref;
|
||||
QAIPointer cell(interface->tableInterface()->cellAt(row, column));
|
||||
|
Loading…
Reference in New Issue
Block a user