summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index a6a1be3..42f026a 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -305,16 +305,18 @@ void DateBookDay::getEvents()
{
- widgetList.clear();
-
- QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate,
- currDate );
- QValueListIterator<EffectiveEvent> it;
- for ( it = eventList.begin(); it != eventList.end(); ++it ) {
- DateBookDayWidget* w = new DateBookDayWidget( *it, this );
- connect( w, SIGNAL( deleteMe( const Event & ) ),
- this, SIGNAL( removeEvent( const Event & ) ) );
- connect( w, SIGNAL( editMe( const Event & ) ),
- this, SIGNAL( editEvent( const Event & ) ) );
- connect( w, SIGNAL( beamMe( const Event & ) ),
- this, SIGNAL( beamEvent( const Event & ) ) );
- widgetList.append( w );
+ widgetList.clear();
+
+ QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate );
+ QValueListIterator<EffectiveEvent> it;
+ for ( it = eventList.begin(); it != eventList.end(); ++it ) {
+ EffectiveEvent ev=*it;
+ if(!(ev.end().hour()==ev.start().hour() && ev.end().minute()==ev.start().minute())) { // Skip effective events with no duration. (i.e ending at 00:00)
+ DateBookDayWidget* w = new DateBookDayWidget( *it, this );
+ connect( w, SIGNAL( deleteMe( const Event & ) ),
+ this, SIGNAL( removeEvent( const Event & ) ) );
+ connect( w, SIGNAL( editMe( const Event & ) ),
+ this, SIGNAL( editEvent( const Event & ) ) );
+ connect( w, SIGNAL( beamMe( const Event & ) ),
+ this, SIGNAL( beamEvent( const Event & ) ) );
+ widgetList.append( w );
+ }
}
@@ -362,3 +364,3 @@ void DateBookDay::relayoutPage( bool fromResize )
getEvents(); // no need we already have them!
-
+
widgetList.sort();