summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--libkcal/calendar.h2
-rw-r--r--libkcal/calendarlocal.cpp11
-rw-r--r--libkcal/calendarlocal.h2
4 files changed, 14 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 538325e..9571f16 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1719,5 +1719,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
qApp->processEvents();
if ( !skipIncidence ) {
- inL = local->incidenceForUid( uid , false );
+ inL = local->incidenceForUid( uid , false , true );
if ( inL ) { // maybe conflict - same uid in both calendars
if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
@@ -1829,5 +1829,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
skipIncidence = true;
if ( !skipIncidence ) {
- inR = remote->incidenceForUid( uid , true );
+ inR = remote->incidenceForUid( uid , true, true );
if ( ! inR ) {
if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 66836a1..f301768 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -78,5 +78,5 @@ public:
virtual bool addCalendarFile( QString name, int id ) = 0;
virtual bool mergeCalendarFile( QString name ) = 0;
- virtual Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates ) = 0;
+ virtual Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates , bool enabledOnly = false ) = 0;
virtual void setSyncEventsReadOnly() = 0;
virtual void setSyncEventsEnabled() = 0;
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index b02f706..ad8ace3 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -81,5 +81,5 @@ bool CalendarLocal::mergeCalendarFile( QString name )
}
-Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckDuplicates)
+Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckDuplicates, bool enabledOnly )
{
Todo *todo;;
@@ -87,4 +87,7 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
if ( todo->uid() == uid ) {
+ if ( enabledOnly )
+ if ( !todo->calEnabled() )
+ continue;
if ( doNotCheckDuplicates ) return todo;
if ( retVal ) {
@@ -101,4 +104,7 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
for ( event = mEventList.first(); event; event = mEventList.next() ) {
if ( event->uid() == uid ) {
+ if ( enabledOnly )
+ if ( !event->calEnabled() )
+ continue;
if ( doNotCheckDuplicates ) return event;
if ( retVal ) {
@@ -114,4 +120,7 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
if ( it->uid() == uid ) {
+ if ( enabledOnly )
+ if ( !it->calEnabled() )
+ continue;
if ( doNotCheckDuplicates ) return it;
if ( retVal ) {
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index b70f0c9..b611704 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -48,5 +48,5 @@ class CalendarLocal : public Calendar
bool mergeCalendarFile( QString name );
bool mergeCalendar( Calendar* cal );
- Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates );
+ Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates, bool enabledOnly = false );
void setSyncEventsReadOnly();
void setSyncEventsEnabled();