on xenial help sign in
shift some semicolons around
d5f1dffMichael Zanetti
qml/Components/PageHeader.qml+19−19
@@ -39,7 +39,7 @@ Item {
39 signal backClicked()
39 signal backClicked()
40
40
41 function triggerSearch() {
41 function triggerSearch() {
42− if (searchEntryEnabled) searchTextField.forceActiveFocus()
42+ if (searchEntryEnabled) searchTextField.forceActiveFocus();
43 }
43 }
44
44
45 function resetSearch(keepFocus) {
45 function resetSearch(keepFocus) {
@@ -61,14 +61,14 @@ Item {
61
61
62 function openSearchHistory() {
62 function openSearchHistory() {
63 if (openSearchAnimation.running) {
63 if (openSearchAnimation.running) {
64− openSearchAnimation.openSearchHistory = true
64+ openSearchAnimation.openSearchHistory = true;
65 } else if (root.searchHistory.count > 0 && headerContainer.popover == null) {
65 } else if (root.searchHistory.count > 0 && headerContainer.popover == null) {
66 headerContainer.popover = PopupUtils.open(popoverComponent, searchTextField,
66 headerContainer.popover = PopupUtils.open(popoverComponent, searchTextField,
67 {
67 {
68 "contentWidth": searchTextField.width,
68 "contentWidth": searchTextField.width,
69 "edgeMargins": units.gu(1)
69 "edgeMargins": units.gu(1)
70 }
70 }
71− )
71+ );
72 }
72 }
73 }
73 }
74
74
@@ -77,7 +77,7 @@ Item {
77 header.contents = imageComponent.createObject();
77 header.contents = imageComponent.createObject();
78 } else {
78 } else {
79 header.contents.destroy();
79 header.contents.destroy();
80− header.contents = null
80+ header.contents = null;
81 }
81 }
82 }
82 }
83
83
@@ -85,7 +85,7 @@ Item {
85 anchors.fill: parent
85 anchors.fill: parent
86 visible: headerContainer.popover !== null
86 visible: headerContainer.popover !== null
87 onPressed: {
87 onPressed: {
88− PopupUtils.close(headerContainer.popover)
88+ PopupUtils.close(headerContainer.popover);
89 }
89 }
90 }
90 }
91
91
@@ -110,7 +110,7 @@ Item {
110 onRunningChanged: {
110 onRunningChanged: {
111 if (!running && openSearchAnimation.openSearchHistory) {
111 if (!running && openSearchAnimation.openSearchHistory) {
112 openSearchAnimation.openSearchHistory = false;
112 openSearchAnimation.openSearchHistory = false;
113− root.openSearchHistory()
113+ root.openSearchHistory();
114 }
114 }
115 }
115 }
116 }
116 }
@@ -133,8 +133,8 @@ Item {
133 backAction: Action {
133 backAction: Action {
134 iconName: "back"
134 iconName: "back"
135 onTriggered: {
135 onTriggered: {
136− root.resetSearch()
136+ root.resetSearch();
137− headerContainer.showSearch = false
137+ headerContainer.showSearch = false;
138 }
138 }
139 }
139 }
140 }
140 }
@@ -142,7 +142,7 @@ Item {
142 id: searchTextField
142 id: searchTextField
143 hasClearButton: false
143 hasClearButton: false
144 anchors {
144 anchors {
145− fill: parent;
145+ fill: parent
146 leftMargin: units.gu(1)
146 leftMargin: units.gu(1)
147 topMargin: units.gu(1)
147 topMargin: units.gu(1)
148 bottomMargin: units.gu(1)
148 bottomMargin: units.gu(1)
@@ -178,14 +178,14 @@ Item {
178 }
178 }
179
179
180 onClicked: {
180 onClicked: {
181− root.resetSearch(true)
181+ root.resetSearch(true);
182− root.openSearchHistory()
182+ root.openSearchHistory();
183 }
183 }
184 }
184 }
185
185
186 onActiveFocusChanged: {
186 onActiveFocusChanged: {
187 if (activeFocus) {
187 if (activeFocus) {
188− root.openSearchHistory()
188+ root.openSearchHistory();
189 }
189 }
190 }
190 }
191 }
191 }
@@ -206,7 +206,7 @@ Item {
206 iconName: "back"
206 iconName: "back"
207 visible: root.showBackButton
207 visible: root.showBackButton
208 onTriggered: {
208 onTriggered: {
209− root.backClicked()
209+ root.backClicked();
210 }
210 }
211 }
211 }
212
212
@@ -215,8 +215,8 @@ Item {
215 iconName: "search"
215 iconName: "search"
216 visible: root.searchEntryEnabled
216 visible: root.searchEntryEnabled
217 onTriggered: {
217 onTriggered: {
218− headerContainer.showSearch = true
218+ headerContainer.showSearch = true;
219− searchTextField.forceActiveFocus()
219+ searchTextField.forceActiveFocus();
220 }
220 }
221 }
221 }
222 ]
222 ]
@@ -255,7 +255,7 @@ Item {
255 autoClose: false
255 autoClose: false
256
256
257 Component.onDestruction: {
257 Component.onDestruction: {
258− headerContainer.popover = null
258+ headerContainer.popover = null;
259 }
259 }
260
260
261 Column {
261 Column {
@@ -275,9 +275,9 @@ Item {
275 showDivider: index < recentSearches.count - 1
275 showDivider: index < recentSearches.count - 1
276 text: query
276 text: query
277 onClicked: {
277 onClicked: {
278− searchHistory.addQuery(text)
278+ searchHistory.addQuery(text);
279− searchTextField.text = text
279+ searchTextField.text = text;
280− PopupUtils.close(popover)
280+ PopupUtils.close(popover);
281 }
281 }
282 }
282 }
283 }
283 }