summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-09 12:00:17 (UTC)
committer zautrix <zautrix>2005-07-09 12:00:17 (UTC)
commitfa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5 (patch) (unidiff)
treeb8d4b3cec0f447fb2930fe2ab9cd191bf7e015d0
parent2e2d9a949b8273ad52b09ffdf2c9250acfdbe6db (diff)
downloadkdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.zip
kdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.tar.gz
kdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.tar.bz2
fixx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt6
-rw-r--r--korganizer/calendarview.cpp34
2 files changed, 23 insertions, 17 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 8fab725..2ce78c7 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -6,28 +6,32 @@ Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly a
6Added a button to add a subtodo quickly. 6Added a button to add a subtodo quickly.
7 7
8Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). 8Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ).
9Added an option to change the layout of the list week to column mode. 9Added an option to change the layout of the list week to column mode.
10 10
11Fixed some usability problems in pi-sync mode by adding some progress information about file transfer. 11Fixed some usability problems in pi-sync mode by adding some progress information about file transfer.
12 12
13Fixed pi-sync problems with the new multi calendar feature. 13Fixed pi-sync problems with the new multi calendar feature.
14Now pi-sync behaviour should be: 14Now pi-sync behaviour should be:
151) Local sends file request ( as usual ) 151) Local sends file request ( as usual )
162) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars. 162) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars.
173) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ). 173) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ).
18 If the data which local receives contains entries which are on disabled calendars on local this entries are updated and not added as duplicates to the default calendar.
184) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote. 194) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote.
19 If the data which remote receives contains entries which are on disabled calendars on remote this entries are updated and not added as duplicates to the default calendar. 20 If the data which remote receives contains entries which are on disabled calendars on remote this entries are updated and not added as duplicates to the default calendar.
20 21
21Summary: If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour. 22Summary:
23No new item ( new created after the last sync ) in a disabled calendar is propagated to the sync partner. Readonly items are synced and added/changed on the sync partner if it is not readonly on the sync partner.
24If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour.
25Well, the syncing has become quite complicated ... you should have no problems if you enable all calendars.
22 26
23********** VERSION 2.1.13 ************ 27********** VERSION 2.1.13 ************
24 28
25Fixed a problem in KA/Pi search. 29Fixed a problem in KA/Pi search.
26Fixed some minor problems in KO/Pi. 30Fixed some minor problems in KO/Pi.
27Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. 31Added calendar selection possibility to the todo view popup and to the event/todo/journal editor.
28 32
29Fixed memory usage problems in KA/Pi: 33Fixed memory usage problems in KA/Pi:
30When loading data KA/Pi did load the file data twice. 34When loading data KA/Pi did load the file data twice.
31Example: 35Example:
32 A 600k file did consume 1200k memory during loading process. 36 A 600k file did consume 1200k memory during loading process.
33 This is fixed, it does now consume only 600k during loading process. 37 This is fixed, it does now consume only 600k during loading process.
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index a350c3b..7044e90 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1432,62 +1432,64 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1432 if ( ! bar.isVisible() ) 1432 if ( ! bar.isVisible() )
1433 return false; 1433 return false;
1434 if ( incCounter % modulo == 0 ) 1434 if ( incCounter % modulo == 0 )
1435 bar.setProgress( incCounter ); 1435 bar.setProgress( incCounter );
1436 ++incCounter; 1436 ++incCounter;
1437 uid = inR->uid(); 1437 uid = inR->uid();
1438 bool skipIncidence = false; 1438 bool skipIncidence = false;
1439 if ( uid.left(15) == QString("last-syncEvent-") ) 1439 if ( uid.left(15) == QString("last-syncEvent-") )
1440 skipIncidence = true; 1440 skipIncidence = true;
1441 QString idS; 1441 QString idS;
1442 qApp->processEvents(); 1442 qApp->processEvents();
1443 if ( !skipIncidence ) { 1443 if ( !skipIncidence ) {
1444 inL = local->incidence( uid ); 1444 inL = local->incidenceForUid( uid , false );
1445 if ( inL ) { // maybe conflict - same uid in both calendars 1445 if ( inL ) { // maybe conflict - same uid in both calendars
1446 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { 1446 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
1447 //qDebug("take %d %s ", take, inL->summary().latin1()); 1447 //qDebug("take %d %s ", take, inL->summary().latin1());
1448 if ( take == 3 ) 1448 if ( take == 3 )
1449 return false; 1449 return false;
1450 if ( take == 1 ) {// take local ********************** 1450 if ( take == 1 ) {// take local **********************
1451 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 1451 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
1452 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1452 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1453 else 1453 else
1454 idS = inR->IDStr(); 1454 idS = inR->IDStr();
1455 int calID = inR->calID(); 1455 int calID = inR->calID();
1456 remote->deleteIncidence( inR ); 1456 remote->deleteIncidence( inR );
1457 inR = inL->clone(); 1457 inR = inL->clone();
1458 inR->setCalID( calID ); 1458 inR->setCalID( calID );
1459 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1459 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1460 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) 1460 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL )
1461 inR->setIDStr( idS ); 1461 inR->setIDStr( idS );
1462 remote->addIncidence( inR ); 1462 remote->addIncidence( inR );
1463 if ( mSyncManager->syncWithDesktop() ) 1463 if ( mSyncManager->syncWithDesktop() )
1464 inR->setPilotId( 2 ); 1464 inR->setPilotId( 2 );
1465 ++changedRemote; 1465 ++changedRemote;
1466 } else {// take remote ********************** 1466 } else {// take remote **********************
1467 idS = inL->IDStr(); 1467 if ( !inL->isReadOnly() ) {
1468 int pid = inL->pilotId(); 1468 idS = inL->IDStr();
1469 int calID = inL->calID(); 1469 int pid = inL->pilotId();
1470 local->deleteIncidence( inL ); 1470 int calID = inL->calID();
1471 inL = inR->clone(); 1471 local->deleteIncidence( inL );
1472 inL->setCalID( calID ); 1472 inL = inR->clone();
1473 if ( mSyncManager->syncWithDesktop() ) 1473 inL->setCalID( calID );
1474 inL->setPilotId( pid ); 1474 if ( mSyncManager->syncWithDesktop() )
1475 inL->setIDStr( idS ); 1475 inL->setPilotId( pid );
1476 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1476 inL->setIDStr( idS );
1477 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1477 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1478 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1478 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1479 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1480 }
1481 local->addIncidence( inL );
1482 ++changedLocal;
1479 } 1483 }
1480 local->addIncidence( inL );
1481 ++changedLocal;
1482 } 1484 }
1483 } 1485 }
1484 } else { // no conflict ********** add or delete remote 1486 } else { // no conflict ********** add or delete remote
1485 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ 1487 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
1486 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1488 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1487 QString des = eventLSync->description(); 1489 QString des = eventLSync->description();
1488 QString pref = "e"; 1490 QString pref = "e";
1489 if ( inR->typeID() == todoID ) 1491 if ( inR->typeID() == todoID )
1490 pref = "t"; 1492 pref = "t";
1491 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 1493 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
1492 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 1494 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
1493 //remote->deleteIncidence( inR ); 1495 //remote->deleteIncidence( inR );
@@ -1540,25 +1542,25 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1540 if ( ! bar.isVisible() ) 1542 if ( ! bar.isVisible() )
1541 return false; 1543 return false;
1542 if ( incCounter % modulo == 0 ) 1544 if ( incCounter % modulo == 0 )
1543 bar.setProgress( incCounter ); 1545 bar.setProgress( incCounter );
1544 ++incCounter; 1546 ++incCounter;
1545 uid = inL->uid(); 1547 uid = inL->uid();
1546 bool skipIncidence = false; 1548 bool skipIncidence = false;
1547 if ( uid.left(15) == QString("last-syncEvent-") ) 1549 if ( uid.left(15) == QString("last-syncEvent-") )
1548 skipIncidence = true; 1550 skipIncidence = true;
1549 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) 1551 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID )
1550 skipIncidence = true; 1552 skipIncidence = true;
1551 if ( !skipIncidence ) { 1553 if ( !skipIncidence ) {
1552 inR = remote->incidence( uid ); 1554 inR = remote->incidenceForUid( uid , true );
1553 if ( ! inR ) { 1555 if ( ! inR ) {
1554 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ 1556 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
1555 // no conflict ********** add or delete local 1557 // no conflict ********** add or delete local
1556 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1558 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1557 if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 1559 if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
1558 checkExternSyncEvent(eventLSyncSharp, inL); 1560 checkExternSyncEvent(eventLSyncSharp, inL);
1559 local->deleteIncidence( inL ); 1561 local->deleteIncidence( inL );
1560 ++deletedEventL; 1562 ++deletedEventL;
1561 } else { 1563 } else {
1562 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1564 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1563 inL->removeID(mCurrentSyncDevice ); 1565 inL->removeID(mCurrentSyncDevice );
1564 ++addedEventR; 1566 ++addedEventR;