Merge lp:~fboucault/ubuntu-calendar-app/startup_time into lp:ubuntu-calendar-app

Proposed by Florian Boucault
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 870
Merged at revision: 868
Proposed branch: lp:~fboucault/ubuntu-calendar-app/startup_time
Merge into: lp:ubuntu-calendar-app
Diff against target: 529 lines (+161/-125)
18 files modified
3rd-party/lunar.js (+2/-0)
AllDayEventComponent.qml (+1/-1)
ColorPickerDialog.qml (+1/-1)
ContactChoicePopup.qml (+2/-2)
DeleteConfirmationDialog.qml (+1/-1)
EditEventConfirmationDialog.qml (+1/-1)
EventRepetition.qml (+2/-2)
MonthComponent.qml (+41/-9)
MonthComponentDateDelegate.qml (+0/-33)
MonthView.qml (+55/-36)
NewEvent.qml (+4/-4)
NewEventBottomEdge.qml (+35/-28)
NewEventTimePicker.qml (+3/-3)
OnlineAccountsDummy.qml (+1/-1)
Scroller.qml (+1/-1)
TimeLineBaseComponent.qml (+1/-1)
YearView.qml (+9/-0)
calendar.qml (+1/-1)
To merge this branch: bzr merge lp:~fboucault/ubuntu-calendar-app/startup_time
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Approve
Jenkins Bot continuous-integration Approve
Renato Araujo Oliveira Filho (community) Approve
Review via email: mp+302163@code.launchpad.net

Commit message

Various startup time fixes (totalling around 1.7s saves on krillin):
- Made lunar.js a library: faster and lighter
- Much lighter MonthComponentDelegate (used in YearView)
- Upgraded imports that were forgotten to UITK 1.3 and QtQuick 2.4
- Delayed loading of months other than the one visible
- Delayed loading of years other than the one visible
- Load bottom edge asynchronously including its compilation

Description of the change

Various startup time fixes (totalling around 1.7s saves on krillin):
- Made lunar.js a library: faster and lighter
- Much lighter MonthComponentDelegate (used in YearView)
- Upgraded imports that were forgotten to UITK 1.3 and QtQuick 2.4
- Delayed loading of months other than the one visible
- Delayed loading of years other than the one visible
- Load bottom edge asynchronously including its compilation

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:869
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-calendar-app-ci/27/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1145
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/234
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1145
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1033
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1033
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1033
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1022/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1022/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1022/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1022/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1022/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1022/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1022/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1022/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1022
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1022/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-calendar-app-ci/27/rebuild

review: Approve (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) :
Revision history for this message
Florian Boucault (fboucault) :
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Today "day number" is not visible. on Month view.

review: Needs Fixing
870. By Florian Boucault

MonthView: fix non-existent reference to PathView.isCurrentItem. Fixes non visible number for today's date.

Revision history for this message
Florian Boucault (fboucault) wrote :

> Today "day number" is not visible. on Month view.

Should be fixed by latest commit

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good.

review: Approve
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) :
review: Approve (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:870
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-calendar-app-ci/28/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1201
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/249
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1201
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1077
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1077
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1077
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1065
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1065/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-calendar-app-ci/28/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '3rd-party/lunar.js'
--- 3rd-party/lunar.js 2015-11-23 09:21:05 +0000
+++ 3rd-party/lunar.js 2016-08-16 13:18:27 +0000
@@ -8,6 +8,8 @@
8* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]8* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
9* http://blog.jjonline.cn/userInterFace/173.html9* http://blog.jjonline.cn/userInterFace/173.html
10*/10*/
11.pragma library
12
11var calendar = {13var calendar = {
12 14
13 /**15 /**
1416
=== modified file 'AllDayEventComponent.qml'
--- AllDayEventComponent.qml 2016-03-09 01:49:02 +0000
+++ AllDayEventComponent.qml 2016-08-16 13:18:27 +0000
@@ -17,7 +17,7 @@
17 */17 */
18import QtQuick 2.418import QtQuick 2.4
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import Ubuntu.Components.Popups 1.020import Ubuntu.Components.Popups 1.3
21import QtOrganizer 5.021import QtOrganizer 5.0
2222
23import "dateExt.js" as DateExt23import "dateExt.js" as DateExt
2424
=== modified file 'ColorPickerDialog.qml'
--- ColorPickerDialog.qml 2016-01-29 14:47:31 +0000
+++ ColorPickerDialog.qml 2016-08-16 13:18:27 +0000
@@ -17,7 +17,7 @@
17 */17 */
18import QtQuick 2.418import QtQuick 2.4
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import Ubuntu.Components.Popups 1.020import Ubuntu.Components.Popups 1.3
2121
22Dialog {22Dialog {
23 id: root23 id: root
2424
=== modified file 'ContactChoicePopup.qml'
--- ContactChoicePopup.qml 2016-02-04 13:37:00 +0000
+++ ContactChoicePopup.qml 2016-08-16 13:18:27 +0000
@@ -18,8 +18,8 @@
18import QtQuick 2.418import QtQuick 2.4
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import Ubuntu.Components.Popups 1.320import Ubuntu.Components.Popups 1.3
21import Ubuntu.Components.ListItems 1.021import Ubuntu.Components.ListItems 1.3
22import Ubuntu.Components.Themes.Ambiance 1.022import Ubuntu.Components.Themes.Ambiance 1.3
23import QtOrganizer 5.023import QtOrganizer 5.0
24import QtContacts 5.024import QtContacts 5.0
2525
2626
=== modified file 'DeleteConfirmationDialog.qml'
--- DeleteConfirmationDialog.qml 2016-01-29 14:47:31 +0000
+++ DeleteConfirmationDialog.qml 2016-08-16 13:18:27 +0000
@@ -17,7 +17,7 @@
17 */17 */
18import QtQuick 2.418import QtQuick 2.4
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import Ubuntu.Components.Popups 1.020import Ubuntu.Components.Popups 1.3
2121
22Dialog {22Dialog {
23 id: dialogue23 id: dialogue
2424
=== modified file 'EditEventConfirmationDialog.qml'
--- EditEventConfirmationDialog.qml 2016-01-29 14:47:31 +0000
+++ EditEventConfirmationDialog.qml 2016-08-16 13:18:27 +0000
@@ -17,7 +17,7 @@
17 */17 */
18import QtQuick 2.418import QtQuick 2.4
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import Ubuntu.Components.Popups 1.020import Ubuntu.Components.Popups 1.3
2121
22Dialog {22Dialog {
23 id: dialogue23 id: dialogue
2424
=== modified file 'EventRepetition.qml'
--- EventRepetition.qml 2016-04-05 12:36:41 +0000
+++ EventRepetition.qml 2016-08-16 13:18:27 +0000
@@ -19,8 +19,8 @@
19import QtQuick 2.419import QtQuick 2.4
20import QtOrganizer 5.020import QtOrganizer 5.0
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.ListItems 1.0 as ListItem22import Ubuntu.Components.ListItems 1.3 as ListItem
23import Ubuntu.Components.Pickers 1.023import Ubuntu.Components.Pickers 1.3
24import QtOrganizer 5.024import QtOrganizer 5.0
25import "Defines.js" as Defines25import "Defines.js" as Defines
26import "Recurrence.js" as Recurrence26import "Recurrence.js" as Recurrence
2727
=== modified file 'MonthComponent.qml'
--- MonthComponent.qml 2016-04-28 20:19:03 +0000
+++ MonthComponent.qml 2016-08-16 13:18:27 +0000
@@ -67,6 +67,7 @@
67 property int monthStartMonth: monthStart.getMonth()67 property int monthStartMonth: monthStart.getMonth()
68 property int monthStartYear: monthStart.getFullYear()68 property int monthStartYear: monthStart.getFullYear()
69 readonly property int daysInStartMonth: Date.daysInMonth(monthStartYear, monthStartMonth)69 readonly property int daysInStartMonth: Date.daysInMonth(monthStartYear, monthStartMonth)
70 readonly property int daysInCurrentMonth: Date.daysInMonth(root.currentYear, root.currentMonth)
7071
71 //check if current month is start month72 //check if current month is start month
72 property bool isCurMonthStartMonth: root.currentMonth === monthStartMonth &&73 property bool isCurMonthStartMonth: root.currentMonth === monthStartMonth &&
@@ -214,6 +215,15 @@
214 return monthGrid.childAt(clickPosition.x, clickPosition.y)215 return monthGrid.childAt(clickPosition.x, clickPosition.y)
215 }216 }
216217
218 function getIndexOfChild(object, child) {
219 for (var i = 0; i <= object.children.length; i++) {
220 if (object.children[i] === child) {
221 return i;
222 }
223 }
224 return -1;
225 }
226
217 anchors {227 anchors {
218 fill: column228 fill: column
219 topMargin: monthGrid.y229 topMargin: monthGrid.y
@@ -221,12 +231,14 @@
221231
222 onPressAndHold: {232 onPressAndHold: {
223 var dayItem = getItemAt(mouse.x, mouse.y)233 var dayItem = getItemAt(mouse.x, mouse.y)
224 var selectedDate = new Date(dayItem.delegateDate.getTime());234 var index = getIndexOfChild(monthGrid, dayItem);
235 var selectedDate = intern.monthStart.addDays(index);
225 pageStack.push(Qt.resolvedUrl("NewEvent.qml"), {"date":selectedDate, "model":eventModel});236 pageStack.push(Qt.resolvedUrl("NewEvent.qml"), {"date":selectedDate, "model":eventModel});
226 }237 }
227 onClicked: {238 onClicked: {
228 var dayItem = getItemAt(mouse.x, mouse.y)239 var dayItem = getItemAt(mouse.x, mouse.y)
229 var selectedDate = new Date(dayItem.delegateDate.getTime());240 var index = getIndexOfChild(monthGrid, dayItem);
241 var selectedDate = intern.monthStart.addDays(index);
230 if (root.isYearView) {242 if (root.isYearView) {
231 //If yearView is clicked then open selected MonthView243 //If yearView is clicked then open selected MonthView
232 root.monthSelected(selectedDate);244 root.monthSelected(selectedDate);
@@ -365,15 +377,35 @@
365 Component {377 Component {
366 id: monthWithoutEventsDelegate378 id: monthWithoutEventsDelegate
367379
368 MonthComponentDateDelegate {380 Text {
369 property var delegateDate: intern.monthStart.addDays(index)
370
371 date: delegateDate.getDate()
372 isCurrentMonth: delegateDate.getMonth() === root.currentMonth
373
374 isToday: intern.todayDate == date && intern.isCurMonthTodayMonth
375 width: monthGrid.dayWidth381 width: monthGrid.dayWidth
376 height: monthGrid.dayHeight382 height: monthGrid.dayHeight
383 horizontalAlignment: Text.AlignHCenter
384 verticalAlignment: Text.AlignVCenter
385 color: {
386 var day = intern.monthStartDate + index;
387 if ( intern.monthStartDate >= 7 ) {
388 if ( day <= intern.daysInStartMonth ) {
389 text = day;
390 return "#AEA79F";
391 } else {
392 day = day - intern.daysInStartMonth;
393 }
394 }
395
396 if ( day <= intern.daysInCurrentMonth ) {
397 text = day;
398 if ( intern.todayDate == day && intern.isCurMonthTodayMonth ) {
399 return "white";
400 } else {
401 return "#5D5D5D";
402 }
403 } else {
404 day = day - intern.daysInCurrentMonth;
405 text = day;
406 return "#AEA79F";
407 }
408 }
377 }409 }
378 }410 }
379}411}
380412
=== removed file 'MonthComponentDateDelegate.qml'
--- MonthComponentDateDelegate.qml 2016-03-02 19:55:52 +0000
+++ MonthComponentDateDelegate.qml 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
1import QtQuick 2.4
2import Ubuntu.Components 1.3
3
4Item{
5 id: dateRootItem
6
7 property int date;
8 property bool isCurrentMonth;
9 property bool isToday;
10 property alias fontSize: dateLabel.font.pixelSize
11 property bool isSelected: false
12
13 Text {
14 id: dateLabel
15 anchors.centerIn: parent
16 text: date
17 color: {
18 if( isCurrentMonth ) {
19 if( isToday || isSelected ) {
20 "white"
21 } else {
22 "#5D5D5D"
23 }
24 } else {
25 if(isSelected) {
26 "white"
27 } else {
28 "#AEA79F"
29 }
30 }
31 }
32 }
33}
340
=== modified file 'MonthView.qml'
--- MonthView.qml 2016-07-06 20:17:44 +0000
+++ MonthView.qml 2016-08-16 13:18:27 +0000
@@ -31,7 +31,9 @@
31 anchorDate.getMonth(),31 anchorDate.getMonth(),
32 1,32 1,
33 0, 0, 0)33 0, 0, 0)
34 readonly property var currentDate: monthViewPath.currentItem.indexDate34 readonly property var currentDate: monthViewPath.currentItem.item ?
35 monthViewPath.currentItem.item.indexDate
36 : null
3537
36 property var selectedDay;38 property var selectedDay;
37 property bool displayLunarCalendar: false39 property bool displayLunarCalendar: false
@@ -90,41 +92,58 @@
90 bottomMargin: monthViewPage.bottomEdgeHeight92 bottomMargin: monthViewPage.bottomEdgeHeight
91 }93 }
9294
93 delegate: MonthWithEventsComponent {95 property bool loadNonVisibleDelegate: false
94 id: monthDelegate96
9597 Timer {
96 property var indexDate: firstDayOfAnchorDate.addMonths(monthViewPath.loopCurrentIndex + monthViewPath.indexType(index))98 running: true
9799 onTriggered: monthViewPath.loadNonVisibleDelegate = true
98 currentMonth: indexDate.getMonth()100 interval: 1
99 currentYear: indexDate.getFullYear()101 }
100 displayLunarCalendar: monthViewPage.displayLunarCalendar102
101103 delegate: Loader {
102 autoUpdate: monthViewPage.tabSelected && monthViewPage.active && PathView.isCurrentItem104 id: delegateLoader
103 modelFilter: eventModel.filter105
104 width: parent.width - units.gu(4)106 asynchronous: true
105 height: parent.height107 width: PathView.view.width
106 isCurrentItem: PathView.isCurrentItem108 height: PathView.view.height
107 isActive: !monthViewPath.moving && !monthViewPath.flicking109 active: monthViewPath.loadNonVisibleDelegate || (index === monthViewPath.currentIndex)
108 displayWeekNumber: mainView.displayWeekNumber110
109 isYearView: false111 sourceComponent: MonthWithEventsComponent {
110112 id: monthDelegate
111 onDateSelected: {113
112 monthViewPage.dateSelected(date);114 property var indexDate: firstDayOfAnchorDate.addMonths(monthViewPath.loopCurrentIndex + monthViewPath.indexType(index))
113 }115
114116 currentMonth: indexDate.getMonth()
115 // make sure that the model is updated after create a new event if it is marked as auto-update false117 currentYear: indexDate.getFullYear()
116 Connections {118 displayLunarCalendar: monthViewPage.displayLunarCalendar
117 target: monthViewPage119
118 onActiveChanged: {120 autoUpdate: monthViewPage.tabSelected && monthViewPage.active && isCurrentItem
119 if (monthViewPage.active) {121 modelFilter: eventModel.filter
120 monthDelegate.update()122 width: parent.width - units.gu(4)
121 }123 height: parent.height
122 }124 isCurrentItem: (index === monthViewPath.currentIndex)
123 onEventSaved: {125 isActive: !monthViewPath.moving && !monthViewPath.flicking
124 monthDelegate.update()126 displayWeekNumber: mainView.displayWeekNumber
125 }127 isYearView: false
126 onEventDeleted: {128
127 monthDelegate.update()129 onDateSelected: {
130 monthViewPage.dateSelected(date);
131 }
132
133 // make sure that the model is updated after create a new event if it is marked as auto-update false
134 Connections {
135 target: monthViewPage
136 onActiveChanged: {
137 if (monthViewPage.active) {
138 monthDelegate.update()
139 }
140 }
141 onEventSaved: {
142 monthDelegate.update()
143 }
144 onEventDeleted: {
145 monthDelegate.update()
146 }
128 }147 }
129 }148 }
130 }149 }
131150
=== modified file 'NewEvent.qml'
--- NewEvent.qml 2016-07-05 20:46:44 +0000
+++ NewEvent.qml 2016-08-16 13:18:27 +0000
@@ -19,10 +19,10 @@
19import QtQuick 2.419import QtQuick 2.4
20import QtOrganizer 5.020import QtOrganizer 5.0
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.Popups 1.022import Ubuntu.Components.Popups 1.3
23import Ubuntu.Components.ListItems 1.0 as ListItems23import Ubuntu.Components.ListItems 1.3 as ListItems
24import Ubuntu.Components.Themes.Ambiance 1.024import Ubuntu.Components.Themes.Ambiance 1.3
25import Ubuntu.Components.Pickers 1.025import Ubuntu.Components.Pickers 1.3
26import QtOrganizer 5.026import QtOrganizer 5.0
27import "Defines.js" as Defines27import "Defines.js" as Defines
28import "dateExt.js" as DateExt28import "dateExt.js" as DateExt
2929
=== modified file 'NewEventBottomEdge.qml'
--- NewEventBottomEdge.qml 2016-05-16 13:22:52 +0000
+++ NewEventBottomEdge.qml 2016-08-16 13:18:27 +0000
@@ -73,37 +73,51 @@
7373
74 onCollapseCompleted: {74 onCollapseCompleted: {
75 if (bottomEdge._realPage) {75 if (bottomEdge._realPage) {
76 bottomEdge._realPage.destroy()76 createPage()
77 bottomEdge._realPage = null
78 _realPage = editorPageBottomEdge.createObject(null)
79 }77 }
80 }78 }
8179
82 Component.onCompleted: {80 Component.onCompleted: {
83 if (eventModel)81 if (eventModel)
84 _realPage = editorPageBottomEdge.createObject(null)82 createPage()
85 }83 }
8684
87 onEventModelChanged: {85 onEventModelChanged: {
88 if (eventModel)86 if (eventModel)
89 _realPage = editorPageBottomEdge.createObject(null)87 createPage()
90 }88 }
9189
92 Component {90 function createPage() {
93 id: editorPageBottomEdge91 editorPageLoader.active = false;
94 NewEvent {92 editorPageLoader.active = true;
95 id: newEventPage93 }
9694
97 implicitWidth: bottomEdge.width95 Loader {
98 implicitHeight: bottomEdge.height96 id: editorPageLoader
99 reminderValue: bottomEdge.reminderValue97 active: false
100 model: bottomEdge.eventModel98 asynchronous: true
101 date: bottomEdge.date99 onStatusChanged: {
102 enabled: bottomEdge.status === BottomEdge.Committed100 if (status == Loader.Null) {
103 active: bottomEdge.status === BottomEdge.Committed101 bottomEdge._realPage = null;
104 visible: (bottomEdge.status !== BottomEdge.Hidden)102 } else if (status == Loader.Ready) {
103 bottomEdge._realPage = item;
104 }
105 }
106 Component.onCompleted: setSource("NewEvent.qml", {
107 "implicitWidth": Qt.binding(function() { return bottomEdge.width } ),
108 "implicitHeight": Qt.binding(function() { return bottomEdge.height } ),
109 "reminderValue": Qt.binding(function() { return bottomEdge.reminderValue } ),
110 "model": Qt.binding(function() { return bottomEdge.eventModel } ),
111 "date": Qt.binding(function() { return bottomEdge.date } ),
112 "enabled": Qt.binding(function() { return bottomEdge.status === BottomEdge.Committed } ),
113 "active": Qt.binding(function() { return bottomEdge.status === BottomEdge.Committed } ),
114 "visible": Qt.binding(function() { return (bottomEdge.status !== BottomEdge.Hidden) } ),
115 "bottomEdgePageStack": Qt.binding(function() { return bottomEdge.pageStack } ),
116 })
117
118 Connections {
119 target: editorPageLoader.item ? editorPageLoader.item : null
105 onCanceled: bottomEdge.collapse()120 onCanceled: bottomEdge.collapse()
106 bottomEdgePageStack: bottomEdge.pageStack
107 onEventSaved: {121 onEventSaved: {
108 bottomEdge.collapse()122 bottomEdge.collapse()
109 bottomEdge.eventSaved(event)123 bottomEdge.eventSaved(event)
@@ -113,11 +127,4 @@
113 }127 }
114 }128 }
115 }129 }
116
117 Component.onDestruction: {
118 if (bottomEdge._realPage) {
119 bottomEdge._realPage.destroy()
120 bottomEdge._realPage = null
121 }
122 }
123}130}
124131
=== modified file 'NewEventTimePicker.qml'
--- NewEventTimePicker.qml 2016-03-22 20:09:08 +0000
+++ NewEventTimePicker.qml 2016-08-16 13:18:27 +0000
@@ -1,7 +1,7 @@
1import QtQuick 2.41import QtQuick 2.4
2import Ubuntu.Components.ListItems 1.0 as ListItem2import Ubuntu.Components.ListItems 1.3 as ListItem
3import Ubuntu.Components.Themes.Ambiance 1.03import Ubuntu.Components.Themes.Ambiance 1.3
4import Ubuntu.Components.Pickers 1.04import Ubuntu.Components.Pickers 1.3
55
6Column {6Column {
7 id: dateTimeInput7 id: dateTimeInput
88
=== modified file 'OnlineAccountsDummy.qml'
--- OnlineAccountsDummy.qml 2015-03-28 11:31:47 +0000
+++ OnlineAccountsDummy.qml 2016-08-16 13:18:27 +0000
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */15 */
1616
17import QtQuick 2.217import QtQuick 2.4
1818
19Item {19Item {
20 id: root20 id: root
2121
=== modified file 'Scroller.qml'
--- Scroller.qml 2016-01-29 14:47:31 +0000
+++ Scroller.qml 2016-08-16 13:18:27 +0000
@@ -18,7 +18,7 @@
1818
19import QtQuick 2.419import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.0 as ListItems21import Ubuntu.Components.ListItems 1.3 as ListItems
2222
23Item {23Item {
24 id: root24 id: root
2525
=== modified file 'TimeLineBaseComponent.qml'
--- TimeLineBaseComponent.qml 2016-07-05 19:40:11 +0000
+++ TimeLineBaseComponent.qml 2016-08-16 13:18:27 +0000
@@ -18,7 +18,7 @@
1818
19import QtQuick 2.419import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.Popups 1.021import Ubuntu.Components.Popups 1.3
22import QtOrganizer 5.022import QtOrganizer 5.0
2323
24import "dateExt.js" as DateExt24import "dateExt.js" as DateExt
2525
=== modified file 'YearView.qml'
--- YearView.qml 2016-03-14 16:22:46 +0000
+++ YearView.qml 2016-08-16 13:18:27 +0000
@@ -110,12 +110,21 @@
110 bottomMargin: yearViewPage.bottomEdgeHeight110 bottomMargin: yearViewPage.bottomEdgeHeight
111 }111 }
112112
113 property bool loadNonVisibleDelegate: false
114
115 Timer {
116 running: true
117 onTriggered: yearPathView.loadNonVisibleDelegate = true
118 interval: 1
119 }
120
113 delegate: Loader {121 delegate: Loader {
114 id: delegateLoader122 id: delegateLoader
115123
116 asynchronous: true124 asynchronous: true
117 width: PathView.view.width125 width: PathView.view.width
118 height: PathView.view.height126 height: PathView.view.height
127 active: yearPathView.loadNonVisibleDelegate || (index === yearPathView.currentIndex)
119128
120 sourceComponent: YearViewDelegate {129 sourceComponent: YearViewDelegate {
121 visible: delegateLoader.status === Loader.Ready130 visible: delegateLoader.status === Loader.Ready
122131
=== modified file 'calendar.qml'
--- calendar.qml 2016-07-06 21:29:27 +0000
+++ calendar.qml 2016-08-16 13:18:27 +0000
@@ -17,7 +17,7 @@
17 */17 */
18import QtQuick 2.418import QtQuick 2.4
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import Ubuntu.Components.Popups 1.020import Ubuntu.Components.Popups 1.3
21import QtOrganizer 5.021import QtOrganizer 5.0
22import Qt.labs.settings 1.022import Qt.labs.settings 1.0
2323

Subscribers

People subscribed via source and target branches

to status/vote changes: