Changeset 64694 in webkit


Ignore:
Timestamp:
Aug 4, 2010 5:13:34 PM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

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

Reviewed by Kenneth Christiansen.

[Qt] [QtTestBrowser] Remove unneeded QAction class members
https://bugs.webkit.org/show_bug.cgi?id=43518

LauncherWindow class has two totally unneeded class members: m_flopAnimated and
m_flipYAnimated. Also, in initializeView method there are some dead code block
trying to connect them at the wrong time, when they have not been instanciated.

This patch:

  • removes the two cited class members in favor of local variables in createChrome method;
  • removes the dead code block.
  • QtTestBrowser/launcherwindow.cpp: (LauncherWindow::LauncherWindow): (LauncherWindow::initializeView): (LauncherWindow::createChrome):
  • QtTestBrowser/launcherwindow.h:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r64687 r64694  
    2424        * TestResultServer/model/testfile.py:
    2525        * TestResultServer/templates/uploadform.html:
     26
     272010-08-04  Antonio Gomes  <tonikitoo@webkit.org>
     28
     29        Reviewed by Kenneth Christiansen.
     30
     31        [Qt] [QtTestBrowser] Remove unneeded QAction class members
     32        https://bugs.webkit.org/show_bug.cgi?id=43518
     33
     34        LauncherWindow class has two totally unneeded class members: m_flopAnimated and
     35        m_flipYAnimated. Also, in initializeView method there are some dead code block
     36        trying to connect them at the wrong time, when they have not been instanciated.
     37
     38        This patch:
     39
     40        - removes the two cited class members in favor of local variables in createChrome method;
     41        - removes the dead code block.
     42
     43        * QtTestBrowser/launcherwindow.cpp:
     44        (LauncherWindow::LauncherWindow):
     45        (LauncherWindow::initializeView):
     46        (LauncherWindow::createChrome):
     47        * QtTestBrowser/launcherwindow.h:
    2648
    27492010-08-04  Antonio Gomes  <tonikitoo@webkit.org>
  • trunk/WebKitTools/QtTestBrowser/launcherwindow.cpp

    r64691 r64694  
    4141    , m_inspector(0)
    4242    , m_formatMenuAction(0)
    43     , m_flipAnimated(0)
    44     , m_flipYAnimated(0)
    4543#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
    4644    , m_zoomAnimation(0)
     
    116114        WebViewGraphicsBased* view = new WebViewGraphicsBased(splitter);
    117115        view->setPage(page());
    118 
    119         if (m_flipAnimated)
    120             connect(m_flipAnimated, SIGNAL(triggered()), view, SLOT(animatedFlip()));
    121 
    122         if (m_flipYAnimated)
    123             connect(m_flipYAnimated, SIGNAL(triggered()), view, SLOT(animatedYFlip()));
    124116
    125117        connect(view, SIGNAL(currentFPSUpdated(int)), this, SLOT(updateFPS(int)));
     
    323315    graphicsViewMenu->addSeparator();
    324316
    325     m_flipAnimated = graphicsViewMenu->addAction("Animated Flip");
    326     m_flipAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
    327     m_flipAnimated->setEnabled(isGraphicsBased());
    328 
    329     m_flipYAnimated = graphicsViewMenu->addAction("Animated Y-Flip");
    330     m_flipYAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
    331     m_flipYAnimated->setEnabled(isGraphicsBased());
     317    QAction* flipAnimated = graphicsViewMenu->addAction("Animated Flip");
     318    flipAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
     319    flipAnimated->setEnabled(isGraphicsBased());
     320
     321    QAction* flipYAnimated = graphicsViewMenu->addAction("Animated Y-Flip");
     322    flipYAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
     323    flipYAnimated->setEnabled(isGraphicsBased());
    332324
    333325    if (isGraphicsBased()) {
    334326        WebViewGraphicsBased* view = static_cast<WebViewGraphicsBased*>(m_view);
    335         connect(m_flipAnimated, SIGNAL(triggered()), view, SLOT(animatedFlip()));
    336         connect(m_flipYAnimated, SIGNAL(triggered()), view, SLOT(animatedYFlip()));
     327        connect(flipAnimated, SIGNAL(triggered()), view, SLOT(animatedFlip()));
     328        connect(flipYAnimated, SIGNAL(triggered()), view, SLOT(animatedYFlip()));
    337329    }
    338330
  • trunk/WebKitTools/QtTestBrowser/launcherwindow.h

    r64673 r64694  
    196196
    197197    QAction* m_formatMenuAction;
    198     QAction* m_flipAnimated;
    199     QAction* m_flipYAnimated;
    200198
    201199#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
Note: See TracChangeset for help on using the changeset viewer.