on xenial help sign in
drop unneccessary function, move body to caller
a11a2c0Michael Zanetti
qml/Stage/Stage.qml+5−6
@@ -104,11 +104,6 @@ FocusScope {
104 function pushRightEdge(amount) {
104 function pushRightEdge(amount) {
105 edgeBarrier.push(amount);
105 edgeBarrier.push(amount);
106 }
106 }
107− function closeFocusedDelegate() {
108− if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {
109− priv.focusedAppDelegate.close();
110− }
111− }
112
107
113 onSpreadEnabledChanged: {
108 onSpreadEnabledChanged: {
114 if (!spreadEnabled && root.state == "spread") {
109 if (!spreadEnabled && root.state == "spread") {
@@ -134,7 +129,11 @@ FocusScope {
134 GlobalShortcut {
129 GlobalShortcut {
135 id: closeFocusedShortcut
130 id: closeFocusedShortcut
136 shortcut: Qt.AltModifier|Qt.Key_F4
131 shortcut: Qt.AltModifier|Qt.Key_F4
137− onTriggered: closeFocusedDelegate()
132+ onTriggered: {
133+ if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {
134+ priv.focusedAppDelegate.close();
135+ }
136+ }
138 }
137 }
139
138
140 GlobalShortcut {
139 GlobalShortcut {