Summary: | ogg vorbis function ov_read_float defined differently | ||
---|---|---|---|
Product: | [Unmaintained] arts | Reporter: | David Dudley <david.dudley> |
Component: | general | Assignee: | Stefan Westerfeld <stefan> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | auspex |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
David Dudley
2002-05-21 17:40:24 UTC
I'm pretty sure this was fixed a while back. SVN commit 455439 by kainhofe: If an event ends on midnight, it does *NOT* belong to that day (since end dates are non-inclusive)... BUG: 107149 CCBUG:42889 M +8 -4 korganizer/koagendaview.cpp M +1 -1 korganizer/komonthview.cpp M +1 -1 libkcal/calendarlocal.cpp M +14 -1 libkcal/event.cpp M +8 -2 libkcal/event.h --- branches/KDE/3.5/kdepim/korganizer/koagendaview.cpp #455438:455439 @@ -1243,7 +1243,7 @@ int endX; if ( event ) { beginX = curDate.daysTo( incidence->dtStart().date() ) + curCol; - endX = curDate.daysTo( event->dtEnd().date() ) + curCol; + endX = curDate.daysTo( event->dateEnd() ) + curCol; } else if ( todo ) { beginX = curDate.daysTo( todo->dtDue().date() ) + curCol; endX = beginX; @@ -1266,7 +1266,9 @@ } } else if ( event && event->isMultiDay() ) { int startY = mAgenda->timeToY( event->dtStart().time() ); - int endY = mAgenda->timeToY( event->dtEnd().time() ) - 1; + QTime endtime( event->dtEnd().time() ); + if ( endtime == QTime( 0, 0, 0 ) ) endtime = QTime( 23, 59, 59 ); + int endY = mAgenda->timeToY( endtime ) - 1; if ( (beginX <= 0 && curCol == 0) || beginX == curCol ) { mAgenda->insertMultiItem( event, curDate, beginX, endX, startY, endY ); } @@ -1284,7 +1286,9 @@ int startY = 0, endY = 0; if ( event ) { startY = mAgenda->timeToY( incidence->dtStart().time() ); - endY = mAgenda->timeToY( event->dtEnd().time() ) - 1; + QTime endtime( event->dtEnd().time() ); + if ( endtime == QTime( 0, 0, 0 ) ) endtime = QTime( 23, 59, 59 ); + endY = mAgenda->timeToY( endtime ) - 1; } if ( todo ) { QTime t = todo->dtDue().time(); @@ -1325,7 +1329,7 @@ QDate endDt; if ( incidence->type() == "Event" ) - endDt = (static_cast<Event *>(incidence))->dtEnd().date(); + endDt = (static_cast<Event *>(incidence))->dateEnd(); if ( todo ) { endDt = todo->isOverdue() ? QDate::currentDate() : todo->dtDue().date(); --- branches/KDE/3.5/kdepim/korganizer/komonthview.cpp #455438:455439 @@ -967,7 +967,7 @@ } } else if ( event ) { for ( QDateTime _date = date; - _date <= event->dtEnd(); _date = _date.addDays( 1 ) ) { + _date < event->dtEnd(); _date = _date.addDays( 1 ) ) { mvc = lookupCellByDate( _date.date() ); if ( mvc ) mvc->addIncidence( event ); } --- branches/KDE/3.5/kdepim/libkcal/calendarlocal.cpp #455438:455439 @@ -388,7 +388,7 @@ eventList.append( event ); } } else { - if ( event->dtStart().date() <= qd && event->dtEnd().date() >= qd ) { + if ( event->dtStart().date() <= qd && event->dateEnd() >= qd ) { eventList.append( event ); } } --- branches/KDE/3.5/kdepim/libkcal/event.cpp #455438:455439 @@ -83,6 +83,12 @@ return dtStart(); } +QDate Event::dateEnd() const +{ + if ( doesFloat() ) return dtEnd().date(); + else return dtEnd().addSecs(-1).date(); +} + QString Event::dtEndTimeStr() const { return KGlobal::locale()->formatTime(dtEnd().time()); @@ -110,7 +116,14 @@ bool Event::isMultiDay() const { - bool multi = !(dtStart().date() == dtEnd().date()); + // End date is non inclusive, so subtract 1 second... + QDateTime start( dtStart() ); + QDateTime end( dtEnd() ); + if ( ! doesFloat() ) { + end = end.addSecs(-1); + } + bool multi = ( start.date() != end.date() && start <= end ); +kdDebug() <<" Item " << summary() << " is multi: " << multi << endl; return multi; } --- branches/KDE/3.5/kdepim/libkcal/event.h #455438:455439 @@ -34,7 +34,7 @@ public: /** Transparency of event. - + Opaque - event appears in free/busy time Transparent - event doesn't appear in free/busy time */ @@ -63,6 +63,12 @@ */ virtual QDateTime dtEnd() const; /** + Returns the day when the event ends. This might be different from + dtEnd().date, since the end date/time is non-inclusive. So timed events + ending at 0:00 have their end date on the day before. + */ + QDate dateEnd() const; + /** Return end time as string formatted according to the users locale settings. */ @@ -70,7 +76,7 @@ /** Return end date as string formatted according to the users locale settings. - + @param shortfmt if true return string in short format, if false return long format */ *** Bug 112483 has been marked as a duplicate of this bug. *** |