[Touch-packages] [Bug 1621509] Re: 'window' contextProperty is registered after components are completed

2016-10-06 Thread Launchpad Bug Tracker
This bug was fixed in the package ubuntu-ui-toolkit -
1.3.2135+16.10.20161003.1

---
ubuntu-ui-toolkit (1.3.2135+16.10.20161003.1) yakkety; urgency=medium

  [ Christian Dywan ]
  * Fix warning about using implicit char* to QString conversion.
  * __styleInstance may be null, when doesn't handle that. Fixes LP: #1586013
  * Focus ring, arrow keys and space to expand OptionSelector.
Fixes LP: #1514860
  * Use QStringLiteral with QString.replace. Fixes LP: #1625507
  * Use displayText to determine if the clear button should show.
Fixes LP: #1461571
  * && escapes an ampersand used in a mnemonic label. Fixes LP: #1587580
  * Try harder to pass an item to QuickUtils.rootItem. Fixes LP: #1586013

  [ Timo Jyrinki ]
  * Enable arm64 unit tests on xenial and newer. Fixes LP: #1580172.
  * Add initial snapcraft.yaml

  [ Marco Trevisan ]
  * UCSlotsLayout: update the size of the element when top/bottom paddings 
change.
Fixes LP: #1628161

  [ Tim Peeters ]
  * Ensure that the model in TabBarStyle is a list and not null.
Fixes LP: #1622577.
  * Initialize the 'window' context property with null and add MainView 1.3 unit
tests. Fixes LP: #1610231, LP: #1621509, LP: #1625993.
  * Fix libpng sRGB profile warnings on Yakkety. Fixes LP: #1625137.
  * Disable layouts unit test to work around bug 1625137 on Yakkety.

  [ Zsombor Egri ]
  * Fix AdaptivePageLayout behavior on Qt5.6. Fixes LP: #1585996.
  * Fix property binding restore on theme palette values. Fixes LP: #1570478.
  * Move activeFocusOnTab from style into components. Fixes LP: #1590005.

  [ Loïc Molinari ]
  * Added public headers extra robustness checks. Made use of the qmake
headersclean feature to check the robustness of our public headers.
  * Excluded LTTng features from non-Linux builds.
  * Moved common C++ configs to ubuntu_common.prf. The common config file
doesn't add -Werror directly to QMAKE_CXXFLAGS anymore, it sets the
warnings_are_errors variable so that it is correctly handled by different
compilers (not just GCC). That allows to remove the
-Werror=deprecated-declarations flag since warnings_are_errors defines it
for us. Removed the DEFINES += QT_USE_QSTRINGBUILDER lines since it's
already handled by qt_module.prf. Set the -Wsuggest-override warning to
QMAKE_CXXFLAGS_WARN_ON instead of QMAKE_CXXFLAGS directly.
  * Cleaned up qmake Ubuntu packaging variables. The qtbase packaging for Ubuntu
exports the CFLAGS, CXXFLAGS and LFLAGS variables in the environment before
running configure so that the qtbase shared libraries can be compiled with
the required distribution defined compiler flags. That is fine (though I
guess that could be handled better at the qtbase packaging level with maybe
a dedicated prf) but it results in qt_build_config.prf defining the
QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS variables with these
distribution specific flags. Since we load this prf, these variables end up
being defined when building the toolkit for development purpose. This is
problematic because -O2 and -g are always defined (whatever the debug or
release config chosen by the developer), also these are GCC specific flags
which makes our build break with other compilers. This is also ugly because
preprocessor defines are directly set in the QMAKE_C*FLAGS. In order to
workaround these issues, we unset these variables and set the different
flags apart from -g and -O2 in the right qmake variables. This allows to
keep compiling with the Debian flags but in a more flexible way. For the
Debian packaging, we keep the former behaviour by simply passing the
debian_build config.
  * Optimised QString code gen for ASCII strings known at compile-time. That
allows the compiler to optimise our code better by putting all these
QStrings known at compile time in the .rodata section of the binary as well
as preventing a bunch of useless processing on them. That also allows us to
remove "DEFINES -= QT_ASCII_CAST_WARNINGS" from the UbuntuToolkit pro file.

  [ Zoltán Balogh ]
  * Explicit include of cstdio.

  [ Andrea Bernabei ]
  * Qt5.6: Fix expandablescolumn.11 and expandables.11 unit tests
  * Qt5.6 fixes QTBUG-41686 and requires x/y to be explicitly passed.
Fixes LP: #1610230.
  * Qt5.6: fix Scrollbar unit tests
  * Qt5.6: fix ubuntulistview.10 unit test

 -- Zoltán Balogh   Mon, 03 Oct 2016
11:39:58 +

** Changed in: ubuntu-ui-toolkit (Ubuntu)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1621509

Title:
  'window' contextProperty is registered after components are completed

Status in ubuntu-ui-toolkit package in Ubuntu:
  Fix Released

Bug description:
  This is the cause for the Sections index resetting after
  initialization, see bug 

[Touch-packages] [Bug 1621509] Re: 'window' contextProperty is registered after components are completed

2016-10-03 Thread Launchpad Bug Tracker
** Branch linked: lp:~ci-train-bot/ubuntu-ui-toolkit/ubuntu-ui-toolkit-
ubuntu-yakkety-2035

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1621509

Title:
  'window' contextProperty is registered after components are completed

Status in ubuntu-ui-toolkit package in Ubuntu:
  Fix Committed

Bug description:
  This is the cause for the Sections index resetting after
  initialization, see bug 1610231.

  Use this code:
  -- ModelFromList13.qml --
  import QtQuick 2.4

  // This component is used in tst_listview_bug1621509.13.qml
  Item {
  id: root
  property var myObject
  property int count: 0 // will hold the number of changes to myObject 
after Component.completed.

  onMyObjectChanged: {
  print("myObject changed to "+myObject)
  count++;
  }
  Component.onCompleted: {
  count = 0;
  }
  }

  -- tst_list_model_from_list_bug1621509.13.qml --
  import QtQuick 2.4
  import QtTest 1.0

  // Ubuntu.Components is not explicitly used below, but its import causes bug 
#1621509.
  import Ubuntu.Components 1.3

  TestCase {
  id: testCase
  name: "EmbeddedListView"
  width: 100
  height: 100

  // Bug #1621509 only occurs when we wait for the window to be visible.
  // Forces the components to be completed before the test functions are 
executed.
  when: windowShown

  ModelFromList13 {
  id: embeddedListView
  QtObject {
  objectName: "one"
  id: objectOne
  }
  myObject: objectOne
  }

  Component.onCompleted: {
  print("Component completed."); // must print something to reproduce 
the bug.
  }

  function test_no_model_change_after_completed_bug1621509_bug1610231() {
  compare(embeddedListView.count, 0,
  "The model was changed after the component was completed.");
  }
  }
  --

  the test will fail. Also, one can replace the TestCase by Item (and
  remove when: windowShown) and simply use qmlscene to start the app. It
  will show that myObject is set twice: before the component completed,
  and then again afterwards. I suspect the reason for this is the change
  of the 'window' context property which causes everything in the
  context (objectOne) and properties that depend on that to be re-
  evaluated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1621509/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1621509] Re: 'window' contextProperty is registered after components are completed

2016-09-27 Thread Tim Peeters
** Changed in: ubuntu-ui-toolkit (Ubuntu)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1621509

Title:
  'window' contextProperty is registered after components are completed

Status in ubuntu-ui-toolkit package in Ubuntu:
  Fix Committed

Bug description:
  This is the cause for the Sections index resetting after
  initialization, see bug 1610231.

  Use this code:
  -- ModelFromList13.qml --
  import QtQuick 2.4

  // This component is used in tst_listview_bug1621509.13.qml
  Item {
  id: root
  property var myObject
  property int count: 0 // will hold the number of changes to myObject 
after Component.completed.

  onMyObjectChanged: {
  print("myObject changed to "+myObject)
  count++;
  }
  Component.onCompleted: {
  count = 0;
  }
  }

  -- tst_list_model_from_list_bug1621509.13.qml --
  import QtQuick 2.4
  import QtTest 1.0

  // Ubuntu.Components is not explicitly used below, but its import causes bug 
#1621509.
  import Ubuntu.Components 1.3

  TestCase {
  id: testCase
  name: "EmbeddedListView"
  width: 100
  height: 100

  // Bug #1621509 only occurs when we wait for the window to be visible.
  // Forces the components to be completed before the test functions are 
executed.
  when: windowShown

  ModelFromList13 {
  id: embeddedListView
  QtObject {
  objectName: "one"
  id: objectOne
  }
  myObject: objectOne
  }

  Component.onCompleted: {
  print("Component completed."); // must print something to reproduce 
the bug.
  }

  function test_no_model_change_after_completed_bug1621509_bug1610231() {
  compare(embeddedListView.count, 0,
  "The model was changed after the component was completed.");
  }
  }
  --

  the test will fail. Also, one can replace the TestCase by Item (and
  remove when: windowShown) and simply use qmlscene to start the app. It
  will show that myObject is set twice: before the component completed,
  and then again afterwards. I suspect the reason for this is the change
  of the 'window' context property which causes everything in the
  context (objectOne) and properties that depend on that to be re-
  evaluated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1621509/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1621509] Re: 'window' contextProperty is registered after components are completed

2016-09-19 Thread Launchpad Bug Tracker
** Branch linked: lp:~tpeeters/ubuntu-ui-toolkit/qt56fixes2sections

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1621509

Title:
  'window' contextProperty is registered after components are completed

Status in ubuntu-ui-toolkit package in Ubuntu:
  In Progress

Bug description:
  This is the cause for the Sections index resetting after
  initialization, see bug 1610231.

  Use this code:
  -- ModelFromList13.qml --
  import QtQuick 2.4

  // This component is used in tst_listview_bug1621509.13.qml
  Item {
  id: root
  property var myObject
  property int count: 0 // will hold the number of changes to myObject 
after Component.completed.

  onMyObjectChanged: {
  print("myObject changed to "+myObject)
  count++;
  }
  Component.onCompleted: {
  count = 0;
  }
  }

  -- tst_list_model_from_list_bug1621509.13.qml --
  import QtQuick 2.4
  import QtTest 1.0

  // Ubuntu.Components is not explicitly used below, but its import causes bug 
#1621509.
  import Ubuntu.Components 1.3

  TestCase {
  id: testCase
  name: "EmbeddedListView"
  width: 100
  height: 100

  // Bug #1621509 only occurs when we wait for the window to be visible.
  // Forces the components to be completed before the test functions are 
executed.
  when: windowShown

  ModelFromList13 {
  id: embeddedListView
  QtObject {
  objectName: "one"
  id: objectOne
  }
  myObject: objectOne
  }

  Component.onCompleted: {
  print("Component completed."); // must print something to reproduce 
the bug.
  }

  function test_no_model_change_after_completed_bug1621509_bug1610231() {
  compare(embeddedListView.count, 0,
  "The model was changed after the component was completed.");
  }
  }
  --

  the test will fail. Also, one can replace the TestCase by Item (and
  remove when: windowShown) and simply use qmlscene to start the app. It
  will show that myObject is set twice: before the component completed,
  and then again afterwards. I suspect the reason for this is the change
  of the 'window' context property which causes everything in the
  context (objectOne) and properties that depend on that to be re-
  evaluated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1621509/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1621509] Re: 'window' contextProperty is registered after components are completed

2016-09-15 Thread Tim Peeters
** Description changed:

  This is the cause for the Sections index resetting after initialization,
  see bug 1610231.
  
- Create the file ModelTest.qml:
- 
+ Use this code:
+ -- ModelFromList13.qml --
  import QtQuick 2.4
  
+ // This component is used in tst_listview_bug1621509.13.qml
  Item {
- id: root
- width: 800
- height: 600
+ id: root
+ property var myObject
+ property int count: 0 // will hold the number of changes to myObject 
after Component.completed.
  
- ListView {
- model: root.model
- onModelChanged: print("LV model changed to "+model[0]+" "+model[1]+" 
"+model[2]+" "+model[3])
- Component.onCompleted: print("ListView completed.")
- }
- Component.onCompleted: print("root item completed.")
- 
- property list objectList
- onObjectListChanged: print("root.objectList changed to "+objectList[0]+" 
"+objectList[1]+" "+objectList[2])
- property var model: objectList
+ onMyObjectChanged: {
+ print("myObject changed to "+myObject)
+ count++;
+ }
+ Component.onCompleted: {
+ count = 0;
+ }
  }
  
- And run this program modelInst.qml:
+ -- tst_list_model_from_list_bug1621509.13.qml --
+ import QtQuick 2.4
+ import QtTest 1.0
  
- import QtQuick 2.4
+ // Ubuntu.Components is not explicitly used below, but its import causes bug 
#1621509.
  import Ubuntu.Components 1.3
  
- ModelTest {
- QtObject {
- objectName: "one"
- id: objectOne
- }
- QtObject {
- objectName: "two"
- id: objectTwo
- }
- QtObject{
- objectName: "three"
- id: objectThree
- }
+ TestCase {
+ id: testCase
+ name: "EmbeddedListView"
+ width: 100
+ height: 100
  
-    objectList: [objectOne, objectTwo, objectThree]
+ // Bug #1621509 only occurs when we wait for the window to be visible.
+ // Forces the components to be completed before the test functions are 
executed.
+ when: windowShown
+ 
+ ModelFromList13 {
+ id: embeddedListView
+ QtObject {
+ objectName: "one"
+ id: objectOne
+ }
+ myObject: objectOne
+ }
+ 
+ Component.onCompleted: {
+ print("Component completed."); // must print something to reproduce 
the bug.
+ }
+ 
+ function test_no_model_change_after_completed_bug1621509_bug1610231() {
+ compare(embeddedListView.count, 0,
+ "The model was changed after the component was completed.");
+ }
  }
+ --
  
- The output is as follows:
- 
- $ qmlscene modelInst.qml
- qml: root.objectList changed to undefined undefined undefined
- qml: root.objectList changed to QObject(0x118abf0, "one") undefined undefined
- qml: root.objectList changed to QObject(0x118abf0, "one") QObject(0x118a110, 
"two") undefined
- qml: root.objectList changed to QObject(0x118abf0, "one") QObject(0x118a110, 
"two") QObject(0x1182f80, "three")
- qml: LV model changed to QObject(0x118abf0, "one") QObject(0x118a110, "two") 
QObject(0x1182f80, "three") undefined
- qml: LV model changed to QObject(0x118abf0, "one") QObject(0x118a110, "two") 
QObject(0x1182f80, "three") undefined
- qml: root item completed.
- qml: ListView completed.
- qml: LV model changed to QObject(0x118abf0, "one") QObject(0x118a110, "two") 
QObject(0x1182f80, "three") undefined
- qml: LV model changed to QObject(0x118abf0, "one") QObject(0x118a110, "two") 
QObject(0x1182f80, "three") undefined
- 
- So the model is changed AFTER the ListView and root item are completed.
- 
- When the Ubuntu.Components import is removed the output is correct:
- 
- $ qmlscene modelInst.qml
- qml: root.objectList changed to undefined undefined undefined
- qml: root.objectList changed to QObject(0x171c8d0, "one") undefined undefined
- qml: root.objectList changed to QObject(0x171c8d0, "one") QObject(0x171d290, 
"two") undefined
- qml: root.objectList changed to QObject(0x171c8d0, "one") QObject(0x171d290, 
"two") QObject(0x171d420, "three")
- qml: LV model changed to QObject(0x171c8d0, "one") QObject(0x171d290, "two") 
QObject(0x171d420, "three") undefined
- qml: LV model changed to QObject(0x171c8d0, "one") QObject(0x171d290, "two") 
QObject(0x171d420, "three") undefined
- qml: root item completed.
- qml: ListView completed.
- 
- Also, if there is no ListView inside ModelTest.qml, then nothing is
- updated after the items are completed. So I suspect the issue is in our
- ListView extension.
+ the test will fail. Also, one can replace the TestCase by Item (and
+ remove when: windowShown) and simply use qmlscene to start the app. It
+ will show that myObject is set twice: before the component completed,
+ and then again afterwards. I suspect the reason for this is the change
+ of the 'window' context property which causes everything in the context
+ (objectOne) and properties that depend on that to be re-evaluated.

-- 
You received this bug notification because you are a memb

[Touch-packages] [Bug 1621509] Re: 'window' contextProperty is registered after components are completed

2016-09-14 Thread Tim Peeters
** Summary changed:

- ListView with extension from UbuntuToolkit updates its model after the 
component is completed
+ 'window' contextProperty is registered after components are completed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1621509

Title:
  'window' contextProperty is registered after components are completed

Status in ubuntu-ui-toolkit package in Ubuntu:
  In Progress

Bug description:
  This is the cause for the Sections index resetting after
  initialization, see bug 1610231.

  Create the file ModelTest.qml:

  import QtQuick 2.4

  Item {
  id: root
  width: 800
  height: 600

  ListView {
  model: root.model
  onModelChanged: print("LV model changed to "+model[0]+" "+model[1]+" 
"+model[2]+" "+model[3])
  Component.onCompleted: print("ListView completed.")
  }
  Component.onCompleted: print("root item completed.")

  property list objectList
  onObjectListChanged: print("root.objectList changed to "+objectList[0]+" 
"+objectList[1]+" "+objectList[2])
  property var model: objectList
  }

  And run this program modelInst.qml:

  import QtQuick 2.4
  import Ubuntu.Components 1.3

  ModelTest {
  QtObject {
  objectName: "one"
  id: objectOne
  }
  QtObject {
  objectName: "two"
  id: objectTwo
  }
  QtObject{
  objectName: "three"
  id: objectThree
  }

     objectList: [objectOne, objectTwo, objectThree]
  }

  The output is as follows:

  $ qmlscene modelInst.qml
  qml: root.objectList changed to undefined undefined undefined
  qml: root.objectList changed to QObject(0x118abf0, "one") undefined undefined
  qml: root.objectList changed to QObject(0x118abf0, "one") QObject(0x118a110, 
"two") undefined
  qml: root.objectList changed to QObject(0x118abf0, "one") QObject(0x118a110, 
"two") QObject(0x1182f80, "three")
  qml: LV model changed to QObject(0x118abf0, "one") QObject(0x118a110, "two") 
QObject(0x1182f80, "three") undefined
  qml: LV model changed to QObject(0x118abf0, "one") QObject(0x118a110, "two") 
QObject(0x1182f80, "three") undefined
  qml: root item completed.
  qml: ListView completed.
  qml: LV model changed to QObject(0x118abf0, "one") QObject(0x118a110, "two") 
QObject(0x1182f80, "three") undefined
  qml: LV model changed to QObject(0x118abf0, "one") QObject(0x118a110, "two") 
QObject(0x1182f80, "three") undefined

  So the model is changed AFTER the ListView and root item are
  completed.

  When the Ubuntu.Components import is removed the output is correct:

  $ qmlscene modelInst.qml
  qml: root.objectList changed to undefined undefined undefined
  qml: root.objectList changed to QObject(0x171c8d0, "one") undefined undefined
  qml: root.objectList changed to QObject(0x171c8d0, "one") QObject(0x171d290, 
"two") undefined
  qml: root.objectList changed to QObject(0x171c8d0, "one") QObject(0x171d290, 
"two") QObject(0x171d420, "three")
  qml: LV model changed to QObject(0x171c8d0, "one") QObject(0x171d290, "two") 
QObject(0x171d420, "three") undefined
  qml: LV model changed to QObject(0x171c8d0, "one") QObject(0x171d290, "two") 
QObject(0x171d420, "three") undefined
  qml: root item completed.
  qml: ListView completed.

  Also, if there is no ListView inside ModelTest.qml, then nothing is
  updated after the items are completed. So I suspect the issue is in
  our ListView extension.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1621509/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp