--- a/calendarui/controller/src/caleneditui.cpp Mon May 03 12:30:32 2010 +0300
+++ b/calendarui/controller/src/caleneditui.cpp Mon Jun 28 15:22:02 2010 +0530
@@ -56,7 +56,7 @@
CCalenEditUi::~CCalenEditUi()
{
TRACE_ENTRY_POINT;
-
+ iController.CancelNotifications(this);
TRACE_EXIT_POINT;
}
@@ -102,7 +102,7 @@
TInt command = aCommand.Command();
MCalenContext& context = iController.Services().Context();
AgendaEntry editedEntry;
- QDateTime newEntryDateTime = iController.context().focusDateAndTimeL();
+ QDateTime newEntryDateTime = iController.context().focusDateAndTime();
// Check if it is not on same day and set the default time and date accordingly.
bool isSameDay = CalenDateUtils::isOnToday(newEntryDateTime);
@@ -122,15 +122,17 @@
context.instanceId().mEntryLocalUid );
// For repeating entry, we need to update proper start time here
// from the context
- if (editedEntry.isRepeating()) {
- // Get the instancde time frm the context
- QDateTime instanceTime = context.focusDateAndTimeL();
- editedEntry.setStartAndEndTime(instanceTime, editedEntry.endTime());
+ if(!editedEntry.isNull()) {
+ if (editedEntry.isRepeating()) {
+ // Get the instancde time frm the context
+ QDateTime instanceTime = context.focusDateAndTime();
+ editedEntry.setStartAndEndTime(instanceTime, editedEntry.endTime());
+ }
+ iEditor= new CalenEditor(iController.Services().agendaInterface());
+ iEditor->edit(editedEntry, false);
+ connect(iEditor, SIGNAL(entrySaved()), this, SLOT(handleEntrySaved()));
+ connect(iEditor, SIGNAL(dialogClosed()), this, SLOT(handleDialogClosed()));
}
- iEditor= new CalenEditor(iController.Services().agendaInterface());
- iEditor->edit(editedEntry, false);
- connect(iEditor, SIGNAL(entrySaved()), this, SLOT(handleEntrySaved()));
- connect(iEditor, SIGNAL(dialogClosed()), this, SLOT(handleDialogClosed()));
break;
default:
// Controller decided this class was the place to handle this