diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2012-03-12 15:36:31 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-18 21:42:38 +0100 |
commit | 36513264daaa0748d32326421732b9e5f212c2b5 (patch) | |
tree | f9c5afb27ec580869088cc2f937dc2b12c23347c /src | |
parent | 73b42378e7798046adbc2a508855b52462f406fe (diff) |
Make copy and assign private for QAccessibleEvent.
Also make the handling of events in the test pointer
based since mac-g++ doesn't seem to like const
references the way they were before.
Change-Id: I7fe39978d4729b8e586be30978b74aa51ca7cfe6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/accessible/qaccessible.h | 6 | ||||
-rw-r--r-- | src/testlib/qtestaccessible.h | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index ffdd3fe7ce..4d79fe78ee 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -430,6 +430,7 @@ private: class Q_GUI_EXPORT QAccessibleEvent { + Q_DISABLE_COPY(QAccessibleEvent) public: inline QAccessibleEvent(QAccessible::Event typ, QObject *obj, int chld = -1) : m_type(typ), m_object(obj), m_child(chld) @@ -446,7 +447,8 @@ public: QAccessibleInterface *accessibleInterface() const; -private: +protected: + QAccessible::Event m_type; QObject *m_object; int m_child; @@ -463,7 +465,7 @@ public: return m_changedStates; } -private: +protected: QAccessible::State m_changedStates; }; diff --git a/src/testlib/qtestaccessible.h b/src/testlib/qtestaccessible.h index 807cc2f846..6d8d6125c1 100644 --- a/src/testlib/qtestaccessible.h +++ b/src/testlib/qtestaccessible.h @@ -98,18 +98,18 @@ public: } static void clearEvents() { eventList().clear(); } static EventList events() { return eventList(); } - static bool verifyEvent(const QAccessibleEvent& ev) + static bool verifyEvent(QAccessibleEvent *ev) { if (eventList().isEmpty()) return false; QAccessibleEvent *first = eventList().takeFirst(); - bool res = *first == ev; + bool res = *first == *ev; delete first; return res; } - static bool containsEvent(const QAccessibleEvent &event) { + static bool containsEvent(QAccessibleEvent *event) { Q_FOREACH (QAccessibleEvent *ev, eventList()) { - if (*ev == event) + if (*ev == *event) return true; } return false; |