-rw-r--r-- | korganizer/komonthview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 843526d..ae61db6 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -1536,48 +1536,51 @@ void KOMonthView::updateView() | |||
1536 | if ( end > timeSpan ) end = timeSpan; | 1536 | if ( end > timeSpan ) end = timeSpan; |
1537 | int iii; | 1537 | int iii; |
1538 | //qDebug("found %s %d %d ",event->summary().latin1(), st, end ); | 1538 | //qDebug("found %s %d %d ",event->summary().latin1(), st, end ); |
1539 | for ( iii = st;iii<= end;++iii) | 1539 | for ( iii = st;iii<= end;++iii) |
1540 | (*cells)[iii]->insertEvent( event ); | 1540 | (*cells)[iii]->insertEvent( event ); |
1541 | } | 1541 | } |
1542 | } | 1542 | } |
1543 | } else { | 1543 | } else { |
1544 | if ( invalid ) | 1544 | if ( invalid ) |
1545 | break; | 1545 | break; |
1546 | invalid = true; | 1546 | invalid = true; |
1547 | //qDebug("invalid %s", event->summary().latin1()); | 1547 | //qDebug("invalid %s", event->summary().latin1()); |
1548 | incidenceStart = QDateTime( mStartDate ).addSecs( -2 );; | 1548 | incidenceStart = QDateTime( mStartDate ).addSecs( -2 );; |
1549 | } | 1549 | } |
1550 | if ( last ) | 1550 | if ( last ) |
1551 | break; | 1551 | break; |
1552 | bool ok; | 1552 | bool ok; |
1553 | incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); | 1553 | incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); |
1554 | if ( ! ok ) | 1554 | if ( ! ok ) |
1555 | break; | 1555 | break; |
1556 | if ( incidenceStart.date() > endDate ) | 1556 | if ( incidenceStart.date() > endDate ) |
1557 | break; | 1557 | break; |
1558 | } | 1558 | } |
1559 | } else { // no recur | 1559 | } else { // no recur |
1560 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) | ||
1561 | if ( event->uid().left(15) == QString("last-syncEvent-") ) | ||
1562 | continue; | ||
1560 | int st = event->dtStart().date().daysTo( endDate ); | 1563 | int st = event->dtStart().date().daysTo( endDate ); |
1561 | if ( st >= 0 ) { // start before timeend | 1564 | if ( st >= 0 ) { // start before timeend |
1562 | int end = mStartDate.daysTo( event->dtEnd().date() ); | 1565 | int end = mStartDate.daysTo( event->dtEnd().date() ); |
1563 | if ( end >= 0 ) { // end after timestart --- got one! | 1566 | if ( end >= 0 ) { // end after timestart --- got one! |
1564 | //normalize | 1567 | //normalize |
1565 | st = timeSpan - st; | 1568 | st = timeSpan - st; |
1566 | if ( st < 0 ) st = 0; | 1569 | if ( st < 0 ) st = 0; |
1567 | if ( end > timeSpan ) end = timeSpan; | 1570 | if ( end > timeSpan ) end = timeSpan; |
1568 | int iii; | 1571 | int iii; |
1569 | for ( iii = st;iii<= end;++iii) | 1572 | for ( iii = st;iii<= end;++iii) |
1570 | (*cells)[iii]->insertEvent( event ); | 1573 | (*cells)[iii]->insertEvent( event ); |
1571 | } | 1574 | } |
1572 | } | 1575 | } |
1573 | } | 1576 | } |
1574 | } | 1577 | } |
1575 | // insert due todos | 1578 | // insert due todos |
1576 | QPtrList<Todo> todos = calendar()->todos( ); | 1579 | QPtrList<Todo> todos = calendar()->todos( ); |
1577 | Todo *todo; | 1580 | Todo *todo; |
1578 | for(todo = todos.first(); todo; todo = todos.next()) { | 1581 | for(todo = todos.first(); todo; todo = todos.next()) { |
1579 | //insertTodo( todo ); | 1582 | //insertTodo( todo ); |
1580 | if ( todo->hasDueDate() ) { | 1583 | if ( todo->hasDueDate() ) { |
1581 | int day = mStartDate.daysTo( todo->dtDue().date() ); | 1584 | int day = mStartDate.daysTo( todo->dtDue().date() ); |
1582 | if ( day >= 0 && day < timeSpan + 1) { | 1585 | if ( day >= 0 && day < timeSpan + 1) { |
1583 | (*cells)[day]->insertTodo( todo ); | 1586 | (*cells)[day]->insertTodo( todo ); |