Changeset 62298 in webkit


Ignore:
Timestamp:
Jul 1, 2010 2:02:55 PM (14 years ago)
Author:
vestbo@webkit.org
Message:

[Qt] Make context menus show up in the right place in QTestBrowser

Reviewed by Kenneth Rohde Christiansen.

Context menus were shown at scene-relative coordinates for
QGraphicsWebView while QMenu expects them to be global. The
change to the QWidget case was to get rid of the mapToGlobal.

  • QtTestBrowser/webview.cpp:
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r62296 r62298  
     12010-07-01  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Make context menus show up in the right place in QTestBrowser
     6
     7        Context menus were shown at scene-relative coordinates for
     8        QGraphicsWebView while QMenu expects them to be global. The
     9        change to the QWidget case was to get rid of the mapToGlobal.
     10
     11        * QtTestBrowser/webview.cpp:
     12
    1132010-07-01  Robert Hogan <robert@webkit.org>
    214
  • trunk/WebKitTools/QtTestBrowser/webview.cpp

    r58321 r62298  
    193193{
    194194    QMenu* menu = createContextMenu(page(), event->pos().toPoint());
    195     menu->exec(mapToScene(event->pos()).toPoint());
     195    menu->exec(event->screenPos());
    196196    delete menu;
    197197}
     
    200200{
    201201    QMenu* menu = createContextMenu(page(), event->pos());
    202     menu->exec(mapToGlobal(event->pos()));
     202    menu->exec(event->globalPos());
    203203    delete menu;
    204204}
Note: See TracChangeset for help on using the changeset viewer.