-rw-r--r-- | korganizer/calendarview.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 65750af..426e8f9 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -663,2 +663,3 @@ void CalendarView::nextConflict( bool all, bool allday ) test->setTagged( false ); + test = testlist.next(); } @@ -669,8 +670,18 @@ void CalendarView::nextConflict( bool all, bool allday ) Event * cE = 0; + Event * cE2 = 0; QPtrList<Event> testlist2 = testlist; + test = testlist.first(); + bool skip = false; while ( test ) { + skip = false; + if ( !all ) skip = ( allday != test->doesFloat() ); + if ( !skip ) { Event * test2 = testlist2.first(); while ( test2 ) { + skip = false; + if ( !all ) skip = ( allday != test2->doesFloat() ); + if ( !skip ) { if ( !test2->isTagged() ) { - if ( test->isOverlapping ( test2, &retVal, true ) ) { + if ( test->isOverlapping ( test2, &retVal, &startDT ) ) { + //qDebug("overlap "); if ( ! found ) { @@ -679,2 +690,3 @@ void CalendarView::nextConflict( bool all, bool allday ) cE = test; + cE2 = test2; found = true; @@ -685,2 +697,4 @@ void CalendarView::nextConflict( bool all, bool allday ) cE = test; + cE2 = test2; + } } @@ -691,2 +705,3 @@ void CalendarView::nextConflict( bool all, bool allday ) } + } test->setTagged( true ); @@ -700,3 +715,3 @@ void CalendarView::nextConflict( bool all, bool allday ) mViewManager->agendaView()->setStartHour( hour ); - topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( mConflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); + topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( cE->summary().left( 20 ) ).arg( cE2->summary().left( 20 ) ) ); return; @@ -704,3 +719,3 @@ void CalendarView::nextConflict( bool all, bool allday ) - topLevelWidget()->setCaption( i18n("No conflict found within the next two years") ); + topLevelWidget()->setCaption( i18n("No conflict found") ); qDebug("No conflict found "); @@ -2796,5 +2811,6 @@ void CalendarView::checkConflictForEvent() Event * cE = 0; + QDateTime current = QDateTime::currentDateTime(); while ( test ) { if ( !test->doesFloat() ) { - if ( mConflictingEvent->isOverlapping ( test, &retVal, true ) ) { + if ( mConflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { if ( ! found ) { |