Be more careful about asserting in accessibility.
It is possible to call the accessibility update for any widget, even if it doesn't implement the right interfaces. While that is bad, warning about it is better than asserting. Change-Id: I23c0c783083f73fb816d75b2c9b78efd603edcb6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
parent
8a0602873e
commit
31b4507cf4
@ -1023,7 +1023,11 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
|
||||
case QAccessible::TextCaretMoved: {
|
||||
if (sendObject || sendObject_text_caret_moved) {
|
||||
QAIPointer iface = QAIPointer(event->accessibleInterface());
|
||||
Q_ASSERT(iface->textInterface());
|
||||
if (!iface->textInterface()) {
|
||||
qWarning() << "Sending TextCaretMoved from object that does not implement text interface: " << iface << iface->object();
|
||||
return;
|
||||
}
|
||||
|
||||
QString path = pathForInterface(iface);
|
||||
QDBusVariant cursorData;
|
||||
int pos = iface->textInterface()->cursorPosition();
|
||||
|
Loading…
Reference in New Issue
Block a user