Merge lp:~nik90/ubuntu-clock-app/11-remove-utils into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 108
Merged at revision: 133
Proposed branch: lp:~nik90/ubuntu-clock-app/11-remove-utils
Merge into: lp:ubuntu-clock-app
Prerequisite: lp:~nik90/ubuntu-clock-app/10-alarm-change
Diff against target: 165 lines (+6/-39)
9 files modified
app/alarm/AlarmList.qml (+0/-1)
app/alarm/AlarmPage.qml (+1/-1)
app/alarm/EditAlarmPage.qml (+2/-3)
app/clock/ClockPage.qml (+1/-1)
app/components/Clock.qml (+0/-1)
app/components/Utils.js (+0/-25)
app/ubuntu-clock-app.qml (+1/-5)
app/worldclock/UserWorldCityList.qml (+0/-2)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/11-remove-utils
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Riccardo Padovani Approve
Nekhelesh Ramananthan Needs Fixing
Review via email: mp+237047@code.launchpad.net

Commit message

Removed unnecessary Utils.js library

Description of the change

The Utils.js library was added in the very beginning to neatly enable/disable debugMode using just a variable. In debugMode there would be more console output to help debug an issue. However this wasn't used for several reasons and just collecting dust. Hence I am removing it.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

#blocked on Jenkins. This requires a patch to the Jenkins environment since the xvfb package which is used to run the clock app tests takes input focus away from the clock app when it is launched. This is causing the AP tests to be pass. Francis and Nicholas have been informed. Once jenkins is fixed, we should be good to merge this branch.

review: Needs Fixing
Revision history for this message
Riccardo Padovani (rpadovani) wrote :
review: Needs Fixing
106. By Nekhelesh Ramananthan

removed the use of Utils library in EditAlarm page

107. By Nekhelesh Ramananthan

merged prerequisite branch

108. By Nekhelesh Ramananthan

Updated debian changelog

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Now lgtm

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmList.qml'
2--- app/alarm/AlarmList.qml 2014-09-25 11:26:43 +0000
3+++ app/alarm/AlarmList.qml 2014-10-09 16:42:05 +0000
4@@ -21,7 +21,6 @@
5 import Ubuntu.Components.ListItems 1.0 as ListItem
6 import "../components"
7 import "../upstreamcomponents"
8-import "../components/Utils.js" as Utils
9
10 MultipleSelectionListView {
11 id: alarmListView
12
13=== modified file 'app/alarm/AlarmPage.qml'
14--- app/alarm/AlarmPage.qml 2014-09-26 12:24:11 +0000
15+++ app/alarm/AlarmPage.qml 2014-10-09 16:42:05 +0000
16@@ -26,7 +26,7 @@
17 title: i18n.tr("Alarms")
18 objectName: 'AlarmPage'
19
20- Component.onCompleted: console.log("Alarm Page loaded")
21+ Component.onCompleted: console.log("[LOG]: Alarm Page loaded")
22
23 flickable: null
24
25
26=== modified file 'app/alarm/EditAlarmPage.qml'
27--- app/alarm/EditAlarmPage.qml 2014-09-25 11:26:43 +0000
28+++ app/alarm/EditAlarmPage.qml 2014-10-09 16:42:05 +0000
29@@ -23,7 +23,6 @@
30 import Ubuntu.Components.Pickers 1.0
31 import Ubuntu.Components.ListItems 1.0 as ListItem
32 import "../components"
33-import "../components/Utils.js" as Utils
34
35 Page {
36 id: _addAlarmPage
37@@ -125,7 +124,7 @@
38 // Function to validate if the alarm was saved properly
39 function validateAlarm(alarmObject) {
40 if (alarmObject.error !== Alarm.NoError) {
41- Utils.log(debugMode, "Error saving alarm, code: " + alarmObject.error)
42+ console.log("[ERROR]: Error saving alarm, code: " + alarmObject.error)
43 return false
44 }
45 else {
46@@ -177,7 +176,7 @@
47
48 onErrorChanged: {
49 if (error !== Alarm.NoError) {
50- Utils.log(debugMode, "Error saving alarm, code: " + error)
51+ console.log("[LOG]: Error saving alarm, code: " + error)
52 }
53 }
54
55
56=== modified file 'app/clock/ClockPage.qml'
57--- app/clock/ClockPage.qml 2014-10-09 16:42:05 +0000
58+++ app/clock/ClockPage.qml 2014-10-09 16:42:05 +0000
59@@ -36,7 +36,7 @@
60 flickable: null
61
62 Component.onCompleted: {
63- console.log("[LOG] Clock Page loaded")
64+ console.log("[LOG]: Clock Page loaded")
65 _clockPage.setBottomEdgePage(Qt.resolvedUrl("../alarm/AlarmPage.qml"), {})
66 }
67
68
69=== modified file 'app/components/Clock.qml'
70--- app/components/Clock.qml 2014-10-09 16:42:05 +0000
71+++ app/components/Clock.qml 2014-10-09 16:42:05 +0000
72@@ -18,7 +18,6 @@
73
74 import QtQuick 2.3
75 import Ubuntu.Components 1.1
76-import "Utils.js" as Utils
77
78 /*
79 Generic clock component which has a digital and analog mode. A flip animation
80
81=== removed file 'app/components/Utils.js'
82--- app/components/Utils.js 2014-07-17 12:21:45 +0000
83+++ app/components/Utils.js 1970-01-01 00:00:00 +0000
84@@ -1,25 +0,0 @@
85-/*
86- * Copyright (C) 2014 Canonical Ltd
87- *
88- * This file is part of Ubuntu Clock App
89- *
90- * Ubuntu Clock App is free software: you can redistribute it and/or modify
91- * it under the terms of the GNU General Public License version 3 as
92- * published by the Free Software Foundation.
93- *
94- * Ubuntu Clock App is distributed in the hope that it will be useful,
95- * but WITHOUT ANY WARRANTY; without even the implied warranty of
96- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
97- * GNU General Public License for more details.
98- *
99- * You should have received a copy of the GNU General Public License
100- * along with this program. If not, see <http://www.gnu.org/licenses/>.
101- */
102-
103-.pragma library
104-
105-function log (debugMode, message) {
106- if (debugMode) {
107- console.log("[LOG]" + message)
108- }
109-}
110
111=== modified file 'app/ubuntu-clock-app.qml'
112--- app/ubuntu-clock-app.qml 2014-10-09 16:42:05 +0000
113+++ app/ubuntu-clock-app.qml 2014-10-09 16:42:05 +0000
114@@ -23,7 +23,6 @@
115 import "clock"
116 import "alarm"
117 import "components"
118-import "components/Utils.js" as Utils
119
120 MainView {
121 id: clockApp
122@@ -31,9 +30,6 @@
123 // Property to store the state of an application (active or suspended)
124 property bool applicationState: Qt.application.active
125
126- // Property to enable/disable the debug mode to show more console output
127- property bool debugMode: true
128-
129 // objectName for functional testing purposes (autopilot-qt5)
130 objectName: "clock"
131
132@@ -78,7 +74,7 @@
133
134 AlarmModel {
135 id: alarmModel
136- Component.onCompleted: Utils.log(debugMode, "Alarm Database loaded")
137+ Component.onCompleted: console.log("[LOG]: Alarm Database loaded")
138 }
139
140 DateTime {
141
142=== modified file 'app/worldclock/UserWorldCityList.qml'
143--- app/worldclock/UserWorldCityList.qml 2014-08-24 12:47:50 +0000
144+++ app/worldclock/UserWorldCityList.qml 2014-10-09 16:42:05 +0000
145@@ -21,8 +21,6 @@
146 import U1db 1.0 as U1db
147 import Ubuntu.Components 1.1
148
149-import "../components/Utils.js" as Utils
150-
151 Column {
152 id: worldCityColumn
153
154
155=== modified file 'debian/changelog'
156--- debian/changelog 2014-10-09 16:42:05 +0000
157+++ debian/changelog 2014-10-09 16:42:05 +0000
158@@ -5,6 +5,7 @@
159 the bottom edge action. (LP: #1357945)
160 * Moved DateTime object to ubuntu-clock-app.qml so that it can be used in multiple
161 places and avoid the need to duplicate the object.
162+ * Removed Unused Utils library.
163
164 [Akiva Shammai Avraham]
165 * Improved the analog clock performance by updating the clock hands every second

Subscribers

People subscribed via source and target branches