Skip to content

Instantly share code, notes, and snippets.

Created October 19, 2009 14:01

Revisions

  1. @invalid-email-address Anonymous created this gist Oct 19, 2009.
    67 changes: 67 additions & 0 deletions gistfile1.hpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,67 @@
    From 93a2c15c712d56a51e5e4f2a6502e285a538b0d2 Mon Sep 17 00:00:00 2001
    From: Antonio Gomes <tonikitoo@webkit.org>
    Date: Tue, 13 Oct 2009 22:09:26 -0400
    Subject: [PATCH] Wrong ifdef combination in QGraphicsWebView's event method.
    Patch by Antonio Gomes <tonikitoo@webkit.org> on 2009-10-13
    Reviewed by NOBODY (OOPS!).
    * Api/qgraphicswebview.cpp:
    (QGraphicsWebView::event):
    ---
    WebKit/qt/Api/qgraphicswebview.cpp | 7 +++++--
    WebKit/qt/ChangeLog | 9 +++++++++
    2 files changed, 14 insertions(+), 2 deletions(-)
    diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
    index 4d7eaf5..4e73715 100644
    --- a/WebKit/qt/Api/qgraphicswebview.cpp
    +++ b/WebKit/qt/Api/qgraphicswebview.cpp
    @@ -263,11 +263,12 @@ bool QGraphicsWebView::event(QEvent* event)
    return true;
    }
    d->page->updatePositionDependentActions(fakeEvent.pos());
    - }
    + } else
    #endif // QT_NO_CONTEXTMENU
    + {
    #ifndef QT_NO_CURSOR
    #if QT_VERSION >= 0x040400
    - } else if (event->type() == QEvent::CursorChange) {
    + if (event->type() == QEvent::CursorChange) {
    // An unsetCursor will set the cursor to Qt::ArrowCursor.
    // Thus this cursor change might be a QWidget::unsetCursor()
    // If this is not the case and it came from WebCore, the
    @@ -278,8 +279,10 @@ bool QGraphicsWebView::event(QEvent* event)
    // FIXME: Add a QEvent::CursorUnset or similar to Qt.
    if (cursor().shape() == Qt::ArrowCursor)
    d->resetCursor();
    + }
    #endif
    #endif
    + }
    }
    return QGraphicsWidget::event(event);
    }
    diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
    index 972839d..e782a23 100644
    --- a/WebKit/qt/ChangeLog
    +++ b/WebKit/qt/ChangeLog
    @@ -162,6 +162,15 @@
    Reviewed by Simon Hausmann.
    + Wrong ifdef combination in QGraphicsWebView's event method.
    +
    + * Api/qgraphicswebview.cpp:
    + (QGraphicsWebView::event):
    +
    +2009-10-13 Antonio Gomes <tonikitoo@webkit.org>
    +
    + Reviewed by NOBODY (OOPS!).
    +
    [Qt] Make context menu to work in QGraphicsWebView
    https://bugs.webkit.org/show_bug.cgi?id=30336

    --
    1.6.0.4