Bug 55330

Summary: [Qt] [WK2] QGraphicsWKView::showContextMenu() should be public
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: Qt, QtTriaged
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch kenneth: review+

Description Benjamin Poulain 2011-02-27 13:47:51 PST
I originally made QGraphicsWKView::showContextMenu() private because I considered the users could just make their own slot and cut the connection to the existing slot.

However, the implementation of the menu is non trivial due to the possibility of multiple call from the WebProcess. I now think the method should be accessible to implementors so they have an easy way to handle those corner case by calling the original method with their own menu.

(and I added some doc so it is mentioned somewhere the menu can be empty, that cannot hurt :))
Comment 1 Benjamin Poulain 2011-02-27 13:53:14 PST
Created attachment 83993 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2011-02-27 15:03:50 PST
Comment on attachment 83993 [details]
Patch

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

Very nice to see documentation for our WebKit2 classes!

> Source/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp:335
> +    actions possible for its current position, it is empty if there is no action for the position.

I don't think it should be a comma here. Maybe ; would do, or you could add another sentence instead.
Comment 3 Benjamin Poulain 2011-02-27 15:19:37 PST
Committed r79832: <http://trac.webkit.org/changeset/79832>