Merge lp:~zsombi/ubuntu-ui-toolkit/panel-ima-fix into lp:ubuntu-ui-toolkit

Proposed by Zsombor Egri
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 522
Merged at revision: 521
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/panel-ima-fix
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 57 lines (+15/-0)
2 files modified
modules/Ubuntu/Components/plugin/inversemouseareatype.cpp (+13/-0)
modules/Ubuntu/Components/plugin/inversemouseareatype.h (+2/-0)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/panel-ima-fix
Reviewer Review Type Date Requested Status
Olivier Tilloy (community) Approve
PS Jenkins bot continuous-integration Approve
Tim Peeters Approve
Review via email: mp+166273@code.launchpad.net

Commit message

[inversemousearea] Default sensing area not set on the proper time.

To post a comment you must log in.
Revision history for this message
Tim Peeters (tpeeters) wrote :

code looks good

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

Looks good, and fixes the regression with the browser app.

Ideally there should be a test to guard against similar regressions in the future, but seeing that it’s almost EOD, let’s get this merged, and ensure that the test is added tomorrow.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'modules/Ubuntu/Components/plugin/inversemouseareatype.cpp'
--- modules/Ubuntu/Components/plugin/inversemouseareatype.cpp 2013-05-24 11:11:31 +0000
+++ modules/Ubuntu/Components/plugin/inversemouseareatype.cpp 2013-05-29 14:50:39 +0000
@@ -83,6 +83,7 @@
83 */83 */
84InverseMouseAreaType::InverseMouseAreaType(QQuickItem *parent) :84InverseMouseAreaType::InverseMouseAreaType(QQuickItem *parent) :
85 QQuickItem(parent),85 QQuickItem(parent),
86 m_ready(false),
86 m_pressed(false),87 m_pressed(false),
87 m_moved(false),88 m_moved(false),
88 m_propagateEvents(false),89 m_propagateEvents(false),
@@ -118,6 +119,9 @@
118 */119 */
119void InverseMouseAreaType::update()120void InverseMouseAreaType::update()
120{121{
122 if (!m_ready) {
123 return;
124 }
121 // update sensing area125 // update sensing area
122 if (!m_sensingArea)126 if (!m_sensingArea)
123 m_sensingArea = QuickUtils::instance().rootItem(this);127 m_sensingArea = QuickUtils::instance().rootItem(this);
@@ -125,6 +129,15 @@
125 reset();129 reset();
126}130}
127131
132void InverseMouseAreaType::componentComplete()
133{
134 QQuickItem::componentComplete();
135 // by now the parents shoudl have been resolved so we can look after the
136 // topmost component for the sensingArea in case it has not been set yet
137 m_ready = true;
138 update();
139}
140
128/*!141/*!
129 \qmlproperty bool InverseMouseArea::pressed142 \qmlproperty bool InverseMouseArea::pressed
130 This property holds whether the acceptedButtons are pressed outside the area or not.143 This property holds whether the acceptedButtons are pressed outside the area or not.
131144
=== modified file 'modules/Ubuntu/Components/plugin/inversemouseareatype.h'
--- modules/Ubuntu/Components/plugin/inversemouseareatype.h 2013-04-15 08:39:51 +0000
+++ modules/Ubuntu/Components/plugin/inversemouseareatype.h 2013-05-29 14:50:39 +0000
@@ -38,6 +38,7 @@
3838
39protected:39protected:
40 bool eventFilter(QObject *obj, QEvent *ev);40 bool eventFilter(QObject *obj, QEvent *ev);
41 void componentComplete();
4142
42private: // getter/setter43private: // getter/setter
43 bool pressed() const;44 bool pressed() const;
@@ -76,6 +77,7 @@
76 void update();77 void update();
77 78
78private:79private:
80 bool m_ready;
79 bool m_pressed;81 bool m_pressed;
80 bool m_moved;82 bool m_moved;
81 bool m_propagateEvents;83 bool m_propagateEvents;

Subscribers

People subscribed via source and target branches

to status/vote changes: