Merge lp:~zsombi/ubuntu-ui-toolkit/listItemFocusRegression into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Cris Dywan
Approved revision: 2139
Merged at revision: 2141
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/listItemFocusRegression
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 56 lines (+19/-2)
2 files modified
src/UbuntuToolkit/privates/listviewextensions.cpp (+2/-0)
tests/unit/visual/tst_listitem_focus_bug.13.qml (+17/-2)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/listItemFocusRegression
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+307822@code.launchpad.net

Commit message

Do not show focus frame on ListItem when clicked.

Description of the change

Do not show focus frame on ListItem when clicked.

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

> 8 + , isEventFilter(false)
> 9 + , keyNavigation(false)

I'm dreaming of GCC properly failing builds with warnings, which are triggered consistently - or perhaps we need to switch to building with clang eventually.

Nice catch in any case.

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/UbuntuToolkit/privates/listviewextensions.cpp'
--- src/UbuntuToolkit/privates/listviewextensions.cpp 2016-09-16 05:01:13 +0000
+++ src/UbuntuToolkit/privates/listviewextensions.cpp 2016-10-11 12:18:36 +0000
@@ -31,6 +31,8 @@
31 : QObject(parent)31 : QObject(parent)
32 , listView(listView)32 , listView(listView)
33 , _currentItem(Q_NULLPTR)33 , _currentItem(Q_NULLPTR)
34 , isEventFilter(false)
35 , keyNavigation(false)
34{36{
35 connect(listView, SIGNAL(currentItemChanged()), this, SLOT(onCurrentItemChanged()), Qt::DirectConnection);37 connect(listView, SIGNAL(currentItemChanged()), this, SLOT(onCurrentItemChanged()), Qt::DirectConnection);
36 onCurrentItemChanged();38 onCurrentItemChanged();
3739
=== modified file 'tests/unit/visual/tst_listitem_focus_bug.13.qml'
--- tests/unit/visual/tst_listitem_focus_bug.13.qml 2016-09-08 10:21:35 +0000
+++ tests/unit/visual/tst_listitem_focus_bug.13.qml 2016-10-11 12:18:36 +0000
@@ -29,22 +29,37 @@
29 id: testView29 id: testView
30 anchors.fill: parent30 anchors.fill: parent
31 model: 5031 model: 50
32 currentIndex: 1032 currentIndex: -1
33 delegate: ListItem { width: testView.width; height: units.gu(7)33 delegate: ListItem { width: testView.width; height: units.gu(7)
34 objectName: "listItem" + index34 objectName: "listItem" + index
35 enabled: index > 20 && index < 2535 enabled: index == 4 || (index > 20 && index < 25)
36 Label {36 Label {
37 anchors.centerIn: parent37 anchors.centerIn: parent
38 text: (parent.enabled ? "enabled" : "disabled") + index38 text: (parent.enabled ? "enabled" : "disabled") + index
39 }39 }
40 onClicked: testView.currentIndex = index
40 }41 }
41 }42 }
4243
44 SignalSpy {
45 id: currentItemSpy
46 target: testView
47 signalName: "currentItemChanged"
48 }
49
43 UbuntuTestCase {50 UbuntuTestCase {
44 when: windowShown51 when: windowShown
4552
46 function cleanup() {53 function cleanup() {
47 main.forceActiveFocus();54 main.forceActiveFocus();
55 currentItemSpy.clear();
56 }
57
58 function test_0_first_time_focus_on_listview_bug1628855() {
59 var listItem = findChild(testView, "listItem4");
60 mouseClick(listItem, centerOf(listItem).x, centerOf(listItem).y);
61 currentItemSpy.wait();
62 compare(listItem.keyNavigationFocus, false);
48 }63 }
4964
50 function test_focus_bug1611327_data() {65 function test_focus_bug1611327_data() {

Subscribers

People subscribed via source and target branches