diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2012-03-08 16:10:10 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-15 11:40:50 +0100 |
commit | a17907829e6b180f2bb4af9a8594996b2a0e531a (patch) | |
tree | f3a3e4aaeb699125732f4fd6139f1894e14c7dd2 /src/testlib | |
parent | 8cec8a4f68a5af76f9f1ee11e1f4b10603a1916c (diff) |
Use pointers for QAccessibleEvent.
At least on mac g++ badly wants to copy the event and
cannot use the copy ctor. The sensible solution is thus
to use pointers. This is in line with QCoreApplication::sendEvent.
Change-Id: Icb58852be351ab04ffa17069989d7a07d4b377da
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestaccessible.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/testlib/qtestaccessible.h b/src/testlib/qtestaccessible.h index 048e048789..807cc2f846 100644 --- a/src/testlib/qtestaccessible.h +++ b/src/testlib/qtestaccessible.h @@ -140,17 +140,16 @@ private: } } - static void updateHandler(const QAccessibleEvent &event) + static void updateHandler(QAccessibleEvent *event) { eventList().append(copyEvent(event)); } - - static QAccessibleEvent *copyEvent(const QAccessibleEvent &event) + static QAccessibleEvent *copyEvent(QAccessibleEvent *event) { - if (event.type() == QAccessible::StateChanged) - return new QAccessibleStateChangeEvent(static_cast<const QAccessibleStateChangeEvent*>(&event)->changedStates(), - event.object(), event.child()); - return new QAccessibleEvent(event.type(), event.object(), event.child()); + if (event->type() == QAccessible::StateChanged) + return new QAccessibleStateChangeEvent(static_cast<const QAccessibleStateChangeEvent*>(event)->changedStates(), + event->object(), event->child()); + return new QAccessibleEvent(event->type(), event->object(), event->child()); } static EventList &eventList() |