summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-11-26 11:20:22 (UTC)
committer zautrix <zautrix>2005-11-26 11:20:22 (UTC)
commit85bd9f05564e566b296c949ce6e214ebdbf573ac (patch) (side-by-side diff)
treeb00eb9453ea06f2b43fd896a9a4840b7d64af69b
parent3cd0013c04172b312ee21e80224a3b7734b4d413 (diff)
downloadkdepimpi-85bd9f05564e566b296c949ce6e214ebdbf573ac.zip
kdepimpi-85bd9f05564e566b296c949ce6e214ebdbf573ac.tar.gz
kdepimpi-85bd9f05564e566b296c949ce6e214ebdbf573ac.tar.bz2
sync
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
@@ -1718,7 +1718,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
QString idS;
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 ) {
//qDebug("take %d %s ", take, inL->summary().latin1());
@@ -1828,7 +1828,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID )
skipIncidence = true;
if ( !skipIncidence ) {
- inR = remote->incidenceForUid( uid , true );
+ inR = remote->incidenceForUid( uid , true, true );
if ( ! inR ) {
if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
// no conflict ********** add or delete local
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 66836a1..f301768 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -77,7 +77,7 @@ public:
virtual void addCalendar( Calendar* ) = 0;
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;
virtual void stopAllTodos() = 0;
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index b02f706..ad8ace3 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -80,12 +80,15 @@ bool CalendarLocal::mergeCalendarFile( QString name )
return false;
}
-Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckDuplicates)
+Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckDuplicates, bool enabledOnly )
{
Todo *todo;;
Incidence *retVal = 0;
for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
if ( todo->uid() == uid ) {
+ if ( enabledOnly )
+ if ( !todo->calEnabled() )
+ continue;
if ( doNotCheckDuplicates ) return todo;
if ( retVal ) {
if ( retVal->calID() > todo->calID() ) {
@@ -100,6 +103,9 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
Event *event;
for ( event = mEventList.first(); event; event = mEventList.next() ) {
if ( event->uid() == uid ) {
+ if ( enabledOnly )
+ if ( !event->calEnabled() )
+ continue;
if ( doNotCheckDuplicates ) return event;
if ( retVal ) {
if ( retVal->calID() > event->calID() ) {
@@ -113,6 +119,9 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
if ( retVal ) return retVal;
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 ) {
if ( retVal->calID() > it->calID() ) {
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index b70f0c9..b611704 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -47,7 +47,7 @@ class CalendarLocal : public Calendar
bool addCalendarFile( QString name, int id );
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();
void stopAllTodos();