28 |
28 |
29 // ============================ MEMBER FUNCTIONS ============================== |
29 // ============================ MEMBER FUNCTIONS ============================== |
30 // ============================ CalenAgendaUtils ============================== |
30 // ============================ CalenAgendaUtils ============================== |
31 |
31 |
32 // ----------------------------------------------------------------------------- |
32 // ----------------------------------------------------------------------------- |
33 // CalenAgendaUtils::RemoveEntriesStartingAtMidnight |
33 // CalenAgendaUtils::EndsAtStartOfDay |
34 // ?implementation_description |
34 // ?implementation_description |
35 // (other items were commented in a header). |
35 // (other items were commented in a header). |
36 // ----------------------------------------------------------------------------- |
36 // ----------------------------------------------------------------------------- |
37 // |
37 // |
38 void CalenAgendaUtils::removeEntriesEndingAtMidnightL( QList<AgendaEntry>& list, |
38 bool CalenAgendaUtils::endsAtStartOfDay( AgendaEntry& entry, |
39 const QDateTime& day ) |
|
40 { |
|
41 TRACE_ENTRY_POINT; |
|
42 |
|
43 // Remove events starting before aDay and ending at midnight |
|
44 TInt i( 0 ); |
|
45 |
|
46 while( i < list.count() ) |
|
47 { |
|
48 AgendaEntry& entry = list[i]; |
|
49 |
|
50 if( endsAtStartOfDayL( entry, day ) ) |
|
51 { |
|
52 list.removeAt( i ); |
|
53 } |
|
54 else |
|
55 { |
|
56 ++i; |
|
57 } |
|
58 } |
|
59 |
|
60 TRACE_EXIT_POINT; |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CalenAgendaUtils::EndsAtStartOfDayL |
|
65 // ?implementation_description |
|
66 // (other items were commented in a header). |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 bool CalenAgendaUtils::endsAtStartOfDayL( AgendaEntry& entry, |
|
70 const QDateTime& day ) |
39 const QDateTime& day ) |
71 { |
40 { |
72 TRACE_ENTRY_POINT; |
41 TRACE_ENTRY_POINT; |
73 |
42 |
74 const QDateTime dayStart = CalenDateUtils::beginningOfDay( day ); |
43 const QDateTime dayStart = CalenDateUtils::beginningOfDay( day ); |