Diffstat (limited to 'core/pim/datebook/datebookday.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index 00ddd05..26f0303 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp | |||
@@ -354,28 +354,29 @@ void DateBookDay::redraw() | |||
354 | 354 | ||
355 | void DateBookDay::getEvents() | 355 | void DateBookDay::getEvents() |
356 | { | 356 | { |
357 | widgetList.clear(); | 357 | widgetList.clear(); |
358 | 358 | ||
359 | /* clear the AllDay List */ | 359 | /* clear the AllDay List */ |
360 | m_allDays->hide(); // just in case | 360 | m_allDays->hide(); // just in case |
361 | m_allDays->removeAllEvents(); | 361 | m_allDays->removeAllEvents(); |
362 | 362 | ||
363 | QStringList hdays = _holiday_db->holidaylist(currDate); | 363 | QStringList hdays = _holiday_db->holidaylist(currDate); |
364 | QStringList::Iterator sit; | 364 | QStringList::Iterator sit; |
365 | QObject* object = 0; | 365 | QObject* object = 0; |
366 | |||
367 | /* this way we make sure that holiday dummy events are always | ||
368 | on top of the widgetlist. */ | ||
366 | for (sit=hdays.begin();sit!=hdays.end();++sit) { | 369 | for (sit=hdays.begin();sit!=hdays.end();++sit) { |
367 | object = m_allDays->addHoliday(*sit); | 370 | m_allDays->addHoliday(*sit); |
368 | if (!object) continue; | ||
369 | /* not to do something with it */ | ||
370 | } | 371 | } |
371 | QValueList<EffectiveEvent> eventList = db->getEffectiveEventsNoHoliday( currDate, currDate ); | 372 | QValueList<EffectiveEvent> eventList = db->getEffectiveEventsNoHoliday( currDate, currDate ); |
372 | QValueListIterator<EffectiveEvent> it; | 373 | QValueListIterator<EffectiveEvent> it; |
373 | 374 | ||
374 | for ( it = eventList.begin(); it != eventList.end(); ++it ) { | 375 | for ( it = eventList.begin(); it != eventList.end(); ++it ) { |
375 | EffectiveEvent ev=*it; | 376 | EffectiveEvent ev=*it; |
376 | if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) { // Skip events ending at 00:00 starting at another day. | 377 | if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) { // Skip events ending at 00:00 starting at another day. |
377 | if (ev.event().type() == Event::AllDay ) { | 378 | if (ev.event().type() == Event::AllDay ) { |
378 | object = m_allDays->addEvent( ev ); | 379 | object = m_allDays->addEvent( ev ); |
379 | if (!object) | 380 | if (!object) |
380 | continue; | 381 | continue; |
381 | }else { | 382 | }else { |