ubuntu-sdk-bugs team mailing list archive
-
ubuntu-sdk-bugs team
-
Mailing list archive
-
Message #07420
[Bug 1646080] [NEW] Mir-backed InputDeviceModel’s count property is not updated timely
Public bug reported:
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.
** Affects: qtsystems-opensource-src (Ubuntu)
Importance: Undecided
Assignee: Lorn Potter (lorn-potter)
Status: New
** Changed in: qtsystems-opensource-src (Ubuntu)
Assignee: (unassigned) => Lorn Potter (lorn-potter)
--
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
Follow ups
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Launchpad Bug Tracker, 2017-01-04
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Olivier Tilloy, 2017-01-03
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Timo Jyrinki, 2017-01-02
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Launchpad Bug Tracker, 2017-01-02
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Timo Jyrinki, 2017-01-02
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Olivier Tilloy, 2016-11-30
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Lorn Potter, 2016-11-30
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Lorn Potter, 2016-11-30
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Lorn Potter, 2016-11-30
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Ubuntu Foundations Team Bug Bot, 2016-11-30
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Olivier Tilloy, 2016-11-30
-
[Bug 1646080] Re: Mir-backed InputDeviceModel’s count property is not updated timely
From: Olivier Tilloy, 2016-11-30