author | umopapisdn <umopapisdn> | 2003-03-28 11:58:29 (UTC) |
---|---|---|
committer | umopapisdn <umopapisdn> | 2003-03-28 11:58:29 (UTC) |
commit | 6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a (patch) (unidiff) | |
tree | 4b25e548986b560f2fbe5f91ce61491046dcc361 | |
parent | 469731b3a6cb94037330d1f40398bede57a7c0f2 (diff) | |
download | opie-6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a.zip opie-6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a.tar.gz opie-6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a.tar.bz2 |
Bugfix: (Bug #000782) Display events with no duration, unless it's an "effective event" ending at 00:00 starting at a previous day. (i.e ending at midnight)
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 2 | ||||
-rw-r--r-- | core/pim/datebook/datebookweek.cpp | 2 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index 5d472a6..af98e06 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp | |||
@@ -304,17 +304,17 @@ void DateBookDay::redraw() | |||
304 | void DateBookDay::getEvents() | 304 | void DateBookDay::getEvents() |
305 | { | 305 | { |
306 | widgetList.clear(); | 306 | widgetList.clear(); |
307 | 307 | ||
308 | QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate ); | 308 | QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate ); |
309 | QValueListIterator<EffectiveEvent> it; | 309 | QValueListIterator<EffectiveEvent> it; |
310 | for ( it = eventList.begin(); it != eventList.end(); ++it ) { | 310 | for ( it = eventList.begin(); it != eventList.end(); ++it ) { |
311 | EffectiveEvent ev=*it; | 311 | EffectiveEvent ev=*it; |
312 | 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) | 312 | if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) {// Skip events ending at 00:00 starting at another day. |
313 | DateBookDayWidget* w = new DateBookDayWidget( *it, this ); | 313 | DateBookDayWidget* w = new DateBookDayWidget( *it, this ); |
314 | connect( w, SIGNAL( deleteMe( const Event & ) ), | 314 | connect( w, SIGNAL( deleteMe( const Event & ) ), |
315 | this, SIGNAL( removeEvent( const Event & ) ) ); | 315 | this, SIGNAL( removeEvent( const Event & ) ) ); |
316 | connect( w, SIGNAL( duplicateMe( const Event & ) ), | 316 | connect( w, SIGNAL( duplicateMe( const Event & ) ), |
317 | this, SIGNAL( duplicateEvent( const Event & ) ) ); | 317 | this, SIGNAL( duplicateEvent( const Event & ) ) ); |
318 | connect( w, SIGNAL( editMe( const Event & ) ), | 318 | connect( w, SIGNAL( editMe( const Event & ) ), |
319 | this, SIGNAL( editEvent( const Event & ) ) ); | 319 | this, SIGNAL( editEvent( const Event & ) ) ); |
320 | connect( w, SIGNAL( beamMe( const Event & ) ), | 320 | connect( w, SIGNAL( beamMe( const Event & ) ), |
diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp index 5bbf86a..874cf24 100644 --- a/core/pim/datebook/datebookweek.cpp +++ b/core/pim/datebook/datebookweek.cpp | |||
@@ -134,17 +134,17 @@ void DateBookWeekView::initNames() | |||
134 | 134 | ||
135 | 135 | ||
136 | void DateBookWeekView::showEvents( QValueList<EffectiveEvent> &ev ) | 136 | void DateBookWeekView::showEvents( QValueList<EffectiveEvent> &ev ) |
137 | { | 137 | { |
138 | items.clear(); | 138 | items.clear(); |
139 | QValueListIterator<EffectiveEvent> it; | 139 | QValueListIterator<EffectiveEvent> it; |
140 | for ( it = ev.begin(); it != ev.end(); ++it ) { | 140 | for ( it = ev.begin(); it != ev.end(); ++it ) { |
141 | DateBookWeekItem *i = new DateBookWeekItem( *it ); | 141 | DateBookWeekItem *i = new DateBookWeekItem( *it ); |
142 | if(!(i->event().end().hour()==i->event().start().hour() && i->event().end().minute()==i->event().start().minute())) {// Skip effective events with no duration. (i.e ending at 00:00) | 142 | if(!((i->event().end().hour()==0) && (i->event().end().minute()==0) && (i->event().startDate()!=i->event().date()))) {// Skip events ending at 00:00 starting at another day. |
143 | positionItem( i ); | 143 | positionItem( i ); |
144 | items.append( i ); | 144 | items.append( i ); |
145 | } | 145 | } |
146 | } | 146 | } |
147 | viewport()->update(); | 147 | viewport()->update(); |
148 | } | 148 | } |
149 | 149 | ||
150 | void DateBookWeekView::moveToHour( int h ) | 150 | void DateBookWeekView::moveToHour( int h ) |
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index 4ceb360..3d6a029 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp | |||
@@ -206,17 +206,17 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, | |||
206 | const QString &, const QString &)), | 206 | const QString &, const QString &)), |
207 | this, SIGNAL(addEvent(const QDateTime &, | 207 | this, SIGNAL(addEvent(const QDateTime &, |
208 | const QDateTime &, | 208 | const QDateTime &, |
209 | const QString &, const QString &))); | 209 | const QString &, const QString &))); |
210 | layout->addWidget(hdr); | 210 | layout->addWidget(hdr); |
211 | 211 | ||
212 | // Events | 212 | // Events |
213 | while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { | 213 | while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { |
214 | if(!((*it).end().hour()==(*it).start().hour() && (*it).end().minute()==(*it).start().minute())) {// Skip effective events with no duration. (i.e ending at 00:00) | 214 | if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) {// Skip events ending at 00:00 starting at another day. |
215 | DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,this); | 215 | DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,this); |
216 | layout->addWidget(l); | 216 | layout->addWidget(l); |
217 | connect (l, SIGNAL(editEvent(const Event &)), | 217 | connect (l, SIGNAL(editEvent(const Event &)), |
218 | this, SIGNAL(editEvent(const Event &))); | 218 | this, SIGNAL(editEvent(const Event &))); |
219 | } | 219 | } |
220 | it++; | 220 | it++; |
221 | } | 221 | } |
222 | 222 | ||