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>
This commit is contained in:
parent
290ed7f8fa
commit
51ae17d33d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user