author | zautrix <zautrix> | 2005-07-07 22:22:20 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-07 22:22:20 (UTC) |
commit | 876816e6582299d527610e847d259d2be6de403c (patch) (side-by-side diff) | |
tree | 6683baf2835672d0d9b28b3cbbf90e84c398b835 /korganizer/calendarview.cpp | |
parent | 3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc (diff) | |
download | kdepimpi-876816e6582299d527610e847d259d2be6de403c.zip kdepimpi-876816e6582299d527610e847d259d2be6de403c.tar.gz kdepimpi-876816e6582299d527610e847d259d2be6de403c.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/calendarview.cpp | 64 |
1 files changed, 6 insertions, 58 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 426e8f9..2582931 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -104,6 +104,7 @@ #include "koglobals.h" #include "koviewmanager.h" #include "koagendaview.h" +#include "koagenda.h" #include "kodialogmanager.h" #include "outgoingdialog.h" #include "incomingdialog.h" @@ -663,7 +664,11 @@ void CalendarView::nextConflict( bool all, bool allday ) test->setTagged( false ); test = testlist.next(); } - QDateTime startDT = QDateTime (mNavigator->selectedDates().first().addDays(1), QTime ( 0,0,0)); + QTime st ( 0,0,0); + if ( mViewManager->currentView() == mViewManager->agendaView() ) + st = mViewManager->agendaView()->agenda()->getEndTime(); + //qDebug("time %s ", st.toString().latin1()); + QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); QDateTime conflict; QDateTime retVal; bool found = false; @@ -720,63 +725,6 @@ void CalendarView::nextConflict( bool all, bool allday ) topLevelWidget()->setCaption( i18n("No conflict found") ); qDebug("No conflict found "); return; - - - - - -#if 0 - - - QDate end = start.addDays( 365*2); - while ( start < end ) { - QPtrList<Event> eventList = calendar()->events( start ); - Event * ev = eventList.first(); - QPtrList<Event> test = eventList; - while ( ev ) { - //qDebug("found %d on %s ", eventList.count(), start.toString().latin1()); - Event * t_ev = test.first(); - QDateTime es = ev->dtStart(); - QDateTime ee = ev->dtEnd(); - if ( ev->doesFloat() ) - ee = ee.addDays( 1 ); - if ( ! all ) { - if ( ev->doesFloat() != allday ) - t_ev = 0; - } - while ( t_ev ) { - bool skip = false; - if ( ! all ) { - if ( t_ev->doesFloat() != allday ) - skip = true; - } - if ( !skip && ev != t_ev ) { - QDateTime ets = t_ev->dtStart(); - QDateTime ete = t_ev->dtEnd(); - if ( t_ev->doesFloat() ) - ete = ete.addDays( 1 ); - //qDebug("test %s -- %s -------- %s -- %s ", es.toString().latin1() , ee.toString().latin1(), ets.toString().latin1() , ete.toString().latin1() ); - if ( es < ete && ets < ee ) { - if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) - mViewManager->showDayView(); - mNavigator->slotDaySelect( start ); - int hour = es.time().hour(); - if ( ets > es ) - hour = ets.time().hour(); - mViewManager->agendaView()->setStartHour( hour ); - topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( ev->summary().left( 20 ) ).arg( t_ev->summary().left( 20 ) ) ); - return; - } - } - t_ev = test.next(); - } - ev = eventList.next(); - } - start = start.addDays( 1 ); - } - topLevelWidget()->setCaption( i18n("No conflict found within the next two years") ); - qDebug("No conflict found "); -#endif } void CalendarView::conflictAll() |