summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-11-28 01:23:02 (UTC)
committer zautrix <zautrix>2005-11-28 01:23:02 (UTC)
commite08811c2246f63b2b63f9db6b65701344460f3d7 (patch) (unidiff)
treed450f486a9472d80eb86f605237b828a0e7ffae6 /korganizer
parent854d4a0c686962cd73ac7418b5fbf4b2d73adab7 (diff)
downloadkdepimpi-e08811c2246f63b2b63f9db6b65701344460f3d7.zip
kdepimpi-e08811c2246f63b2b63f9db6b65701344460f3d7.tar.gz
kdepimpi-e08811c2246f63b2b63f9db6b65701344460f3d7.tar.bz2
ync
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8d024c1..1800cf2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1604,6 +1604,7 @@ void CalendarView::checkExternalId( Incidence * inc )
1604 checkExternSyncEvent( lastSync, inc ); 1604 checkExternSyncEvent( lastSync, inc );
1605 1605
1606} 1606}
1607// SSSSSSSSSSSSSSSSSSSSSS
1607bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) 1608bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode )
1608{ 1609{
1609 1610
@@ -1723,8 +1724,15 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1723 QString idS; 1724 QString idS;
1724 qApp->processEvents(); 1725 qApp->processEvents();
1725 if ( !skipIncidence ) { 1726 if ( !skipIncidence ) {
1726 inL = local->incidenceForUid( uid , false , true ); 1727 int hasCalId = 0;
1728 inL = local->incidenceForUid( uid , false , true, &hasCalId );
1729 if ( hasCalId && !inL )
1730 inL = local->incidenceForUid( uid , false , true, &hasCalId );
1731 else
1732 hasCalId = 0;
1727 if ( inL ) { // maybe conflict - same uid in both calendars 1733 if ( inL ) { // maybe conflict - same uid in both calendars
1734 if ( hasCalId )
1735 qDebug("KO: Cal id %d conflict detected: %s ", hasCalId, inL->summary().latin1());
1728 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { 1736 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
1729 //qDebug("take %d %s ", take, inL->summary().latin1()); 1737 //qDebug("take %d %s ", take, inL->summary().latin1());
1730 if ( take == 3 ) 1738 if ( take == 3 )
@@ -1750,6 +1758,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1750 idS = inL->IDStr(); 1758 idS = inL->IDStr();
1751 int pid = inL->pilotId(); 1759 int pid = inL->pilotId();
1752 int calID = inL->calID(); 1760 int calID = inL->calID();
1761 if ( hasCalId )
1762 calID = hasCalId;
1753 local->deleteIncidence( inL ); 1763 local->deleteIncidence( inL );
1754 inL = inR->clone(); 1764 inL = inR->clone();
1755 inL->setCalID_block( calID ); 1765 inL->setCalID_block( calID );
@@ -1764,6 +1774,11 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1764 ++changedLocal; 1774 ++changedLocal;
1765 } 1775 }
1766 } 1776 }
1777 } else {
1778 // take == 0; events equal
1779 if ( hasCalId )
1780 qDebug("EV EQUALLLL **************************** ");
1781
1767 } 1782 }
1768 } else { // no conflict ********** add or delete remote 1783 } else { // no conflict ********** add or delete remote
1769 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ 1784 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){