Merge lp:~renatofilho/qtorganizer5-eds/fix-1285056 into lp:qtorganizer5-eds

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Merged at revision: 39
Proposed branch: lp:~renatofilho/qtorganizer5-eds/fix-1285056
Merge into: lp:qtorganizer5-eds
Prerequisite: lp:~renatofilho/qtorganizer5-eds/qt5.0.2
Diff against target: 109 lines (+28/-28)
1 file modified
qorganizer/qorganizer-eds-engine.cpp (+28/-28)
To merge this branch: bzr merge lp:~renatofilho/qtorganizer5-eds/fix-1285056
Reviewer Review Type Date Requested Status
Michael Sheldon (community) Approve
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+208351@code.launchpad.net

Commit message

Fixed memory leaks of ECalComponentDateTime object.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Are there any related MPs required for this MP to build/function as expected? YES
lp:~renatofilho/qtorganizer5-eds/qt5.0.2

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes): YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator? YES

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/qtorganizer5-eds) on device or emulator? YES

If you changed the UI, was the change specified/approved by design? NO UI CHANGE

If you changed the packaging (debian), did you subscribe a core-dev to this MP? NO PACKAGE CHANGE

37. By Renato Araujo Oliveira Filho

Fixed memory leak caused by object returned by e_cal_component_get_rrule_list.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator? YES (https://wiki.ubuntu.com/Process/Merges/TestPlan/qtorganizer5-eds) with a special view to recurrent events/alarms

Did CI run pass? YES

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut? YES

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qorganizer/qorganizer-eds-engine.cpp'
--- qorganizer/qorganizer-eds-engine.cpp 2014-02-20 19:22:50 +0000
+++ qorganizer/qorganizer-eds-engine.cpp 2014-02-26 14:58:59 +0000
@@ -1167,8 +1167,9 @@
1167 irec.setRecurrenceRules(qRules);1167 irec.setRecurrenceRules(qRules);
1168 item->saveDetail(&irec);1168 item->saveDetail(&irec);
1169 }1169 }
1170
1171 e_cal_component_free_recur_list(ruleList);
1170 }1172 }
1171 // TODO: free ruleList;
1172 // TODO: exeptions rules1173 // TODO: exeptions rules
1173}1174}
11741175
@@ -1552,11 +1553,11 @@
1552{1553{
1553 QOrganizerEventTime etr = item.detail(QOrganizerItemDetail::TypeEventTime);1554 QOrganizerEventTime etr = item.detail(QOrganizerItemDetail::TypeEventTime);
1554 if (!etr.isEmpty()) {1555 if (!etr.isEmpty()) {
1555 ECalComponentDateTime *dt = g_new0(ECalComponentDateTime, 1);1556 struct icaltimetype ict = icaltime_from_timet(etr.startDateTime().toTime_t(), etr.isAllDay());
1556 dt->value = g_new0(struct icaltimetype, 1);1557 ECalComponentDateTime dt;
1557 *dt->value = icaltime_from_timet(etr.startDateTime().toTime_t(), etr.isAllDay());1558 dt.tzid = NULL;
1558 e_cal_component_set_dtstart(comp, dt);1559 dt.value = &ict;
1559 e_cal_component_free_datetime(dt);1560 e_cal_component_set_dtstart(comp, &dt);
1560 }1561 }
1561}1562}
15621563
@@ -1564,11 +1565,11 @@
1564{1565{
1565 QOrganizerEventTime etr = item.detail(QOrganizerItemDetail::TypeEventTime);1566 QOrganizerEventTime etr = item.detail(QOrganizerItemDetail::TypeEventTime);
1566 if (!etr.isEmpty()) {1567 if (!etr.isEmpty()) {
1567 ECalComponentDateTime *dt = g_new0(ECalComponentDateTime, 1);1568 struct icaltimetype ict = icaltime_from_timet(etr.endDateTime().toTime_t(), etr.isAllDay());
1568 dt->value = g_new0(struct icaltimetype, 1);1569 ECalComponentDateTime dt;
1569 *dt->value = icaltime_from_timet(etr.endDateTime().toTime_t(), etr.isAllDay());1570 dt.tzid = NULL;
1570 e_cal_component_set_dtend(comp, dt);1571 dt.value = &ict;
1571 e_cal_component_free_datetime(dt);1572 e_cal_component_set_dtend(comp, &dt);
1572 }1573 }
1573}1574}
15741575
@@ -1576,11 +1577,11 @@
1576{1577{
1577 QOrganizerTodoTime etr = item.detail(QOrganizerItemDetail::TypeTodoTime);1578 QOrganizerTodoTime etr = item.detail(QOrganizerItemDetail::TypeTodoTime);
1578 if (!etr.isEmpty()) {1579 if (!etr.isEmpty()) {
1579 ECalComponentDateTime *dt = g_new0(ECalComponentDateTime, 1);1580 struct icaltimetype ict = icaltime_from_timet(etr.startDateTime().toTime_t(), etr.isAllDay());
1580 dt->value = g_new0(struct icaltimetype, 1);1581 ECalComponentDateTime dt;
1581 *dt->value = icaltime_from_timet(etr.startDateTime().toTime_t(), etr.isAllDay());1582 dt.tzid = NULL;
1582 e_cal_component_set_dtstart(comp, dt);1583 dt.value = &ict;
1583 e_cal_component_free_datetime(dt);1584 e_cal_component_set_dtstart(comp, &dt);;
1584 }1585 }
1585}1586}
15861587
@@ -1723,7 +1724,7 @@
1723 ruleList = g_slist_append(ruleList, rule);1724 ruleList = g_slist_append(ruleList, rule);
1724 }1725 }
1725 e_cal_component_set_rrule_list(comp, ruleList);1726 e_cal_component_set_rrule_list(comp, ruleList);
1726 //TODO: free ruleList1727 g_slist_free_full(ruleList, g_free);
1727 }1728 }
1728}1729}
17291730
@@ -1748,13 +1749,11 @@
1748{1749{
1749 QOrganizerTodoTime ttr = item.detail(QOrganizerItemDetail::TypeTodoTime);1750 QOrganizerTodoTime ttr = item.detail(QOrganizerItemDetail::TypeTodoTime);
1750 if (!ttr.isEmpty()) {1751 if (!ttr.isEmpty()) {
1751 ECalComponentDateTime *due = g_new0(ECalComponentDateTime, 1);1752 struct icaltimetype ict = icaltime_from_timet(ttr.dueDateTime().toTime_t(), ttr.isAllDay());
1752 due->value = g_new0(struct icaltimetype, 1);1753 ECalComponentDateTime dt;
17531754 dt.tzid = NULL;
1754 struct icaltimetype itt = icaltime_from_timet(ttr.dueDateTime().toTime_t(), ttr.isAllDay());1755 dt.value = &ict;
1755 *due->value = itt;1756 e_cal_component_set_due(comp, &dt);;
1756 e_cal_component_set_due(comp, due);
1757 e_cal_component_free_datetime(due);
1758 }1757 }
1759}1758}
17601759
@@ -1927,10 +1926,11 @@
19271926
1928 QOrganizerJournalTime jtime = item.detail(QOrganizerItemDetail::TypeJournalTime);1927 QOrganizerJournalTime jtime = item.detail(QOrganizerItemDetail::TypeJournalTime);
1929 if (!jtime.isEmpty()) {1928 if (!jtime.isEmpty()) {
1930 ECalComponentDateTime *dt = g_new0(ECalComponentDateTime, 1);1929 struct icaltimetype ict = icaltime_from_timet(jtime.entryDateTime().toTime_t(), FALSE);
1931 *dt->value = icaltime_from_timet(jtime.entryDateTime().toTime_t(), FALSE);1930 ECalComponentDateTime dt;
1932 e_cal_component_set_dtstart(comp, dt);1931 dt.tzid = NULL;
1933 e_cal_component_free_datetime(dt);1932 dt.value = &ict;
1933 e_cal_component_set_dtstart(comp, &dt);
1934 }1934 }
19351935
1936 return comp;1936 return comp;

Subscribers

People subscribed via source and target branches