Bug 73826 - [Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
Summary: [Qt] request parameter of QQuickWebView::navigationRequested is not a registe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jesus Sanchez-Palencia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 05:18 PST by Simon Hausmann
Modified: 2011-12-09 17:41 PST (History)
8 users (show)

See Also:


Attachments
Patch (13.35 KB, patch)
2011-12-05 14:42 PST, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff
Patch (13.52 KB, patch)
2011-12-09 06:15 PST, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.