- a/WebKit/qt/Api/qgraphicswebview.cpp -16 lines
Lines 294-315 bool QGraphicsWebView::event(QEvent* event) a/WebKit/qt/Api/qgraphicswebview.cpp_sec1
294
        } else
294
        } else
295
#endif // QT_NO_CONTEXTMENU
295
#endif // QT_NO_CONTEXTMENU
296
        {
296
        {
297
#ifndef QT_NO_CURSOR
298
#if QT_VERSION >= 0x040400
299
            if (event->type() == QEvent::CursorChange) {
300
                // An unsetCursor will set the cursor to Qt::ArrowCursor.
301
                // Thus this cursor change might be a QWidget::unsetCursor()
302
                // If this is not the case and it came from WebCore, the
303
                // QWebPageClient already has set its cursor internally
304
                // to Qt::ArrowCursor, so updating the cursor is always
305
                // right, as it falls back to the last cursor set by
306
                // WebCore.
307
                // FIXME: Add a QEvent::CursorUnset or similar to Qt.
308
                if (cursor().shape() == Qt::ArrowCursor)
309
                    d->resetCursor();
310
            }
311
#endif
312
#endif
313
        }
297
        }
314
    }
298
    }
315
    return QGraphicsWidget::event(event);
299
    return QGraphicsWidget::event(event);
- a/WebKit/qt/Api/qwebview.cpp -17 / +2 lines
Lines 633-656 bool QWebView::event(QEvent *e) a/WebKit/qt/Api/qwebview.cpp_sec1
633
            d->page->updatePositionDependentActions(event->pos());
633
            d->page->updatePositionDependentActions(event->pos());
634
        } else
634
        } else
635
#endif // QT_NO_CONTEXTMENU
635
#endif // QT_NO_CONTEXTMENU
636
        if (e->type() == QEvent::ShortcutOverride) {
636
        if (e->type() == QEvent::ShortcutOverride)
637
            d->page->event(e);
637
            d->page->event(e);
638
#ifndef QT_NO_CURSOR
638
        else if (e->type() == QEvent::Leave)
639
#if QT_VERSION >= 0x040400
640
        } else if (e->type() == QEvent::CursorChange) {
641
            // An unsetCursor will set the cursor to Qt::ArrowCursor.
642
            // Thus this cursor change might be a QWidget::unsetCursor()
643
            // If this is not the case and it came from WebCore, the
644
            // QWebPageClient already has set its cursor internally
645
            // to Qt::ArrowCursor, so updating the cursor is always
646
            // right, as it falls back to the last cursor set by
647
            // WebCore.
648
            // FIXME: Add a QEvent::CursorUnset or similar to Qt.
649
            if (cursor().shape() == Qt::ArrowCursor)
650
                d->page->d->client->resetCursor();
651
#endif
652
#endif
653
        } else if (e->type() == QEvent::Leave)
654
            d->page->event(e);
639
            d->page->event(e);
655
    }
640
    }
656
641
- a/WebKit/qt/ChangeLog -1 / +18 lines
Lines 1-3 a/WebKit/qt/ChangeLog_sec1
1
2009-11-11  Antonio Gomes  <tonikitoo@webkit.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        [Qt] Remove the resetCursor code in qwebview and qgraphicswebview
6
        https://bugs.webkit.org/show_bug.cgi?id=31351
7
8
        Calling unset cursor as is in ::event method make unsetCursor to fail.
9
        The current implementation is now pointless since QWebPageClient handles
10
        cursor set internally.
11
12
        Patch removes this code.
13
14
        * Api/qgraphicswebview.cpp:
15
        (QGraphicsWebView::event):
16
        * Api/qwebview.cpp:
17
        (QWebView::event):
18
1
2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
19
2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2
20
3
        Reviewed by Kenneth Rohde Christiansen.
21
        Reviewed by Kenneth Rohde Christiansen.
4
- 

Return to Bug 31351