Bug 73826

Summary: [Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
Product: WebKit Reporter: Simon Hausmann <hausmann>
Component: WebKit APIAssignee: Jesus Sanchez-Palencia <jesus>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, gopal.1.raghavan, jesus, laszlo.gombos, menard, vestbo, webkit.review.bot, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Simon Hausmann 2011-12-05 05:18:18 PST
At run-time the request parameter of void navigationRequested(QObject* request) is actually of type NavigationRequest:


class NavigationRequest : public QObject {
    Q_OBJECT
    Q_PROPERTY(QUrl url READ url CONSTANT FINAL)
    Q_PROPERTY(int button READ button CONSTANT FINAL)
    Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL)
    Q_PROPERTY(int action READ action WRITE setAction NOTIFY actionChanged FINAL)


Q_SIGNALS:
    void actionChanged();

};

This type should be registered with QML in order to support QML type revisions.
Comment 1 Jesus Sanchez-Palencia 2011-12-05 14:42:18 PST
Created attachment 117941 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2011-12-06 01:05:54 PST
Comment on attachment 117941 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=117941&action=review

No test?

> Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest_p.h:38
> +    QWebNavigationRequest(const QUrl& url, Qt::MouseButton button, Qt::KeyboardModifiers modifiers, QObject* parent = 0);

What about touch? I know that is not really part of this patch, but we are exposing it so we should think about such things. Maybe it is time to look at how MS exposed touch/mouse/pointers in their IE10 api - like if there is some abstraction
Comment 3 Simon Hausmann 2011-12-08 12:45:40 PST
Comment on attachment 117941 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=117941&action=review

r- because of the leak. Looks good otherwise.

> Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp:48
> +    , d(new QWebNavigationRequestPrivate(url, button, modifiers))

Ooops, the d-pointer is leaked :)
Comment 4 Jesus Sanchez-Palencia 2011-12-09 06:15:47 PST
Created attachment 118567 [details]
Patch
Comment 5 WebKit Review Bot 2011-12-09 17:41:50 PST
Comment on attachment 118567 [details]
Patch

Clearing flags on attachment: 118567

Committed r102502: <http://trac.webkit.org/changeset/102502>
Comment 6 WebKit Review Bot 2011-12-09 17:41:56 PST
All reviewed patches have been landed.  Closing bug.