Fix developer build with -no-feature-cursor

Change-Id: I3ec22f212ad68baa788fcea2e7340c2f53bfc8a1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Andrew Knight 2016-11-07 21:11:54 +01:00
parent 14805de3d9
commit c647728652
3 changed files with 7 additions and 2 deletions

View File

@ -74,6 +74,8 @@ static PtrXcursorLibraryGetDefaultSize ptrXcursorLibraryGetDefaultSize = 0;
static xcb_font_t cursorFont = 0;
static int cursorCount = 0;
#ifndef QT_NO_CURSOR
static uint8_t cur_blank_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -276,8 +278,6 @@ static const char * const cursorNames[] = {
"link"
};
#ifndef QT_NO_CURSOR
QXcbCursorCacheKey::QXcbCursorCacheKey(const QCursor &c)
: shape(c.shape()), bitmapCacheKey(0), maskCacheKey(0)
{

View File

@ -722,6 +722,9 @@ void QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(QGraphicsSceneHoverEvent
#ifndef QT_NO_CURSOR
if (needsSetCursorCall)
q->setCursor(cursorShape);
#else
Q_UNUSED(needsSetCursorCall);
Q_UNUSED(cursorShape);
#endif
// update buttons if we hover over them
windowData->hoveredSubControl = q->style()->hitTestComplexControl(QStyle::CC_TitleBar, &bar, pos.toPoint(), 0);

View File

@ -2790,6 +2790,8 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
// Send enter/leave events followed by a mouse move on the entered widget.
QMouseEvent e(QEvent::MouseMove, pos, windowPos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);
#else // !QT_NO_CURSOR
Q_UNUSED(widget);
#endif // QT_NO_CURSOR
}