summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/accessible
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2012-04-24 09:52:52 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-24 19:38:58 +0200
commit961d460ecfe6c2358ade5dcb7510313b0e816953 (patch)
tree4a94d583378fc16cabdee6c22f8a4fd4138cada1 /src/plugins/platforms/windows/accessible
parent739579d15a93db09c6c313e3d5eb3a7f41badae5 (diff)
Fix a regression where events were not delivered on windows
Regression caused by a17907829e6b180f2bb4af9a8594996b2a0e531a Change-Id: I8a2ca35cf176b4db47f29d848cbc2cd8180596d0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/accessible')
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp12
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsaccessibility.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
index 0672a86dd9..17ee6eb82c 100644
--- a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
+++ b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
@@ -110,10 +110,10 @@ QWindowsAccessibility::QWindowsAccessibility()
{
}
-void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &event)
+void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
{
QString soundName;
- switch (event.type()) {
+ switch (event->type()) {
case QAccessible::PopupMenuStart:
soundName = QLatin1String("MenuPopup");
break;
@@ -184,7 +184,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev
// An event has to be associated with a window,
// so find the first parent that is a widget and that has a WId
- QAccessibleInterface *iface = event.accessibleInterface();
+ QAccessibleInterface *iface = event->accessibleInterface();
QWindow *window = iface ? QWindowsAccessibility::windowHelper(iface) : 0;
delete iface;
@@ -198,13 +198,13 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev
HWND hWnd = (HWND)platform->nativeResourceForWindow("handle", window);
static int eventNum = 0;
- if (event.type() != QAccessible::MenuCommand) { // MenuCommand is faked
+ if (event->type() != QAccessible::MenuCommand) { // MenuCommand is faked
// See comment "SENDING EVENTS TO OBJECTS WITH NO WINDOW HANDLE"
eventNum %= 50; //[0..49]
int eventId = - (eventNum - 1);
- qAccessibleRecentSentEvents()->insert(eventId, qMakePair(event.object(), event.child()));
- ptrNotifyWinEvent(event.type(), hWnd, OBJID_CLIENT, eventId );
+ qAccessibleRecentSentEvents()->insert(eventId, qMakePair(event->object(), event->child()));
+ ptrNotifyWinEvent(event->type(), hWnd, OBJID_CLIENT, eventId );
++eventNum;
}
diff --git a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.h b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.h
index 0c3aca0a03..3366c32daa 100644
--- a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.h
+++ b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.h
@@ -56,7 +56,7 @@ class QWindowsAccessibility : public QPlatformAccessibility
public:
QWindowsAccessibility();
static bool handleAccessibleObjectFromWindowRequest(HWND hwnd, WPARAM wParam, LPARAM lParam, LRESULT *lResult);
- virtual void notifyAccessibilityUpdate(const QAccessibleEvent &event);
+ virtual void notifyAccessibilityUpdate(QAccessibleEvent *event);
/*
virtual void setRootObject(QObject *o);
virtual void initialize();