Merge lp:~gary-wzl77/ubuntu-calendar-app/fix_1515722 into lp:ubuntu-calendar-app

Proposed by Gary.Wang
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 754
Merged at revision: 754
Proposed branch: lp:~gary-wzl77/ubuntu-calendar-app/fix_1515722
Merge into: lp:ubuntu-calendar-app
Diff against target: 106 lines (+14/-25)
4 files modified
EventLayoutHelper.js (+2/-13)
TimeLineBase.qml (+10/-11)
dateExt.js (+1/-0)
po/com.ubuntu.calendar.pot (+1/-1)
To merge this branch: bzr merge lp:~gary-wzl77/ubuntu-calendar-app/fix_1515722
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Kunal Parmar Approve
Review via email: mp+278759@code.launchpad.net

Commit message

1.Correct duration calculation when to check overlapping of event display
2.Simplify event display bubble calculation in timeline

Description of the change

1.Correct duration calculation when to check overlapping of event display
2.Simplify event display bubble calculation in timeline

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

added a comment, otherwise code looks fine

Revision history for this message
Gary.Wang (gary-wzl77) wrote :

leave a comment for Kunal's suggestion.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

looks fine to me

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

FAILED: Autolanding.
More details in the following jenkins job:
https://core-apps-jenkins.ubuntu.com/job/run-ap-tests-autolanding/10/
Executed test runs:
    None: https://core-apps-jenkins.ubuntu.com/job/generic-land-mp/1410/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Gary.Wang (gary-wzl77) wrote :

Looks like Jenkins issue:
DEBUG: jenkins job parameter [use_description_for_commit]: not found
....

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
744. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

745. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

746. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

747. By Kunal Parmar

Build upon lp:~pkunal-parmar/ubuntu-calendar-app/Uitk1_3 by reducing the font size in headers.

Approved by Jenkins Bot, Dan Chapman .

748. By Evan McIntire

Fix a small typo in the readme (calendaar -> calendar).

Approved by Jenkins Bot, Niklas Wenzel, Alan Pope .

749. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

750. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

751. By Renato Araujo Oliveira Filho

Update to qtquick 2.4.

Approved by Jenkins Bot, Alan Pope .

752. By Renato Araujo Oliveira Filho

Simplify Tab loading, declaring individual components for each tab.
Make sure that year view is not loaded on app startup without request.

Approved by Jenkins Bot, Alan Pope .

753. By Kunal Parmar

resolves Bug #1476032. Fixes: https://bugs.launchpad.net/bugs/1369543, https://bugs.launchpad.net/bugs/1476032.

Approved by Jenkins Bot.

754. By Gary.Wang

Merge from trunk and resolve the conflict

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'EventLayoutHelper.js'
2--- EventLayoutHelper.js 2014-08-18 16:48:54 +0000
3+++ EventLayoutHelper.js 2016-02-03 08:03:13 +0000
4@@ -37,24 +37,13 @@
5 }
6 }
7
8-
9-function getMinutes(time) {
10- return time.getHours() * 60 + time.getMinutes();
11-}
12-
13-function getDuration(event) {
14- var start = getMinutes(event.startDateTime);
15- var end = getMinutes(event.endDateTime);
16- return end - start;
17-}
18-
19 function processEvents(events) {
20 var array = [];
21 for( var i = 0; i < events.length ; ++i) {
22 var event = events[i]
23 var sch = {};
24- sch["start"] = getMinutes(event.startDateTime);
25- sch["duration"] = getDuration(event);
26+ sch["start"] = event.startDateTime.getTime()
27+ sch["duration"] = event.endDateTime - event.startDateTime
28 sch["id"] = event.id;
29 sch["depth"] = 0;
30 sortedInsert(array,sch);
31
32=== modified file 'TimeLineBase.qml'
33--- TimeLineBase.qml 2016-01-29 14:35:14 +0000
34+++ TimeLineBase.qml 2016-02-03 08:03:13 +0000
35@@ -80,7 +80,7 @@
36 objectName: "separator"
37 width: bubbleOverLay.width
38 visible: false
39- z:1
40+ z:10
41 }
42
43 QtObject {
44@@ -221,28 +221,27 @@
45 if (event.endDateTime - day == 0)
46 return;
47
48- if (event.endDateTime.getDate() - day.getDate() == 0 &&
49- event.startDateTime.getDate() - day.getDate() == 0) {
50+ if (event.endDateTime.isSameDay(day) &&
51+ event.endDateTime.isSameDay(event.startDateTime)) {
52 hour = event.startDateTime.getHours();
53 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
54- durationMin = (event.endDateTime.getHours() - event.startDateTime.getHours()) * 60;
55- durationMin += (event.endDateTime.getMinutes() - event.startDateTime.getMinutes());
56+ durationMin = (event.endDateTime - event.startDateTime) / Date.msPerMin;
57 }
58- if (event.endDateTime.getDate() - day.getDate() == 0 &&
59- event.startDateTime - day < 0) {
60+ if (!event.startDateTime.isSameDay(day) &&
61+ event.endDateTime.isSameDay(day)) {
62 hour = 0;
63 yPos = 0;
64 durationMin = event.endDateTime.getHours() * 60;
65 durationMin += event.endDateTime.getMinutes();
66 }
67- if (event.startDateTime.getDate() - day.getDate() == 0 &&
68- event.endDateTime - day >= Date.msPerDay) {
69+ if (event.startDateTime.isSameDay(day) &&
70+ !event.endDateTime.isSameDay(day)) {
71 hour = event.startDateTime.getHours();
72 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
73 durationMin = (24 - event.startDateTime.getHours()) * 60;
74 }
75- if (event.endDateTime - day >= Date.msPerDay &&
76- event.startDateTime- day <= 0) {
77+ if (!event.startDateTime.isSameDay(day) &&
78+ !event.endDateTime.isSameDay(day)) {
79 hour = 0;
80 yPos = 0;
81 durationMin = 24 * 60;
82
83=== modified file 'dateExt.js'
84--- dateExt.js 2015-09-05 05:30:23 +0000
85+++ dateExt.js 2016-02-03 08:03:13 +0000
86@@ -17,6 +17,7 @@
87 */
88 .pragma library
89
90+Date.msPerMin = 60000
91 Date.msPerDay = 86400e3
92 Date.msPerWeek = Date.msPerDay * 7
93
94
95=== modified file 'po/com.ubuntu.calendar.pot'
96--- po/com.ubuntu.calendar.pot 2015-12-06 20:06:50 +0000
97+++ po/com.ubuntu.calendar.pot 2016-02-03 08:03:13 +0000
98@@ -8,7 +8,7 @@
99 msgstr ""
100 "Project-Id-Version: \n"
101 "Report-Msgid-Bugs-To: \n"
102-"POT-Creation-Date: 2015-11-01 10:45+0900\n"
103+"POT-Creation-Date: 2016-01-11 21:36+0800\n"
104 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
105 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
106 "Language-Team: LANGUAGE <LL@li.org>\n"

Subscribers

People subscribed via source and target branches

to status/vote changes: