From: Gaurav Bhatt Date: Tue, 2 Jul 2013 08:24:51 +0000 (+0530) Subject: Fix for Issue N_SE-44351 X-Git-Tag: submit/tizen_2.2/20130714.134303~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13313380e8c350f93e3d8833b982ec5ff377b6b0;p=apps%2Fosp%2FCalendar.git Fix for Issue N_SE-44351 Changed as per the review comments. Change-Id: I30b77e7bec8f6355e18b1aa2ee10c3ee725ef813 Signed-off-by: Gaurav Bhatt --- diff --git a/src/ClRepeatForm.cpp b/src/ClRepeatForm.cpp index dc872c7..54c6f42 100644 --- a/src/ClRepeatForm.cpp +++ b/src/ClRepeatForm.cpp @@ -214,12 +214,7 @@ RepeatForm::OnFormBackRequested(Form& source) } else { - // Todo: Recurrence::SetUntil()'s behavior is not matched with its doxygen. - // In API description, SetUntil() is available to set DateTime::GetMaxValue(), but it returns E_INVALID_ARG. - // However, according to E_INVALID_ARG description, if date > GetMaxDateTime() then API returns E_INVALID_ARG. - // If above contradiction is resolved in the future SDK, below code will be modified, depending on the policy of the SDK. - DateTime maxDate = Calendarbook::GetMaxDateTime(); - maxDate.AddYears(-1); + DateTime maxDate = DateTime::GetMaxValue(); __pRepeat->SetUntil(&maxDate); } @@ -601,8 +596,8 @@ RepeatForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cur { delete __pRepeat; __pRepeat = new (std::nothrow) Recurrence(*pRecurrence); - DateTime maxdate = Calendarbook::GetMaxDateTime(); - maxdate.SetValue(maxdate.GetYear(),1,1); + DateTime maxdate = DateTime::GetMaxValue(); + int prevRepeatIndex = (int)__repeatType; int prevRepeatUntilIndex = (int)__repeatUntilType; @@ -791,12 +786,7 @@ RepeatForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) } else { - // Todo: Recurrence::SetUntil()'s behavior is not matched with its doxygen. - // In API description, SetUntil() is available to set DateTime::GetMaxValue(), but it returns E_INVALID_ARG. - // However, according to E_INVALID_ARG description, if date > GetMaxDateTime() then API returns E_INVALID_ARG. - // If above contradiction is resolved in the future SDK, below code will be modified, depending on the policy of the SDK. - DateTime maxDate = Calendarbook::GetMaxDateTime(); - maxDate.AddYears(-1); + DateTime maxDate = DateTime::GetMaxValue(); __pRepeat->SetUntil(&maxDate); }