From 51ae17d33d6cef2900f5d4edb46b22569a8ff6ad Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Wed, 12 Dec 2012 14:29:28 +0100 Subject: 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 --- .../platforms/windows/accessible/qwindowsaccessibility.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/plugins/platforms') 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; } -- cgit v1.2.3