on xenial help sign in
fix Super+0
00a9697Michael Zanetti
qml/Launcher/LauncherDelegate.qml+1−1
@@ -257,7 +257,7 @@ Item {
257 visible: root.shortcutHintShown
257 visible: root.shortcutHintShown
258 Label {
258 Label {
259 anchors.centerIn: parent
259 anchors.centerIn: parent
260− text: itemIndex + 1
260+ text: (itemIndex + 1) % 10
261 color: "white"
261 color: "white"
262 }
262 }
263 }
263 }
qml/Shell.qml+9−2
@@ -583,11 +583,18 @@ Item {
583 launcher.openForKeyboardNavigation();
583 launcher.openForKeyboardNavigation();
584 }
584 }
585 }
585 }
586−
586+ GlobalShortcut {
587+ shortcut: Qt.MetaModifier | Qt.Key_0
588+ onTriggered: {
589+ if (LauncherModel.get(9)) {
590+ activateApplication(LauncherModel.get(9).appId);
591+ }
592+ }
593+ }
587 Repeater {
594 Repeater {
588 model: 9
595 model: 9
589 GlobalShortcut {
596 GlobalShortcut {
590− shortcut: Qt.MetaModifier | (Qt.Key_1 + index)
597+ shortcut: Qt.MetaModifier | (Qt.Key_1 + index)
591 onTriggered: {
598 onTriggered: {
592 if (LauncherModel.get(index)) {
599 if (LauncherModel.get(index)) {
593 activateApplication(LauncherModel.get(index).appId);
600 activateApplication(LauncherModel.get(index).appId);
tests/qmltests/tst_Shell.qml+13−8
@@ -2007,18 +2007,23 @@ Rectangle {
2007 tryCompare(shortcutHint, "visible", false);
2007 tryCompare(shortcutHint, "visible", false);
2008 }
2008 }
2009
2009
2010+ function test_metaNumberLaunchesFromLauncher_data() {
2011+ return [
2012+ {tag: "Meta+1", key: Qt.Key_1, index: 0},
2013+ {tag: "Meta+2", key: Qt.Key_2, index: 1},
2014+ {tag: "Meta+4", key: Qt.Key_5, index: 4},
2015+ {tag: "Meta+0", key: Qt.Key_0, index: 9},
2016+ ]
2017+ }
2018+
2010− function test_metaNumberLaunchesFromLauncher() {
2019+ function test_metaNumberLaunchesFromLauncher(data) {
2011 loadShell("desktop");
2020 loadShell("desktop");
2012 var launcher = findChild(shell, "launcher");
2021 var launcher = findChild(shell, "launcher");
2013− var firstAppInLauncher = LauncherModel.get(0).appId;
2014− var secondAppInLauncher = LauncherModel.get(1).appId;
2022+ var appId = LauncherModel.get(data.index).appId;
2015 waitForRendering(shell);
2023 waitForRendering(shell);
2016
2024
2017− keyClick(Qt.Key_1, Qt.MetaModifier);
2025+ keyClick(data.key, Qt.MetaModifier);
2018− tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
2026+ tryCompare(ApplicationManager, "focusedApplicationId", appId);
2019−
2020− keyClick(Qt.Key_2, Qt.MetaModifier);
2021− tryCompare(ApplicationManager, "focusedApplicationId", secondAppInLauncher);
2022 }
2027 }
2023
2028
2024 function test_altF1OpensLauncherForKeyboardNavigation() {
2029 function test_altF1OpensLauncherForKeyboardNavigation() {