Changeset 65165 in webkit


Ignore:
Timestamp:
Aug 11, 2010 11:01:57 AM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

2010-08-11 Antonio Gomes <tonikitoo@webkit.org>

Reviewed by Ariya Hidayat.

[Qt] QtTestBrowser: after switching between QWebView and QGraphicsWebView, rotation actions get broken
https://bugs.webkit.org/show_bug.cgi?id=43853

LauncherWindow::createChrome is connecting menu itens to WebViewGraphicsBased's slots directly.
It behaviors badly when user launches the QtTestBrowser in QWebView mode, since then switching to
QGraphicsWebView mode, createChrome is not called again, and menu items end up not getting connected
to slots at all.

  • QtTestBrowser/launcherwindow.cpp: (LauncherWindow::createChrome): (LauncherWindow::animatedFlip): (LauncherWindow::animatedYFlip):
  • QtTestBrowser/launcherwindow.h:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r65160 r65165  
     12010-08-11  Antonio Gomes  <tonikitoo@webkit.org>
     2
     3        Reviewed by Ariya Hidayat.
     4
     5        [Qt] QtTestBrowser: after switching between QWebView and QGraphicsWebView, rotation actions get broken
     6        https://bugs.webkit.org/show_bug.cgi?id=43853
     7
     8        LauncherWindow::createChrome is connecting menu itens to WebViewGraphicsBased's slots directly.
     9        It behaviors badly when user launches the QtTestBrowser in QWebView mode, since then switching to
     10        QGraphicsWebView mode, createChrome is not called again, and menu items end up not getting connected
     11        to slots at all.
     12
     13        * QtTestBrowser/launcherwindow.cpp:
     14        (LauncherWindow::createChrome):
     15        (LauncherWindow::animatedFlip):
     16        (LauncherWindow::animatedYFlip):
     17        * QtTestBrowser/launcherwindow.h:
     18
    1192010-08-11  Antonio Gomes  <tonikitoo@webkit.org>
    220
  • trunk/WebKitTools/QtTestBrowser/launcherwindow.cpp

    r65160 r65165  
    340340    flipAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
    341341    flipAnimated->setEnabled(isGraphicsBased());
     342    connect(flipAnimated, SIGNAL(triggered()), SLOT(animatedFlip()));
    342343
    343344    QAction* flipYAnimated = graphicsViewMenu->addAction("Animated Y-Flip");
    344345    flipYAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
    345346    flipYAnimated->setEnabled(isGraphicsBased());
    346 
    347     if (isGraphicsBased()) {
    348         WebViewGraphicsBased* view = static_cast<WebViewGraphicsBased*>(m_view);
    349         connect(flipAnimated, SIGNAL(triggered()), view, SLOT(animatedFlip()));
    350         connect(flipYAnimated, SIGNAL(triggered()), view, SLOT(animatedYFlip()));
    351     }
     347    connect(flipYAnimated, SIGNAL(triggered()), SLOT(animatedYFlip()));
    352348
    353349    QAction* cloneWindow = graphicsViewMenu->addAction("Clone Window", this, SLOT(cloneWindow()));
     
    699695}
    700696
     697void LauncherWindow::animatedFlip()
     698{
     699    qobject_cast<WebViewGraphicsBased*>(m_view)->animatedFlip();
     700}
     701
     702void LauncherWindow::animatedYFlip()
     703{
     704    qobject_cast<WebViewGraphicsBased*>(m_view)->animatedYFlip();
     705}
    701706void LauncherWindow::toggleSpatialNavigation(bool b)
    702707{
  • trunk/WebKitTools/QtTestBrowser/launcherwindow.h

    r65160 r65165  
    168168
    169169    void changeViewportUpdateMode(int mode);
     170    void animatedFlip();
     171    void animatedYFlip();
    170172    void selectElements();
    171173    void showFPS(bool enable);
Note: See TracChangeset for help on using the changeset viewer.