Bug 43831 - [Qt] QtTestBrowser: lazy instantiate "YRotation" state machine and related objects
Summary: [Qt] QtTestBrowser: lazy instantiate "YRotation" state machine and related ob...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Antonio Gomes
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-08-10 23:02 PDT by Antonio Gomes
Modified: 2010-08-11 09:09 PDT (History)
0 users

See Also:


Attachments
patch v1 (4.25 KB, patch)
2010-08-10 23:06 PDT, Antonio Gomes
no flags Details | Formatted Diff | Diff
(committed with r65159, r=ariya)patch v2 (5.20 KB, patch)
2010-08-11 06:18 PDT, Antonio Gomes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gomes 2010-08-10 23:02:27 PDT
As is, we are creating the QStateMachine and all associated objects (QState, QPropertyAnimations and QAbstractTransition) for the YRotation action (Developer->GraphicsView->YRotation) at WebViewGraphicsBased constructor time. It is unnecessery.

Patch moves all this stuff to the slot that is activated by the associated menuitem to this action, lazily initiating it.
Comment 1 Antonio Gomes 2010-08-10 23:06:26 PDT
Created attachment 64076 [details]
patch v1
Comment 2 Antonio Gomes 2010-08-11 06:18:03 PDT
Created attachment 64103 [details]
(committed with r65159, r=ariya)patch v2

Diff from v1:
1) Moved QStateMachine to a class member of WebView (named m_machine) instead of being it a static variable in WebView::animatedYFlip slot.
2) Removed the yFlipRequest signal, now that it is unneeded.
Comment 3 Ariya Hidayat 2010-08-11 06:27:27 PDT
Comment on attachment 64103 [details]
(committed with r65159, r=ariya)patch v2

LGTM (if you fix the last remaining static).
Comment 4 Antonio Gomes 2010-08-11 09:01:49 PDT
Comment on attachment 64103 [details]
(committed with r65159, r=ariya)patch v2

Clearing flags on attachment: 64103

Committed r65159: <http://trac.webkit.org/changeset/65159>