[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2017-01-04 Thread Launchpad Bug Tracker
This bug was fixed in the package qtsystems-opensource-src -
5.0~git20141206~44f70d99-0ubuntu12~1

---
qtsystems-opensource-src (5.0~git20141206~44f70d99-0ubuntu12~1) zesty; 
urgency=medium

  * debian/patches/Fix-InputDeviceModel-on-Mir-count-property.patch:
- Fix InputDeviceModel on Mir (LP: #1646080)

 -- Timo Jyrinki   Fri, 18 Nov 2016 09:45:02
+

** Changed in: qtsystems-opensource-src (Ubuntu)
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  Fix Released

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2017-01-02 Thread Timo Jyrinki
Can you test the ticket? It would be ready for xenial (overlay) and
zesty.

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  In Progress

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2017-01-01 Thread Launchpad Bug Tracker
** Branch linked: lp:~kubuntu-packagers/kubuntu-packaging/qtsystems-
opensource-src

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  In Progress

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2017-01-01 Thread Timo Jyrinki
https://bileto.ubuntu.com/#/ticket/2326

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  In Progress

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2016-11-30 Thread Olivier Tilloy
Thanks!

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  In Progress

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2016-11-30 Thread Lorn Potter
upstream MR https://codereview.qt-project.org/#/c/178521/

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  In Progress

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2016-11-30 Thread Lorn Potter
@osomon looks good. I will apply upstream.

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  In Progress

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2016-11-30 Thread Lorn Potter
** Changed in: qtsystems-opensource-src (Ubuntu)
   Importance: Undecided => High

** Changed in: qtsystems-opensource-src (Ubuntu)
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  In Progress

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2016-11-30 Thread Ubuntu Foundations Team Bug Bot
The attachment "fix-1646080.patch" seems to be a patch.  If it isn't,
please remove the "patch" flag from the attachment, remove the "patch"
tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the
team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  New

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2016-11-30 Thread Olivier Tilloy
Attaching a simple patch that fixes the issue for me. Please review!

** Patch added: "fix-1646080.patch"
   
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+attachment/4785330/+files/fix-1646080.patch

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  New

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-sdk-bugs] [Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely

2016-11-30 Thread Olivier Tilloy
I guess an easy fix would be to emit countChanged again when a device is
added to/removed from the model. A (probably) better approach would be
to not emit countChanged until after the model has been updated.

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtsystems-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1646080

Title:
  Mir-backed InputDeviceModel’s count property is not updated timely

Status in qtsystems-opensource-src package in Ubuntu:
  New

Bug description:
  I’m trying to use InputDeviceModel from QML with the following
  example:

  import QtQuick 2.4
  import QtSystemInfo 5.5
  Item {
InputDeviceModel {
  id: idm
  filter: InputInfo.Mouse
  onCountChanged: console.log("mice model count:", devices, count)
  onAdded: console.log("added mouse:", inputDevice, count)
  onRemoved: console.log("removed mouse:", deviceId, count)
}
readonly property bool hasMouse: idm.count > 0
onHasMouseChanged: console.log("has mouse:", hasMouse)
  }

  When I launch the example with qmlscene on my arale with no mouse
  connected, I’m not seeing any output (expected).

  Then I connect a bluetooth keyboard/mouse combo, and I’m seeing the following:
mice model count: 1 0
added mouse: QInputDevice(0x17f6298) 1
(note how 'hasMouse', which supposedly was initially false, hasn’t been 
updated)

  Then I disconnect the combo, and I’m seeing the following:
mice model count: 0 1
has mouse: true
removed mouse: 15 0

  Then I connect it again, and I’m seeing the following:
mice model count: 1 0
has mouse: false
added mouse: QInputDevice(0x18ee508) 1

  It appears the countChanged property is emitted before a device is
  added to/removed from the model, and thus the row count hasn’t
  actually been updated yet. So any property binding that relies on
  'count' will have an incorrect value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtsystems-opensource-src/+bug/1646080/+subscriptions

-- 
Mailing list: https://launchpad.net/~ubuntu-sdk-bugs
Post to : ubuntu-sdk-bugs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs
More help   : https://help.launchpad.net/ListHelp