ListItem's selectedChanged signal is emitted when the selection hasn't changed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Medium
|
Zsombor Egri |
Bug Description
Steps to reproduce:
1) Run the following QML:
import QtQuick 2.4
import Ubuntu.Components 1.3
MainView {
Page {
ListView {
model: 5
}
}
}
}
}
}
}
2) Select item 4
Expected outcome:
Terminal should display:
qml: Selected changed for index: 4 to: true
Actual outcome:
Terminal actually displays:
qml: Selected changed for index: 0 to: false
qml: Selected changed for index: 1 to: false
qml: Selected changed for index: 2 to: false
qml: Selected changed for index: 3 to: false
qml: Selected changed for index: 4 to: true
Items 0 - 3 haven't changed so shouldn't have their selectedChange signal emitted when item 4 changes.
Related branches
- Tim Peeters: Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 783 lines (+391/-48)12 files modifiedcomponents.api (+2/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/ListItemStyle.qml (+2/-3)
src/Ubuntu/Components/plugin/plugin.pri (+2/-0)
src/Ubuntu/Components/plugin/privates/listitemselection.cpp (+141/-0)
src/Ubuntu/Components/plugin/privates/listitemselection.h (+56/-0)
src/Ubuntu/Components/plugin/uclistitem.cpp (+38/-26)
src/Ubuntu/Components/plugin/uclistitem.h (+4/-2)
src/Ubuntu/Components/plugin/uclistitem_p.h (+2/-1)
src/Ubuntu/Components/plugin/ucviewitemsattached.cpp (+6/-6)
tests/resources/listitems/ListItemDragging.qml (+7/-2)
tests/unit_x11/tst_components/tst_listitem_selectmode.qml (+69/-4)
tests/unit_x11/tst_components/tst_listitem_selectmode13.qml (+62/-4)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Zsombor Egri (zsombi) |
importance: | Undecided → Medium |
status: | New → Confirmed |
status: | Confirmed → In Progress |
This bug was fixed in the package ubuntu-ui-toolkit - 1.3.1761+ 16.04.20151216. 1-0ubuntu1
--------------- 16.04.20151216. 1-0ubuntu1) xenial; urgency=medium
ubuntu-ui-toolkit (1.3.1761+
[ Zoltán Balogh ]
* Drop dependency on qtc plugin script and wait for the shell with a local
function.
[ Christian Dywan ]
* runtest.sh needs to add subdirs to the libpath. Fixes: LP: #1524710.
* Explicit click/ touch threshold beyond handler.
* Enter/Return/Space should trigger() Button. Fixes: LP: #1523794.
* Only set ppmm in SwipeArea if screen has valid dpi. Fixes: LP: #1525174.
[ Tim Peeters ]
* Implement header slot management for convergence:
- Adapt the number of action slots to the width of the view.
- When a new action appears, show a quick fade-in.
- Reverse the order of the actions in the header.
- Update icon width to 4GU. Fixes: LP: #1428757.
* To prevent an invalid sectionIndex, reset the value of sectionIndex to -1
when the model of Sections is changed. Fixes: LP: #1513933.
[ Loïc Molinari ]
* UbuntuShape - Cleaned up includes.
[ Albert Astals Cid ] /pressedChanged ivate is not deleted directly so make it part of the qobject
* Simplify logic for emitting draggingChanged
No need for a switch that considers the possible cases, just store the
status before and check after
Fixes an issue in which the SwipeArea pressedChanged signal was not emitted
if switching directly from WaitingForTouch to Recognized.
* Fix memory leak in SwipeArea
SwipeAreaPr
hierarchy so it's auto deleted on parent destruction.
[ Zsombor Egri ]
* Add reset functionality to Action.shortcut property. Fixes: LP: #1518420.
* Add contentWidth and contentHeight to Dialog so foreground can be resized.
Fixes: LP: #1249325.
* Fixing ListItem.selected and ListItem.selectMode bugs.
Fixes: LP: #1493880, LP: #1493882, LP: #1514928.
* Add private implementations to ActionItem, AbstractButton, BottomEdgeHint
and BottomEdge. Fixes: LP: #1524234
* Close Popups.Dialog when Esc key is pressed. Fixes LP: #1523833
* Invoke the overridden trigger() function for Action and ActionItem
derivates. Fixes LP: #1524234
* Fix BottomEdge assertion when the content is committed by clicking on the
hint. Fixes LP: #1524407
[ CI Train Bot ]
* No-change rebuild.
ubuntu-ui-toolkit (1.3.1742+ 16.04.20151209- 0ubuntu1) xenial; urgency=medium
[ Zoltán Balogh ] mBase) because of unused variable warning.
* Enable building the UITK tests in any case.
* Remove Q_Q(UCStyledIte
* Resolve Trusty specific compiler issue not resolving QPointer data on
connections.
* Use only the object name when selecting sections and labels in tests.
[Zsombor Egri ]
* Update BottomEdge with UI/UX agreed during the sprint. Fixes LP: #1368811.
* BottomEdge component. Fixes LP: #1368811.
* Remove build failure on Xenial caused by deprecated Qt functions.
* Fix BottomEdgeHint consumes activeFocusOnPress handling. Fixes LP: #1517777
* Migrate DirectionalDragArea from Unity8, named as SwipeArea. Original code
(from lp:unity8) by: Daniel d'Andrada <email address hidden>.
* Delete QQuickVi...