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
1=== modified file 'nav/index.html'
2--- nav/index.html 2016-05-29 20:52:25 +0000
3+++ nav/index.html 2016-06-14 16:40:54 +0000
4@@ -575,7 +575,6 @@
5 nav.set_route_status('yes');
6 ui.update();
7 qml_set_center_onpos(2);
8- qml_set_route_status();
9 }
10 </script>
11
12
13=== modified file 'qml/Favorites.qml'
14--- qml/Favorites.qml 2016-05-05 19:21:33 +0000
15+++ qml/Favorites.qml 2016-06-14 16:40:54 +0000
16@@ -114,6 +114,8 @@
17 mainPageStack.removePages(mainPageStack.primaryPage)
18 mainPageStack.center_onpos = 2;
19 mainPageStack.routeState = 'yes';
20+ mainPageStack.endLat = model.lat;
21+ mainPageStack.endLng = model.lng;
22 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");
23 }
24 },
25
26=== modified file 'qml/Location.qml'
27--- qml/Location.qml 2016-06-03 13:52:53 +0000
28+++ qml/Location.qml 2016-06-14 16:40:54 +0000
29@@ -256,6 +256,8 @@
30 mainPageStack.removePages(mainPageStack.primaryPage)
31 mainPageStack.center_onpos = 2;
32 mainPageStack.routeState = 'yes'
33+ mainPageStack.endLat = model.lat;
34+ mainPageStack.endLng = model.lng;
35 mainPageStack.executeJavaScript("calc2coord(" + model.lat + "," + model.lng + ");")
36 }
37 },
38@@ -341,6 +343,8 @@
39 mainPageStack.removePages(mainPageStack.primaryPage)
40 mainPageStack.center_onpos = 2;
41 mainPageStack.routeState = 'yes';
42+ mainPageStack.endLat = model.lat;
43+ mainPageStack.endLng = model.lng;
44 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");
45 }
46 },
47
48=== modified file 'qml/Main.qml'
49--- qml/Main.qml 2016-06-03 20:10:59 +0000
50+++ qml/Main.qml 2016-06-14 16:40:54 +0000
51@@ -429,10 +429,12 @@
52
53 if ( mainPageStack.endLat !== "null" && mainPageStack.endLng !== "null") {
54 mainPageStack.center_onpos = 2;
55- mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.endLat + "," + mainPageStack.endLng + ");")
56+ mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.endLat + "," + mainPageStack.endLng + ");");
57+ notificationBar.text = i18n.tr("Route lost. Recalculating it again");
58+ notificationBar.warning();
59 } else {
60- notificationBar.text = i18n.tr("Sorry, route info could not be retrieved. Please, re-set the route.")
61- notificationBar.warning()
62+ notificationBar.text = i18n.tr("Sorry, route info could not be retrieved. Please, re-set the route.");
63+ notificationBar.warning();
64 }
65 }
66 }
67@@ -654,9 +656,8 @@
68 Column {
69 height: routePageGrid.height
70 spacing: 0
71- Component.onCompleted: {
72- mainPageStack.executeJavaScript("qml_set_route_status();")
73- }
74+
75+ Component.onCompleted: mainPageStack.executeJavaScript("qml_set_route_status()")
76
77 Row {
78 id: gridRow
79@@ -737,6 +738,8 @@
80 goThereActionPopover.hide();
81 mainPageStack.center_onpos = 2;
82 mainPageStack.routeState = 'yes';
83+ mainPageStack.endLat = mainPageStack.clickedLat;
84+ mainPageStack.endLng = mainPageStack.clickedLng;
85 mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");");
86 }
87 }
88@@ -836,6 +839,8 @@
89 goThereActionPopover.hide();
90 mainPageStack.center_onpos = 2;
91 mainPageStack.routeState = 'yes';
92+ mainPageStack.endLat = mainPageStack.clickedLat;
93+ mainPageStack.endLng = mainPageStack.clickedLng;
94 mainPageStack.executeJavaScript("calc2coord(" + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");");
95 }
96 }
97
98=== modified file 'qml/PoiDetailsPage.qml'
99--- qml/PoiDetailsPage.qml 2016-06-03 13:50:14 +0000
100+++ qml/PoiDetailsPage.qml 2016-06-14 16:40:54 +0000
101@@ -199,6 +199,8 @@
102 }
103 mainPageStack.center_onpos = 2;
104 mainPageStack.routeState = 'yes'
105+ mainPageStack.endLat = mainPageStack.clickedLat;
106+ mainPageStack.endLng = mainPageStack.clickedLng;
107 mainPageStack.executeJavaScript("calc2coord("+ mainPageStack.clickedLat + "," + mainPageStack.clickedLng + ");");
108 } else if (model.mode === "SAVE") {
109 var incubator = mainPageStack.addPageToCurrentColumn(poiDetailsPage, Qt.resolvedUrl("SearchPage.qml"), {favLat: mainPageStack.clickedLat, favLng: mainPageStack.clickedLng, favName: poiName});
110
111=== modified file 'qml/PoiListPage.qml'
112--- qml/PoiListPage.qml 2016-05-05 19:21:33 +0000
113+++ qml/PoiListPage.qml 2016-06-14 16:40:54 +0000
114@@ -273,6 +273,8 @@
115 mainPageStack.removePages(mainPageStack.primaryPage)
116 mainPageStack.center_onpos = 2;
117 mainPageStack.routeState = 'yes'
118+ mainPageStack.endLat = model.lat;
119+ mainPageStack.endLng = model.lng;
120 mainPageStack.executeJavaScript("calc2coord("+ model.lat + "," + model.lng + ");");
121 }
122 },
123
124=== modified file 'qml/SearchPage.qml'
125--- qml/SearchPage.qml 2016-05-05 19:21:33 +0000
126+++ qml/SearchPage.qml 2016-06-14 16:40:54 +0000
127@@ -27,9 +27,7 @@
128 property string favLng
129 property string favName
130
131- Component.onCompleted: {
132- mainPageStack.executeJavaScript("qml_set_route_status();")
133- }
134+ Component.onCompleted: mainPageStack.executeJavaScript("qml_set_route_status()")
135
136 Component.onDestruction: {
137 // 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: