Make sure we copy *all known events* properly in order to not assert.
This caused the following assertion in tst_QAccessibility::listTest(): ASSERT: "m_type != QAccessible::TableModelChanged" in file qaccessible.h, line 455 Change-Id: If1f1e80521f346019bdbd59aac58e30c870d6e4e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
parent
bfbeaffda8
commit
8660a3bce1
@ -218,6 +218,14 @@ private:
|
||||
ev = upd;
|
||||
} else if (event->type() == QAccessible::ValueChanged) {
|
||||
ev = new QAccessibleValueChangeEvent(event->object(), static_cast<QAccessibleValueChangeEvent*>(event)->value());
|
||||
} else if (event->type() == QAccessible::TableModelChanged) {
|
||||
QAccessibleTableModelChangeEvent *oldEvent = static_cast<QAccessibleTableModelChangeEvent*>(event);
|
||||
QAccessibleTableModelChangeEvent *newEvent = new QAccessibleTableModelChangeEvent(event->object(), oldEvent->modelChangeType());
|
||||
newEvent->setFirstRow(oldEvent->firstRow());
|
||||
newEvent->setFirstColumn(oldEvent->firstColumn());
|
||||
newEvent->setLastRow(oldEvent->lastRow());
|
||||
newEvent->setLastColumn(oldEvent->lastColumn());
|
||||
ev = newEvent;
|
||||
} else {
|
||||
ev = new QAccessibleEvent(event->object(), event->type());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user