Fix for not calling QPlatformCursor's pointerEvent.
The code to pass mouse events to platform cursors is there in 4.8, however it went missing in refactor. This patch restores it. Change-Id: I7873c892c1ae907fc084d3f00f7d4e5a6293ba4d Reviewed-on: http://codereview.qt.nokia.com/2083 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>bb10
parent
c3da77798b
commit
d78a677305
|
|
@ -62,6 +62,9 @@
|
|||
#include "private/qwindow_p.h"
|
||||
#include "private/qkeymapper_p.h"
|
||||
#include "private/qcursor_p.h"
|
||||
#ifndef QT_NO_CURSOR
|
||||
#include "qplatformcursor_qpa.h"
|
||||
#endif
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
|
|
@ -570,6 +573,12 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
|
|||
|
||||
if (window) {
|
||||
QMouseEvent ev(type, localPoint, globalPoint, button, buttons, QGuiApplication::keyboardModifiers());
|
||||
#ifndef QT_NO_CURSOR
|
||||
QList<QWeakPointer<QPlatformCursor> > cursors = QPlatformCursorPrivate::getInstances();
|
||||
for (int i = 0; i < cursors.count(); ++i)
|
||||
if (cursors.at(i))
|
||||
cursors.at(i).data()->pointerEvent(ev);
|
||||
#endif
|
||||
QGuiApplication::sendSpontaneousEvent(window, &ev);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue