Merge lp:~mihirsoni/ubuntu-calendar-app/limitLablesModel into lp:ubuntu-calendar-app

Proposed by Mihir Soni
Status: Merged
Approved by: Kunal Parmar
Approved revision: 522
Merged at revision: 521
Proposed branch: lp:~mihirsoni/ubuntu-calendar-app/limitLablesModel
Merge into: lp:ubuntu-calendar-app
Diff against target: 72 lines (+16/-12)
3 files modified
Defines.js (+1/-6)
EventRepetition.qml (+5/-1)
LimitLabelModel.qml (+10/-5)
To merge this branch: bzr merge lp:~mihirsoni/ubuntu-calendar-app/limitLablesModel
Reviewer Review Type Date Requested Status
Kunal Parmar Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Arto Jalkanen (community) Approve
Review via email: mp+239194@code.launchpad.net

Commit message

Moved limitLabels from object to ListModel

Description of the change

Moved limitLabels from object to ListModel

To post a comment you must log in.
Revision history for this message
Arto Jalkanen (ajalkane) wrote :

Looks good, so I'm just going to nitpick: the function() definition is intended too deep.

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

So yeah, I'll approve and you'll consider whether to change the indentation.

review: Approve
521. By Mihir Soni

Indentation issues

522. By Mihir Soni

reverted pot changes

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

seems good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Defines.js'
--- Defines.js 2014-09-20 10:45:35 +0000
+++ Defines.js 2014-10-22 17:38:27 +0000
@@ -20,7 +20,6 @@
20.import QtOrganizer 5.0 as QtPim20.import QtOrganizer 5.0 as QtPim
2121
22var recurrenceLabel = getRecurrenceLabels();22var recurrenceLabel = getRecurrenceLabels();
23var limitLabel = getLimitLabels();
24var weekLabel = getWeekLabels();23var weekLabel = getWeekLabels();
25// It contains multiple weekly entries to handle following occurence24// It contains multiple weekly entries to handle following occurence
26//1.Every Weekday (Monday to Friday25//1.Every Weekday (Monday to Friday
@@ -41,11 +40,7 @@
41 var object = component.createObject(Qt.application);40 var object = component.createObject(Qt.application);
42 return object.recurrenceLabel;41 return object.recurrenceLabel;
43}42}
44function getLimitLabels(){43
45 var component = Qt.createComponent(Qt.resolvedUrl("LimitLabelDefines.qml"));
46 var object = component.createObject(Qt.application);
47 return object.limitLabel;
48}
49function getWeekLabels(){44function getWeekLabels(){
50 var object = Qt.createQmlObject('\45 var object = Qt.createQmlObject('\
51 import QtQuick 2.3;\46 import QtQuick 2.3;\
5247
=== modified file 'EventRepetition.qml'
--- EventRepetition.qml 2014-10-17 05:42:34 +0000
+++ EventRepetition.qml 2014-10-22 17:38:27 +0000
@@ -44,6 +44,10 @@
44 id:eventUtils44 id:eventUtils
45 }45 }
4646
47 LimitLabelModel {
48 id:limitLabels
49 }
50
47 Component.onCompleted: {51 Component.onCompleted: {
48 //Fill Date & limitcount if any52 //Fill Date & limitcount if any
49 var index = 0;53 var index = 0;
@@ -203,7 +207,7 @@
203 margins: units.gu(2)207 margins: units.gu(2)
204 }208 }
205209
206 model: Defines.limitLabel210 model: limitLabels
207 containerHeight: itemHeight * 4211 containerHeight: itemHeight * 4
208 onExpandedChanged: Qt.inputMethod.hide()212 onExpandedChanged: Qt.inputMethod.hide()
209 }213 }
210214
=== renamed file 'LimitLabelDefines.qml' => 'LimitLabelModel.qml'
--- LimitLabelDefines.qml 2014-09-20 10:45:35 +0000
+++ LimitLabelModel.qml 2014-10-22 17:38:27 +0000
@@ -16,9 +16,14 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
18import QtQuick 2.3;18import QtQuick 2.3;
19import Ubuntu.Components 1.1;19
20QtObject {20ListModel {
21 property var limitLabel:[i18n.tr("Never"),i18n.tr("After X Occurrence"),21 id:limitLables
22 i18n.tr("After Date")];22 Component.onCompleted: initialise()
2323
24 function initialise() {
25 limitLables.append({ "label": i18n.tr("Never") })
26 limitLables.append({ "label": i18n.tr("After X Occurrence") })
27 limitLables.append({ "label": i18n.tr("After Date") })
28 }
24}29}

Subscribers

People subscribed via source and target branches

to status/vote changes: