on xenial help sign in
fix tests
40b5368Michael Zanetti
qml/Launcher/Drawer.qml−3
@@ -315,9 +315,6 @@ FocusScope {
315
315
316 interactive: true
316 interactive: true
317 focus: index == aToZListView.currentIndex
317 focus: index == aToZListView.currentIndex
318− onFocusChanged: print("drawer grid", index, "has focus", focus)
319−
320− onCurrentIndexChanged: print("grid currentIndex changed", currentIndex)
321
318
322 model: AppDrawerProxyModel {
319 model: AppDrawerProxyModel {
323 id: categoryModel
320 id: categoryModel
qml/Launcher/LauncherDelegate.qml−1
@@ -129,7 +129,6 @@ Item {
129 anchors.fill: iconShape
129 anchors.fill: iconShape
130 activeFocusOnTab: true
130 activeFocusOnTab: true
131 StyleHints {
131 StyleHints {
132− objectName: "focusRing"
133 visible: root.highlighted
132 visible: root.highlighted
134 radius: units.gu(2.55)
133 radius: units.gu(2.55)
135 }
134 }
qml/Launcher/LauncherPanel.qml−1
@@ -107,7 +107,6 @@ Rectangle {
107 anchors.fill: parent
107 anchors.fill: parent
108 anchors.margins: units.gu(.5)
108 anchors.margins: units.gu(.5)
109 StyleHints {
109 StyleHints {
110− objectName: "bfbFocusHighlight"
111 visible: bfb.highlighted
110 visible: bfb.highlighted
112 radius: 0
111 radius: 0
113 }
112 }
tests/qmltests/Launcher/tst_Launcher.qml+3−4
@@ -369,18 +369,17 @@ Rectangle {
369 function assertFocusOnIndex(index) {
369 function assertFocusOnIndex(index) {
370 var launcherPanel = findChild(launcher, "launcherPanel");
370 var launcherPanel = findChild(launcher, "launcherPanel");
371 var launcherListView = findChild(launcher, "launcherListView");
371 var launcherListView = findChild(launcher, "launcherListView");
372− var bfbFocusHighlight = findChild(launcher, "bfbFocusHighlight");
372+ var bfb = findChild(launcher, "buttonShowDashHome");
373
373
374 waitForRendering(launcher);
374 waitForRendering(launcher);
375 tryCompare(launcherPanel, "highlightIndex", index);
375 tryCompare(launcherPanel, "highlightIndex", index);
376− compare(bfbFocusHighlight.visible, index === -1);
376+ compare(bfb.highlighted, index === -1);
377 for (var i = 0; i < launcherListView.count; i++) {
377 for (var i = 0; i < launcherListView.count; i++) {
378 var item = findChild(launcher, "launcherDelegate" + i);
378 var item = findChild(launcher, "launcherDelegate" + i);
379 // Delegates might be destroyed when not visible. We can't check if they paint a focus highlight.
379 // Delegates might be destroyed when not visible. We can't check if they paint a focus highlight.
380 // Make sure the requested index does have focus. for the others, try best effort to check if they don't
380 // Make sure the requested index does have focus. for the others, try best effort to check if they don't
381 if (index === i || item) {
381 if (index === i || item) {
382− var focusRing = findChild(item, "focusRing")
383− tryCompare(focusRing, "visible", index === i);
382+ tryCompare(item, "highlighted", index === i);
384 }
383 }
385 }
384 }
386 }
385 }