Merge lp:~pkunal-parmar/ubuntu-calendar-app/deleteEvent into lp:ubuntu-calendar-app

Proposed by Kunal Parmar
Status: Merged
Approved by: David Planella
Approved revision: 162
Merged at revision: 186
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/deleteEvent
Merge into: lp:ubuntu-calendar-app
Diff against target: 97 lines (+14/-11)
3 files modified
EventDetails.qml (+12/-9)
EventListModel.qml (+1/-2)
TimeLineBase.qml (+1/-0)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/deleteEvent
Reviewer Review Type Date Requested Status
David Planella Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Mihir Soni Needs Fixing
Review via email: mp+191626@code.launchpad.net

Commit message

delete event,

Description of the change

delete event,

Note: there is some issue with EDS, due to which we are not getting notification when event it removed.
So if you restart calendar, you can see event is deleted

To post a comment you must log in.
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
Mihir Soni (mihirsoni) wrote :

I did try to test this MR & not able to delete the any event.

file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/ToolbarButtonStyle.qml:33:9: QML QQuickImage: Failed to get image from provider: image://theme/delete,edit-delete-symbolic
virtual bool QOrganizerEDSEngine::startRequest(QtOrganizer::QOrganizerAbstractRequest*)
void QOrganizerEDSEngine::removeItemsAsync(QtOrganizer::QOrganizerItemRemoveRequest*)
static void QOrganizerEDSEngine::removeItemsAsyncStart(RemoveRequestData*)
Remove item size: 1
Fail to remove Items Cannot remove calendar object: Object not found

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

> I did try to test this MR & not able to delete the any event.
>
> file:///usr/lib/x86_64-linux-
> gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/ToolbarButtonStyle.qml:33:9: QML
> QQuickImage: Failed to get image from provider: image://theme/delete,edit-
> delete-symbolic
> virtual bool
> QOrganizerEDSEngine::startRequest(QtOrganizer::QOrganizerAbstractRequest*)
> void QOrganizerEDSEngine::removeItemsAsync(QtOrganizer::QOrganizerItemRemoveRe
> quest*)
> static void QOrganizerEDSEngine::removeItemsAsyncStart(RemoveRequestData*)
> Remove item size: 1
> Fail to remove Items Cannot remove calendar object: Object not found

yes, this is dues to some EDS issue,
you can find more details here.
https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1240505

158. By Kunal Parmar

making event bubble hiddle before deleting it

159. By Kunal Parmar

merge from trunk

160. By Kunal Parmar

Print statement removed

161. By Kunal Parmar

reverting menifest file

162. By Kunal Parmar

Commented out code removed

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
David Planella (dpm) wrote :

Looks good to me and it works well with EDS on Trusty.

One thing I've noticed, and that it might be worth fixing is the following typo (gloablModel vs. globalModel):

48 + var eventModel = GlobalModel.gloablModel();

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'EventDetails.qml'
2--- EventDetails.qml 2013-10-17 06:09:12 +0000
3+++ EventDetails.qml 2014-01-18 03:15:47 +0000
4@@ -4,6 +4,8 @@
5 import Ubuntu.Components.ListItems 0.1
6 import Ubuntu.Components.Themes.Ambiance 0.1
7
8+import "GlobalEventModel.js" as GlobalModel
9+
10 Page {
11 id: root
12
13@@ -39,10 +41,10 @@
14 var startTime = e.startDateTime.toLocaleTimeString(Qt.locale(), timeFormat);
15 var endTime = e.endDateTime.toLocaleTimeString(Qt.locale(), timeFormat);
16
17- startHeader.value = startTime;
18- endHeader.value = endTime;
19+ startHeader.value = startTime;
20+ endHeader.value = endTime;
21
22- // This is the event title
23+ // This is the event title
24 if( e.displayLabel) {
25 titleLabel.text = e.displayLabel;
26 }
27@@ -59,7 +61,6 @@
28 for( var j = 0 ; j < attendees.length ; ++j ) {
29 contactModel.append( {"name": attendees[j].name } );
30 }
31-
32 }
33 // FIXME: need to cache map image to avoid duplicate download every time
34 var imageSrc = "http://maps.googleapis.com/maps/api/staticmap?center="+location+
35@@ -70,16 +71,17 @@
36
37 tools: ToolbarItems {
38
39- /*
40 ToolbarButton {
41- action: Action {
42- text: i18n.tr("Add invite");
43+ action:Action {
44+ text: i18n.tr("Delete");
45+ iconSource: "image://theme/delete,edit-delete-symbolic"
46 onTriggered: {
47- print(text + " not implemented");
48+ var eventModel = GlobalModel.gloablModel();
49+ eventModel.removeItem(event);
50+ pageStack.pop();
51 }
52 }
53 }
54- */
55
56 ToolbarButton {
57 action:Action {
58@@ -91,6 +93,7 @@
59 }
60 }
61 }
62+
63 Rectangle {
64 id:eventDetilsView
65 anchors.fill: parent
66
67=== modified file 'EventListModel.qml'
68--- EventListModel.qml 2013-09-28 03:20:54 +0000
69+++ EventListModel.qml 2014-01-18 03:15:47 +0000
70@@ -3,14 +3,13 @@
71
72 import QtOrganizer 5.0
73
74-//http://qt.gitorious.org/qt/qtpim/blobs/master/examples/organizer/qmlorganizerlistview/qmlorganizerlistview.qml
75 OrganizerModel {
76 id: eventModel
77 manager:"eds"
78
79 signal reloaded
80
81- onItemCountChanged:{
82+ onModelChanged: {
83 reloaded();
84 }
85 }
86
87=== modified file 'TimeLineBase.qml'
88--- TimeLineBase.qml 2013-09-28 03:37:02 +0000
89+++ TimeLineBase.qml 2014-01-18 03:15:47 +0000
90@@ -65,6 +65,7 @@
91 if( children[i].objectName === "separator") {
92 children[i].visible = false;
93 } else {
94+ children[i].visible = false;
95 children[i].destroy();
96 }
97 }

Subscribers

People subscribed via source and target branches

to status/vote changes: