Merge lp:~costales/unav/WebViewCrashHandling into lp:~joergberroth/unav/WebViewCrashHandling

Proposed by costales on 2016-06-14
Status: Merged
Merged at revision: 77
Proposed branch: lp:~costales/unav/WebViewCrashHandling
Merge into: lp:~joergberroth/unav/WebViewCrashHandling
Diff against target: 137 lines (+22/-10)
7 files modified
nav/index.html (+0/-1)
qml/Favorites.qml (+2/-0)
qml/Location.qml (+4/-0)
qml/Main.qml (+11/-6)
qml/PoiDetailsPage.qml (+2/-0)
qml/PoiListPage.qml (+2/-0)
qml/SearchPage.qml (+1/-3)
To merge this branch: bzr merge lp:~costales/unav/WebViewCrashHandling
Reviewer Review Type Date Requested Status
JkB 2016-06-14 Approve on 2016-06-14
Review via email: mp+297366@code.launchpad.net

Description of the change

Avoid 2 calls

To post a comment you must log in.
JkB (joergberroth) wrote :

nice!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nav/index.html'
--- nav/index.html 2016-05-29 20:52:25 +0000
+++ nav/index.html 2016-06-14 16:40:54 +0000
@@ -575,7 +575,6 @@
575 nav.set_route_status('yes');575 nav.set_route_status('yes');
576 ui.update();576 ui.update();
577 qml_set_center_onpos(2);577 qml_set_center_onpos(2);
578 qml_set_route_status();
579 }578 }
580 </script>579 </script>
581580
582581
=== modified file 'qml/Favorites.qml'
--- qml/Favorites.qml 2016-05-05 19:21:33 +0000
+++ qml/Favorites.qml 2016-06-14 16:40:54 +0000
@@ -114,6 +114,8 @@
114 mainPageStack.removePages(mainPageStack.primaryPage)114 mainPageStack.removePages(mainPageStack.primaryPage)
115 mainPageStack.center_onpos = 2;115 mainPageStack.center_onpos = 2;
116 mainPageStack.routeState = 'yes';116 mainPageStack.routeState = 'yes';
117 mainPageStack.endLat = model.lat;
118 mainPageStack.endLng = model.lng;
117 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");119 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");
118 }120 }
119 },121 },
120122
=== modified file 'qml/Location.qml'
--- qml/Location.qml 2016-06-03 13:52:53 +0000
+++ qml/Location.qml 2016-06-14 16:40:54 +0000
@@ -256,6 +256,8 @@
256 mainPageStack.removePages(mainPageStack.primaryPage)256 mainPageStack.removePages(mainPageStack.primaryPage)
257 mainPageStack.center_onpos = 2;257 mainPageStack.center_onpos = 2;
258 mainPageStack.routeState = 'yes'258 mainPageStack.routeState = 'yes'
259 mainPageStack.endLat = model.lat;
260 mainPageStack.endLng = model.lng;
259 mainPageStack.executeJavaScript("calc2coord(" + model.lat + "," + model.lng + ");")261 mainPageStack.executeJavaScript("calc2coord(" + model.lat + "," + model.lng + ");")
260 }262 }
261 },263 },
@@ -341,6 +343,8 @@
341 mainPageStack.removePages(mainPageStack.primaryPage)343 mainPageStack.removePages(mainPageStack.primaryPage)
342 mainPageStack.center_onpos = 2;344 mainPageStack.center_onpos = 2;
343 mainPageStack.routeState = 'yes';345 mainPageStack.routeState = 'yes';
346 mainPageStack.endLat = model.lat;
347 mainPageStack.endLng = model.lng;
344 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");348 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");
345 }349 }
346 },350 },
347351
=== modified file 'qml/Main.qml'
--- qml/Main.qml 2016-06-03 20:10:59 +0000
+++ qml/Main.qml 2016-06-14 16:40:54 +0000
@@ -429,10 +429,12 @@
429429
430 if ( mainPageStack.endLat !== "null" && mainPageStack.endLng !== "null") {430 if ( mainPageStack.endLat !== "null" && mainPageStack.endLng !== "null") {
431 mainPageStack.center_onpos = 2;431 mainPageStack.center_onpos = 2;
432 mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.endLat + "," + mainPageStack.endLng + ");")432 mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.endLat + "," + mainPageStack.endLng + ");");
433 notificationBar.text = i18n.tr("Route lost. Recalculating it again");
434 notificationBar.warning();
433 } else {435 } else {
434 notificationBar.text = i18n.tr("Sorry, route info could not be retrieved. Please, re-set the route.")436 notificationBar.text = i18n.tr("Sorry, route info could not be retrieved. Please, re-set the route.");
435 notificationBar.warning()437 notificationBar.warning();
436 }438 }
437 }439 }
438 }440 }
@@ -654,9 +656,8 @@
654 Column {656 Column {
655 height: routePageGrid.height657 height: routePageGrid.height
656 spacing: 0658 spacing: 0
657 Component.onCompleted: {659
658 mainPageStack.executeJavaScript("qml_set_route_status();")660 Component.onCompleted: mainPageStack.executeJavaScript("qml_set_route_status()")
659 }
660661
661 Row {662 Row {
662 id: gridRow663 id: gridRow
@@ -737,6 +738,8 @@
737 goThereActionPopover.hide();738 goThereActionPopover.hide();
738 mainPageStack.center_onpos = 2;739 mainPageStack.center_onpos = 2;
739 mainPageStack.routeState = 'yes';740 mainPageStack.routeState = 'yes';
741 mainPageStack.endLat = mainPageStack.clickedLat;
742 mainPageStack.endLng = mainPageStack.clickedLng;
740 mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");");743 mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");");
741 }744 }
742 }745 }
@@ -836,6 +839,8 @@
836 goThereActionPopover.hide();839 goThereActionPopover.hide();
837 mainPageStack.center_onpos = 2;840 mainPageStack.center_onpos = 2;
838 mainPageStack.routeState = 'yes';841 mainPageStack.routeState = 'yes';
842 mainPageStack.endLat = mainPageStack.clickedLat;
843 mainPageStack.endLng = mainPageStack.clickedLng;
839 mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");");844 mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");");
840 }845 }
841 }846 }
842847
=== modified file 'qml/PoiDetailsPage.qml'
--- qml/PoiDetailsPage.qml 2016-06-03 13:50:14 +0000
+++ qml/PoiDetailsPage.qml 2016-06-14 16:40:54 +0000
@@ -199,6 +199,8 @@
199 }199 }
200 mainPageStack.center_onpos = 2;200 mainPageStack.center_onpos = 2;
201 mainPageStack.routeState = 'yes'201 mainPageStack.routeState = 'yes'
202 mainPageStack.endLat = mainPageStack.clickedLat;
203 mainPageStack.endLng = mainPageStack.clickedLng;
202 mainPageStack.executeJavaScript("calc2coord("+ mainPageStack.clickedLat + "," + mainPageStack.clickedLng + ");");204 mainPageStack.executeJavaScript("calc2coord("+ mainPageStack.clickedLat + "," + mainPageStack.clickedLng + ");");
203 } else if (model.mode === "SAVE") {205 } else if (model.mode === "SAVE") {
204 var incubator = mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("SearchPage.qml"), {favLat: mainPageStack.clickedLat, favLng: mainPageStack.clickedLng, favName: poiName});206 var incubator = mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("SearchPage.qml"), {favLat: mainPageStack.clickedLat, favLng: mainPageStack.clickedLng, favName: poiName});
205207
=== modified file 'qml/PoiListPage.qml'
--- qml/PoiListPage.qml 2016-05-05 19:21:33 +0000
+++ qml/PoiListPage.qml 2016-06-14 16:40:54 +0000
@@ -273,6 +273,8 @@
273 mainPageStack.removePages(mainPageStack.primaryPage)273 mainPageStack.removePages(mainPageStack.primaryPage)
274 mainPageStack.center_onpos = 2;274 mainPageStack.center_onpos = 2;
275 mainPageStack.routeState = 'yes'275 mainPageStack.routeState = 'yes'
276 mainPageStack.endLat = model.lat;
277 mainPageStack.endLng = model.lng;
276 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");278 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");
277 }279 }
278 },280 },
279281
=== modified file 'qml/SearchPage.qml'
--- qml/SearchPage.qml 2016-05-05 19:21:33 +0000
+++ qml/SearchPage.qml 2016-06-14 16:40:54 +0000
@@ -27,9 +27,7 @@
27 property string favLng27 property string favLng
28 property string favName28 property string favName
2929
30 Component.onCompleted: {30 Component.onCompleted: mainPageStack.executeJavaScript("qml_set_route_status()")
31 mainPageStack.executeJavaScript("qml_set_route_status();")
32 }
3331
34 Component.onDestruction: {32 Component.onDestruction: {
35 // Hide 2nd column when returning to the map to avoid an empty white column33 // Hide 2nd column when returning to the map to avoid an empty white column

Subscribers

People subscribed via source and target branches

to all changes: