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
=== modified file 'EventLayoutHelper.js'
--- EventLayoutHelper.js 2014-08-18 16:48:54 +0000
+++ EventLayoutHelper.js 2016-02-03 08:03:13 +0000
@@ -37,24 +37,13 @@
37 }37 }
38}38}
3939
40
41function getMinutes(time) {
42 return time.getHours() * 60 + time.getMinutes();
43}
44
45function getDuration(event) {
46 var start = getMinutes(event.startDateTime);
47 var end = getMinutes(event.endDateTime);
48 return end - start;
49}
50
51function processEvents(events) {40function processEvents(events) {
52 var array = [];41 var array = [];
53 for( var i = 0; i < events.length ; ++i) {42 for( var i = 0; i < events.length ; ++i) {
54 var event = events[i]43 var event = events[i]
55 var sch = {};44 var sch = {};
56 sch["start"] = getMinutes(event.startDateTime);45 sch["start"] = event.startDateTime.getTime()
57 sch["duration"] = getDuration(event);46 sch["duration"] = event.endDateTime - event.startDateTime
58 sch["id"] = event.id;47 sch["id"] = event.id;
59 sch["depth"] = 0;48 sch["depth"] = 0;
60 sortedInsert(array,sch);49 sortedInsert(array,sch);
6150
=== modified file 'TimeLineBase.qml'
--- TimeLineBase.qml 2016-01-29 14:35:14 +0000
+++ TimeLineBase.qml 2016-02-03 08:03:13 +0000
@@ -80,7 +80,7 @@
80 objectName: "separator"80 objectName: "separator"
81 width: bubbleOverLay.width81 width: bubbleOverLay.width
82 visible: false82 visible: false
83 z:183 z:10
84 }84 }
8585
86 QtObject {86 QtObject {
@@ -221,28 +221,27 @@
221 if (event.endDateTime - day == 0)221 if (event.endDateTime - day == 0)
222 return;222 return;
223223
224 if (event.endDateTime.getDate() - day.getDate() == 0 &&224 if (event.endDateTime.isSameDay(day) &&
225 event.startDateTime.getDate() - day.getDate() == 0) {225 event.endDateTime.isSameDay(event.startDateTime)) {
226 hour = event.startDateTime.getHours();226 hour = event.startDateTime.getHours();
227 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight227 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
228 durationMin = (event.endDateTime.getHours() - event.startDateTime.getHours()) * 60;228 durationMin = (event.endDateTime - event.startDateTime) / Date.msPerMin;
229 durationMin += (event.endDateTime.getMinutes() - event.startDateTime.getMinutes());
230 }229 }
231 if (event.endDateTime.getDate() - day.getDate() == 0 &&230 if (!event.startDateTime.isSameDay(day) &&
232 event.startDateTime - day < 0) {231 event.endDateTime.isSameDay(day)) {
233 hour = 0;232 hour = 0;
234 yPos = 0;233 yPos = 0;
235 durationMin = event.endDateTime.getHours() * 60;234 durationMin = event.endDateTime.getHours() * 60;
236 durationMin += event.endDateTime.getMinutes();235 durationMin += event.endDateTime.getMinutes();
237 }236 }
238 if (event.startDateTime.getDate() - day.getDate() == 0 &&237 if (event.startDateTime.isSameDay(day) &&
239 event.endDateTime - day >= Date.msPerDay) {238 !event.endDateTime.isSameDay(day)) {
240 hour = event.startDateTime.getHours();239 hour = event.startDateTime.getHours();
241 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight240 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
242 durationMin = (24 - event.startDateTime.getHours()) * 60;241 durationMin = (24 - event.startDateTime.getHours()) * 60;
243 }242 }
244 if (event.endDateTime - day >= Date.msPerDay &&243 if (!event.startDateTime.isSameDay(day) &&
245 event.startDateTime- day <= 0) {244 !event.endDateTime.isSameDay(day)) {
246 hour = 0;245 hour = 0;
247 yPos = 0;246 yPos = 0;
248 durationMin = 24 * 60;247 durationMin = 24 * 60;
249248
=== modified file 'dateExt.js'
--- dateExt.js 2015-09-05 05:30:23 +0000
+++ dateExt.js 2016-02-03 08:03:13 +0000
@@ -17,6 +17,7 @@
17 */17 */
18.pragma library18.pragma library
1919
20Date.msPerMin = 60000
20Date.msPerDay = 86400e321Date.msPerDay = 86400e3
21Date.msPerWeek = Date.msPerDay * 722Date.msPerWeek = Date.msPerDay * 7
2223
2324
=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot 2015-12-06 20:06:50 +0000
+++ po/com.ubuntu.calendar.pot 2016-02-03 08:03:13 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: \n"9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-11-01 10:45+0900\n"11"POT-Creation-Date: 2016-01-11 21:36+0800\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"

Subscribers

People subscribed via source and target branches

to status/vote changes: