calendarui/controller/src/calenactionuiutils.cpp
changeset 51 0b38fc5b94c6
parent 45 b6db4fd4947b
child 57 bb2d3e476f29
equal deleted inserted replaced
46:ecd7b9840282 51:0b38fc5b94c6
    30 #include "calendar.hrh"
    30 #include "calendar.hrh"
    31 #include "hb_calencommands.hrh"
    31 #include "hb_calencommands.hrh"
    32 #include "caleninstanceid.h"
    32 #include "caleninstanceid.h"
    33 #include "CleanupResetAndDestroy.h"
    33 #include "CleanupResetAndDestroy.h"
    34 #include "calendateutils.h"
    34 #include "calendateutils.h"
       
    35 #include "OstTraceDefinitions.h"
       
    36 #ifdef OST_TRACE_COMPILER_IN_USE
       
    37 #include "calenactionuiutilsTraces.h"
       
    38 #endif
    35 
    39 
    36 // -----------------------------------------------------------------------------
    40 // -----------------------------------------------------------------------------
    37 // CCalenCommonUI::FindPossibleInstanceL
    41 // CCalenCommonUI::FindPossibleInstanceL
    38 // Finds an instance with the given instance id and instance view.
    42 // Finds an instance with the given instance id and instance view.
    39 // (other items were commented in a header).
    43 // (other items were commented in a header).
    40 // -----------------------------------------------------------------------------
    44 // -----------------------------------------------------------------------------
    41 //
    45 //
    42 AgendaEntry CalenActionUiUtils::findPossibleInstanceL(const TCalenInstanceId& id,
    46 AgendaEntry CalenActionUiUtils::findPossibleInstanceL(const TCalenInstanceId& id,
    43                                                          AgendaUtil* agendaUtil )
    47                                                          AgendaUtil* agendaUtil )
    44     {
    48     {
    45     TRACE_ENTRY_POINT;
    49     OstTraceFunctionEntry0( CALENACTIONUIUTILS_FINDPOSSIBLEINSTANCEL_ENTRY );
    46     
    50     
    47     QList<AgendaEntry> instances = agendaUtil->createEntryIdListForDay(id.mInstanceTime,
    51     QList<AgendaEntry> instances = agendaUtil->createEntryIdListForDay(id.mInstanceTime,
    48                                                                        AgendaUtil::FilterFlags(AgendaUtil::IncludeAll));
    52                                                                        AgendaUtil::FilterFlags(AgendaUtil::IncludeAll));
    49     AgendaEntry result;
    53     AgendaEntry result;
    50 
    54 
    76                 instances.removeAt(i);
    80                 instances.removeAt(i);
    77                 }
    81                 }
    78             }
    82             }
    79         }
    83         }
    80 
    84 
    81     TRACE_EXIT_POINT;
    85     OstTraceFunctionExit0( CALENACTIONUIUTILS_FINDPOSSIBLEINSTANCEL_EXIT );
    82     return result;
    86     return result;
    83     }
    87     }
    84 
    88 
    85 
    89 
    86 // ----------------------------------------------------------------------------
    90 // ----------------------------------------------------------------------------
    92 //
    96 //
    93 void CalenActionUiUtils::setToDoCompleteStatus( AgendaUtil* agendaUtil,
    97 void CalenActionUiUtils::setToDoCompleteStatus( AgendaUtil* agendaUtil,
    94                                                  AgendaEntry& entry,
    98                                                  AgendaEntry& entry,
    95                                                  const bool status )
    99                                                  const bool status )
    96     {
   100     {
    97     TRACE_ENTRY_POINT;
   101     OstTraceFunctionEntry0( CALENACTIONUIUTILS_SETTODOCOMPLETESTATUS_ENTRY );
    98 
   102     
    99     ASSERT( !entry.isNull() );
   103     ASSERT( !entry.isNull() );
   100     QDateTime now = QDateTime::currentDateTime();
   104     QDateTime now = QDateTime::currentDateTime();
   101 
   105 
   102     // set as completed or restore and update the entry in the database
   106     // set as completed or restore and update the entry in the database
   103     agendaUtil->setCompleted(entry, status, now)
   107     agendaUtil->setCompleted(entry, status, now);
   104 
   108 
   105     TRACE_EXIT_POINT;
   109     OstTraceFunctionExit0( CALENACTIONUIUTILS_SETTODOCOMPLETESTATUS_EXIT );
   106     }
   110     }
   107 
   111 
   108 // End of file
   112 // End of file