ubuntu-sdk-bugs team mailing list archive
-
ubuntu-sdk-bugs team
-
Mailing list archive
-
Message #07436
[Bug 1647415] [NEW] units.gu() emits changed signal before completion
Public bug reported:
Consider this snippet of code:
-----------------------------------------------
import QtQuick 2.4
import Ubuntu.Components 1.3
Item {
property int bla: units.gu(10)
onBlaChanged: print("bla changed", bla);
property int blubb: 80
onBlubbChanged: print("blubb changed", blubb);
Component.onCompleted: print("completed", bla);
}
----------------------------------------------
The output of this is:
qml: bla changed 80
qml: completed 80
the changed signal should not be emitted before completion, given it is
its initial value and not actually changed.
The current behavior triggers all the onChanged handlers when there's
units.gu() involved, which results in things like change animations
being played at startup and lots of wasted cpu cycles for evaluating all
those changed events.
** Affects: ubuntu-ui-toolkit (Ubuntu)
Importance: Undecided
Status: Confirmed
** Description changed:
Consider this snippet of code:
-----------------------------------------------
import QtQuick 2.4
import Ubuntu.Components 1.3
Item {
- property int bla: units.gu(10)
- onBlaChanged: print("bla changed", bla);
+ property int bla: units.gu(10)
+ onBlaChanged: print("bla changed", bla);
- property int blubb: 80
- onBlubbChanged: print("blubb changed", blubb);
+ property int blubb: 80
+ onBlubbChanged: print("blubb changed", blubb);
- Component.onCompleted: print("completed", bla);
+ Component.onCompleted: print("completed", bla);
}
----------------------------------------------
The output of this is:
qml: bla changed 80
qml: completed 80
+ the changed signal should not be emitted before completion, given it is
+ its initial value and not actually changed.
- the changed signal should not be emitted before completion, given it is its initial value and not actually changed.
+ The current behavior triggers all the onChanged handlers when there's
+ units.gu() involved, which results in things like change animations
+ being played at startup and lots of wasted cpu cycles for evaluating all
+ those changed events.
--
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to ubuntu-ui-toolkit in Ubuntu.
https://bugs.launchpad.net/bugs/1647415
Title:
units.gu() emits changed signal before completion
Status in ubuntu-ui-toolkit package in Ubuntu:
Confirmed
Bug description:
Consider this snippet of code:
-----------------------------------------------
import QtQuick 2.4
import Ubuntu.Components 1.3
Item {
property int bla: units.gu(10)
onBlaChanged: print("bla changed", bla);
property int blubb: 80
onBlubbChanged: print("blubb changed", blubb);
Component.onCompleted: print("completed", bla);
}
----------------------------------------------
The output of this is:
qml: bla changed 80
qml: completed 80
the changed signal should not be emitted before completion, given it
is its initial value and not actually changed.
The current behavior triggers all the onChanged handlers when there's
units.gu() involved, which results in things like change animations
being played at startup and lots of wasted cpu cycles for evaluating
all those changed events.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1647415/+subscriptions
Follow ups