summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2012-12-12 14:29:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-13 14:40:04 +0100
commit51ae17d33d6cef2900f5d4edb46b22569a8ff6ad (patch)
tree0ef3ae6bccddd744dc8408f91483f10fc12ff58a /src/plugins/platforms/windows
parent290ed7f8fafd67197f773454223410bbe57fc4d3 (diff)
No reason to dynamically resolve NotifyWinEvent anymore
It has been available in user32.dll since Windows2000/Windows Server 2003 Change-Id: Icbfc63e944bc9e8098e3b01fd57dc7aa45bcd345 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
index db2d5f949f..94a5dd6a68 100644
--- a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
+++ b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
@@ -162,21 +162,10 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
}
}
- typedef void (WINAPI *PtrNotifyWinEvent)(DWORD, HWND, LONG, LONG);
-
#if defined(Q_OS_WINCE) // ### TODO: check for NotifyWinEvent in CE 6.0
// There is no user32.lib nor NotifyWinEvent for CE
return;
#else
- static PtrNotifyWinEvent ptrNotifyWinEvent = 0;
- static bool resolvedNWE = false;
- if (!resolvedNWE) {
- resolvedNWE = true;
- ptrNotifyWinEvent = (PtrNotifyWinEvent)QSystemLibrary::resolve(QLatin1String("user32"), "NotifyWinEvent");
- }
- if (!ptrNotifyWinEvent)
- return;
-
// 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();
@@ -199,7 +188,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
int eventId = - (eventNum - 1);
qAccessibleRecentSentEvents()->insert(eventId, qMakePair(event->object(), event->child()));
- ptrNotifyWinEvent(event->type(), hWnd, OBJID_CLIENT, eventId );
+ ::NotifyWinEvent(event->type(), hWnd, OBJID_CLIENT, eventId );
++eventNum;
}