diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2012-10-18 11:21:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-18 12:24:13 +0200 |
commit | 8660a3bce1637ee833565b8d7c3ba498bd4a81b0 (patch) | |
tree | ce15f57c8eacfbef6e0b6c476ef85ff341398659 /src | |
parent | bfbeaffda89f475370094911f625db10baac72fc (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/testlib/qtestaccessible.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testlib/qtestaccessible.h b/src/testlib/qtestaccessible.h index 88a554dcea..2642ee206a 100644 --- a/src/testlib/qtestaccessible.h +++ b/src/testlib/qtestaccessible.h @@ -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()); } |