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>
#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>
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;
}