summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/calendarview.cpp24
-rw-r--r--libkcal/event.cpp16
-rw-r--r--libkcal/event.h2
4 files changed, 31 insertions, 15 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 43bc343..34e9b7f 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1500,3 +1500,3 @@
{ "Events with time","Termine mit Zeit" },
-{ "No conflict found within the next two years","Kein Konflikt innerhalb der nächsten zwei Jahre gefunden" },
+{ "No conflict found","Kein Konflikt gefunden" },
{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" },
@@ -1507,3 +1507,3 @@
{ "Show date","Zeige Datum" },
-{ "No problem!","Kein Problem!" },
+{ "No problem!","Null Problemo!" },
{ "","" },
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, &current ) ) {
if ( ! found ) {
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index 235ae55..46e8174 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -173,3 +173,3 @@ void Event::setDuration(int seconds)
}
-bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFutureOnly )
+bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, QDateTime* startDT )
{
@@ -193,4 +193,4 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
*overlapDT = mDtStart;
- if ( inFutureOnly )
- return (*overlapDT >= QDateTime::currentDateTime() );
+ if ( startDT )
+ return (*overlapDT >= *startDT );
return true;
@@ -217,3 +217,3 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
return false;
- if ( inFutureOnly && enr < QDateTime::currentDateTime() )
+ if ( startDT && enr < *startDT )
return false;
@@ -235,4 +235,4 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
*overlapDT = nonRecur->mDtStart;
- if ( inFutureOnly ) {
- if ( *overlapDT >= QDateTime::currentDateTime() )
+ if ( startDT ) {
+ if ( *overlapDT >= *startDT )
return true;
@@ -276,4 +276,4 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
*overlapDT = incidenceStart;
- if ( inFutureOnly ) {
- if ( *overlapDT >= QDateTime::currentDateTime() )
+ if ( startDT ) {
+ if ( *overlapDT >= *startDT )
return true;
diff --git a/libkcal/event.h b/libkcal/event.h
index 80c11c4..e6055a5 100644
--- a/libkcal/event.h
+++ b/libkcal/event.h
@@ -76,3 +76,3 @@ class Event : public Incidence
- bool isOverlapping ( Event*, QDateTime*, bool inFutureOnly );
+ bool isOverlapping ( Event*, QDateTime*, QDateTime* );