author | zautrix <zautrix> | 2005-07-10 00:09:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-10 00:09:04 (UTC) |
commit | 2d1e1fe5d290503db8c0462fc294f5c04f58e95c (patch) (unidiff) | |
tree | ffb1ba581d7a766cb736d42d43dad88a54dabdfd /korganizer | |
parent | 2aabde6c21d6dc4f9de8cf3ac17b98053961cc6b (diff) | |
download | kdepimpi-2d1e1fe5d290503db8c0462fc294f5c04f58e95c.zip kdepimpi-2d1e1fe5d290503db8c0462fc294f5c04f58e95c.tar.gz kdepimpi-2d1e1fe5d290503db8c0462fc294f5c04f58e95c.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/calendarview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index f9685e9..ab69158 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -664,33 +664,35 @@ void CalendarView::nextConflict( bool all, bool allday ) | |||
664 | test->setTagged( false ); | 664 | test->setTagged( false ); |
665 | test = testlist.next(); | 665 | test = testlist.next(); |
666 | } | 666 | } |
667 | QTime st ( 0,0,0); | 667 | QTime st ( 0,0,0); |
668 | if ( mViewManager->currentView() == mViewManager->agendaView() ) | 668 | if ( mViewManager->currentView() == mViewManager->agendaView() ) |
669 | st = mViewManager->agendaView()->agenda()->getEndTime(); | 669 | st = mViewManager->agendaView()->agenda()->getEndTime(); |
670 | //qDebug("time %s ", st.toString().latin1()); | 670 | //qDebug("time %s ", st.toString().latin1()); |
671 | QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); | 671 | QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); |
672 | QDateTime conflict; | 672 | QDateTime conflict; |
673 | QDateTime retVal; | 673 | QDateTime retVal; |
674 | bool found = false; | 674 | bool found = false; |
675 | Event * cE = 0; | 675 | Event * cE = 0; |
676 | Event * cE2 = 0; | 676 | Event * cE2 = 0; |
677 | QPtrList<Event> testlist2 = testlist; | 677 | QPtrList<Event> testlist2 = testlist; |
678 | test = testlist.first(); | 678 | test = testlist.first(); |
679 | bool skip = false; | 679 | bool skip = false; |
680 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); | ||
680 | while ( test ) { | 681 | while ( test ) { |
682 | qApp->processEvents(); | ||
681 | skip = false; | 683 | skip = false; |
682 | if ( !all ) skip = ( allday != test->doesFloat() ); | 684 | if ( !all ) skip = ( allday != test->doesFloat() ); |
683 | if ( !skip ) { | 685 | if ( !skip ) { |
684 | Event * test2 = testlist2.first(); | 686 | Event * test2 = testlist2.first(); |
685 | while ( test2 ) { | 687 | while ( test2 ) { |
686 | skip = false; | 688 | skip = false; |
687 | if ( !all ) skip = ( allday != test2->doesFloat() ); | 689 | if ( !all ) skip = ( allday != test2->doesFloat() ); |
688 | if ( !skip ) { | 690 | if ( !skip ) { |
689 | if ( !test2->isTagged() ) { | 691 | if ( !test2->isTagged() ) { |
690 | if ( test->isOverlapping ( test2, &retVal, &startDT ) ) { | 692 | if ( test->isOverlapping ( test2, &retVal, &startDT ) ) { |
691 | //qDebug("overlap "); | 693 | //qDebug("overlap "); |
692 | if ( ! found ) { | 694 | if ( ! found ) { |
693 | if ( retVal >= startDT ) { | 695 | if ( retVal >= startDT ) { |
694 | conflict = retVal; | 696 | conflict = retVal; |
695 | cE = test; | 697 | cE = test; |
696 | cE2 = test2; | 698 | cE2 = test2; |
@@ -2755,44 +2757,42 @@ void CalendarView::changeEventDisplay(Event *which, int action) | |||
2755 | mTodoList->updateView(); | 2757 | mTodoList->updateView(); |
2756 | if ( action != KOGlobals::EVENTDELETED ) { | 2758 | if ( action != KOGlobals::EVENTDELETED ) { |
2757 | mConflictingEvent = which ; | 2759 | mConflictingEvent = which ; |
2758 | QTimer::singleShot( 1000, this, SLOT ( checkConflictForEvent() ) ); | 2760 | QTimer::singleShot( 1000, this, SLOT ( checkConflictForEvent() ) ); |
2759 | } | 2761 | } |
2760 | // } | 2762 | // } |
2761 | } else { | 2763 | } else { |
2762 | mViewManager->currentView()->updateView(); | 2764 | mViewManager->currentView()->updateView(); |
2763 | } | 2765 | } |
2764 | } | 2766 | } |
2765 | void CalendarView::checkConflictForEvent() | 2767 | void CalendarView::checkConflictForEvent() |
2766 | { | 2768 | { |
2767 | 2769 | ||
2768 | if (!KOPrefs::instance()->mConfirm) | 2770 | if (!KOPrefs::instance()->mConfirm) |
2769 | return; | 2771 | return; |
2770 | if ( ! mConflictingEvent ) return; | 2772 | if ( ! mConflictingEvent ) return; |
2771 | if ( mConflictingEvent->isHoliday() || mConflictingEvent->isBirthday() || mConflictingEvent->isAnniversary() ) { | 2773 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); |
2772 | mConflictingEvent = 0; | ||
2773 | return; | ||
2774 | } | ||
2775 | QPtrList<Event> testlist = mCalendar->events(); | 2774 | QPtrList<Event> testlist = mCalendar->events(); |
2776 | Event * test = testlist.first(); | 2775 | Event * test = testlist.first(); |
2777 | QDateTime conflict; | 2776 | QDateTime conflict; |
2778 | QDateTime retVal; | 2777 | QDateTime retVal; |
2779 | bool found = false; | 2778 | bool found = false; |
2780 | Event * cE = 0; | 2779 | Event * cE = 0; |
2781 | QDateTime current = QDateTime::currentDateTime(); | 2780 | QDateTime current = QDateTime::currentDateTime(); |
2782 | while ( test ) { | 2781 | while ( test ) { |
2782 | qApp->processEvents(); | ||
2783 | if ( !test->doesFloat() ) { | 2783 | if ( !test->doesFloat() ) { |
2784 | if ( mConflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { | 2784 | if ( mConflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { |
2785 | if ( ! found ) { | 2785 | if ( ! found ) { |
2786 | conflict = retVal; | 2786 | conflict = retVal; |
2787 | cE = test; | 2787 | cE = test; |
2788 | } else { | 2788 | } else { |
2789 | if ( retVal < conflict ) { | 2789 | if ( retVal < conflict ) { |
2790 | conflict = retVal; | 2790 | conflict = retVal; |
2791 | cE = test; | 2791 | cE = test; |
2792 | } | 2792 | } |
2793 | } | 2793 | } |
2794 | found = true; | 2794 | found = true; |
2795 | } | 2795 | } |
2796 | } | 2796 | } |
2797 | test = testlist.next(); | 2797 | test = testlist.next(); |
2798 | } | 2798 | } |