author | zautrix <zautrix> | 2005-07-09 12:00:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-09 12:00:17 (UTC) |
commit | fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5 (patch) (unidiff) | |
tree | b8d4b3cec0f447fb2930fe2ab9cd191bf7e015d0 | |
parent | 2e2d9a949b8273ad52b09ffdf2c9250acfdbe6db (diff) | |
download | kdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.zip kdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.tar.gz kdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.tar.bz2 |
fixx
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 6 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 34 |
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 | |||
@@ -1,69 +1,73 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.1.14 ************ | 3 | ********** VERSION 2.1.14 ************ |
4 | 4 | ||
5 | Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. | 5 | Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. |
6 | Added a button to add a subtodo quickly. | 6 | Added a button to add a subtodo quickly. |
7 | 7 | ||
8 | Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). | 8 | Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). |
9 | Added an option to change the layout of the list week to column mode. | 9 | Added an option to change the layout of the list week to column mode. |
10 | 10 | ||
11 | Fixed some usability problems in pi-sync mode by adding some progress information about file transfer. | 11 | Fixed some usability problems in pi-sync mode by adding some progress information about file transfer. |
12 | 12 | ||
13 | Fixed pi-sync problems with the new multi calendar feature. | 13 | Fixed pi-sync problems with the new multi calendar feature. |
14 | Now pi-sync behaviour should be: | 14 | Now pi-sync behaviour should be: |
15 | 1) Local sends file request ( as usual ) | 15 | 1) Local sends file request ( as usual ) |
16 | 2) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars. | 16 | 2) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars. |
17 | 3) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ). | 17 | 3) 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. | ||
18 | 4) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote. | 19 | 4) 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 | ||
21 | Summary: If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour. | 22 | Summary: |
23 | No 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. | ||
24 | If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour. | ||
25 | Well, 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 | ||
25 | Fixed a problem in KA/Pi search. | 29 | Fixed a problem in KA/Pi search. |
26 | Fixed some minor problems in KO/Pi. | 30 | Fixed some minor problems in KO/Pi. |
27 | Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. | 31 | Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. |
28 | 32 | ||
29 | Fixed memory usage problems in KA/Pi: | 33 | Fixed memory usage problems in KA/Pi: |
30 | When loading data KA/Pi did load the file data twice. | 34 | When loading data KA/Pi did load the file data twice. |
31 | Example: | 35 | Example: |
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. |
34 | When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. | 38 | When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. |
35 | This is fixed. | 39 | This is fixed. |
36 | Example: | 40 | Example: |
37 | Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. | 41 | Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. |
38 | When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. | 42 | When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. |
39 | Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. | 43 | Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. |
40 | Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. | 44 | Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. |
41 | The saving of data may be a bit slower now. | 45 | The saving of data may be a bit slower now. |
42 | 46 | ||
43 | Fixed memory usage problems in KO/Pi: | 47 | Fixed memory usage problems in KO/Pi: |
44 | When KO/Pi did save the data to file, it did not release the used buffers after saving. | 48 | When KO/Pi did save the data to file, it did not release the used buffers after saving. |
45 | The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. | 49 | The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. |
46 | This is fixed. | 50 | This is fixed. |
47 | Example: | 51 | Example: |
48 | When saving a 400k file KO/Pi do now use 400k less memory now. | 52 | When saving a 400k file KO/Pi do now use 400k less memory now. |
49 | 53 | ||
50 | Optimized memory usage in KO/Pi Agenda view: | 54 | Optimized memory usage in KO/Pi Agenda view: |
51 | KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. | 55 | KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. |
52 | These buffers were not made smaller (i.e. downsized) because of performance reasons. | 56 | These buffers were not made smaller (i.e. downsized) because of performance reasons. |
53 | The handling of these buffers are now much smarter: | 57 | The handling of these buffers are now much smarter: |
54 | Two (of six) buffers are removed completely. | 58 | Two (of six) buffers are removed completely. |
55 | The remaing four buffers are now downsized after not using the agenda view for 45 seconds. | 59 | The remaing four buffers are now downsized after not using the agenda view for 45 seconds. |
56 | Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi. | 60 | Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi. |
57 | 61 | ||
58 | Worst case example ( for a maximum size agenda content): | 62 | Worst case example ( for a maximum size agenda content): |
59 | When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem. | 63 | When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem. |
60 | 64 | ||
61 | When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower. | 65 | When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower. |
62 | 66 | ||
63 | Summary: | 67 | Summary: |
64 | Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus. | 68 | Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus. |
65 | 69 | ||
66 | ********** VERSION 2.1.12 ************ | 70 | ********** VERSION 2.1.12 ************ |
67 | 71 | ||
68 | KO/Pi: | 72 | KO/Pi: |
69 | Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. | 73 | Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index a350c3b..7044e90 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1396,205 +1396,207 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1396 | mLastCalendarSync = eventLSync->dtStart(); | 1396 | mLastCalendarSync = eventLSync->dtStart(); |
1397 | // for resyncing if own file has changed | 1397 | // for resyncing if own file has changed |
1398 | if ( mCurrentSyncDevice == "deleteaftersync" ) { | 1398 | if ( mCurrentSyncDevice == "deleteaftersync" ) { |
1399 | mLastCalendarSync = loadedFileVersion; | 1399 | mLastCalendarSync = loadedFileVersion; |
1400 | //qDebug("setting mLastCalendarSync "); | 1400 | //qDebug("setting mLastCalendarSync "); |
1401 | } | 1401 | } |
1402 | //qDebug("*************************** "); | 1402 | //qDebug("*************************** "); |
1403 | qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); | 1403 | qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); |
1404 | QPtrList<Incidence> er = remote->rawIncidences(); | 1404 | QPtrList<Incidence> er = remote->rawIncidences(); |
1405 | Incidence* inR = er.first(); | 1405 | Incidence* inR = er.first(); |
1406 | Incidence* inL; | 1406 | Incidence* inL; |
1407 | QProgressBar bar( er.count(),0 ); | 1407 | QProgressBar bar( er.count(),0 ); |
1408 | bar.setCaption (i18n("Syncing - close to abort!") ); | 1408 | bar.setCaption (i18n("Syncing - close to abort!") ); |
1409 | 1409 | ||
1410 | // ************** setting up filter ************* | 1410 | // ************** setting up filter ************* |
1411 | CalFilter *filterIN = 0; | 1411 | CalFilter *filterIN = 0; |
1412 | CalFilter *filterOUT = 0; | 1412 | CalFilter *filterOUT = 0; |
1413 | CalFilter *filter = mFilters.first(); | 1413 | CalFilter *filter = mFilters.first(); |
1414 | while(filter) { | 1414 | while(filter) { |
1415 | if ( filter->name() == mSyncManager->mFilterInCal ) | 1415 | if ( filter->name() == mSyncManager->mFilterInCal ) |
1416 | filterIN = filter; | 1416 | filterIN = filter; |
1417 | if ( filter->name() == mSyncManager->mFilterOutCal ) | 1417 | if ( filter->name() == mSyncManager->mFilterOutCal ) |
1418 | filterOUT = filter; | 1418 | filterOUT = filter; |
1419 | filter = mFilters.next(); | 1419 | filter = mFilters.next(); |
1420 | } | 1420 | } |
1421 | int w = 300; | 1421 | int w = 300; |
1422 | if ( QApplication::desktop()->width() < 320 ) | 1422 | if ( QApplication::desktop()->width() < 320 ) |
1423 | w = 220; | 1423 | w = 220; |
1424 | int h = bar.sizeHint().height() ; | 1424 | int h = bar.sizeHint().height() ; |
1425 | int dw = QApplication::desktop()->width(); | 1425 | int dw = QApplication::desktop()->width(); |
1426 | int dh = QApplication::desktop()->height(); | 1426 | int dh = QApplication::desktop()->height(); |
1427 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1427 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1428 | bar.show(); | 1428 | bar.show(); |
1429 | int modulo = (er.count()/10)+1; | 1429 | int modulo = (er.count()/10)+1; |
1430 | int incCounter = 0; | 1430 | int incCounter = 0; |
1431 | while ( inR ) { | 1431 | while ( inR ) { |
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 ); |
1494 | ++deletedEventR; | 1496 | ++deletedEventR; |
1495 | } else { | 1497 | } else { |
1496 | inR->setLastModified( modifiedCalendar ); | 1498 | inR->setLastModified( modifiedCalendar ); |
1497 | inL = inR->clone(); | 1499 | inL = inR->clone(); |
1498 | inL->setIDStr( ":" ); | 1500 | inL->setIDStr( ":" ); |
1499 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1501 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1500 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1502 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1501 | 1503 | ||
1502 | inL->setCalID( 0 );// add to default cal | 1504 | inL->setCalID( 0 );// add to default cal |
1503 | local->addIncidence( inL ); | 1505 | local->addIncidence( inL ); |
1504 | ++addedEvent; | 1506 | ++addedEvent; |
1505 | 1507 | ||
1506 | } | 1508 | } |
1507 | } else { | 1509 | } else { |
1508 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { | 1510 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { |
1509 | inR->setLastModified( modifiedCalendar ); | 1511 | inR->setLastModified( modifiedCalendar ); |
1510 | inL = inR->clone(); | 1512 | inL = inR->clone(); |
1511 | inL->setIDStr( ":" ); | 1513 | inL->setIDStr( ":" ); |
1512 | inL->setCalID( 0 );// add to default cal | 1514 | inL->setCalID( 0 );// add to default cal |
1513 | local->addIncidence( inL ); | 1515 | local->addIncidence( inL ); |
1514 | ++addedEvent; | 1516 | ++addedEvent; |
1515 | 1517 | ||
1516 | } else { | 1518 | } else { |
1517 | checkExternSyncEvent(eventRSyncSharp, inR); | 1519 | checkExternSyncEvent(eventRSyncSharp, inR); |
1518 | remote->deleteIncidence( inR ); | 1520 | remote->deleteIncidence( inR ); |
1519 | ++deletedEventR; | 1521 | ++deletedEventR; |
1520 | } | 1522 | } |
1521 | } | 1523 | } |
1522 | } else { | 1524 | } else { |
1523 | ++filteredIN; | 1525 | ++filteredIN; |
1524 | } | 1526 | } |
1525 | } | 1527 | } |
1526 | } | 1528 | } |
1527 | inR = er.next(); | 1529 | inR = er.next(); |
1528 | } | 1530 | } |
1529 | QPtrList<Incidence> el = local->rawIncidences(); | 1531 | QPtrList<Incidence> el = local->rawIncidences(); |
1530 | inL = el.first(); | 1532 | inL = el.first(); |
1531 | modulo = (el.count()/10)+1; | 1533 | modulo = (el.count()/10)+1; |
1532 | bar.setCaption (i18n("Add / remove events") ); | 1534 | bar.setCaption (i18n("Add / remove events") ); |
1533 | bar.setTotalSteps ( el.count() ) ; | 1535 | bar.setTotalSteps ( el.count() ) ; |
1534 | bar.show(); | 1536 | bar.show(); |
1535 | incCounter = 0; | 1537 | incCounter = 0; |
1536 | 1538 | ||
1537 | while ( inL ) { | 1539 | while ( inL ) { |
1538 | 1540 | ||
1539 | qApp->processEvents(); | 1541 | qApp->processEvents(); |
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; |
1565 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1567 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1566 | inL->setLastModified( modifiedCalendar ); | 1568 | inL->setLastModified( modifiedCalendar ); |
1567 | inR = inL->clone(); | 1569 | inR = inL->clone(); |
1568 | inR->setIDStr( ":" ); | 1570 | inR->setIDStr( ":" ); |
1569 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1571 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1570 | inR->setCalID( 0 );// add to default cal | 1572 | inR->setCalID( 0 );// add to default cal |
1571 | remote->addIncidence( inR ); | 1573 | remote->addIncidence( inR ); |
1572 | } | 1574 | } |
1573 | } | 1575 | } |
1574 | } else { | 1576 | } else { |
1575 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { | 1577 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { |
1576 | checkExternSyncEvent(eventLSyncSharp, inL); | 1578 | checkExternSyncEvent(eventLSyncSharp, inL); |
1577 | local->deleteIncidence( inL ); | 1579 | local->deleteIncidence( inL ); |
1578 | ++deletedEventL; | 1580 | ++deletedEventL; |
1579 | } else { | 1581 | } else { |
1580 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1582 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1581 | ++addedEventR; | 1583 | ++addedEventR; |
1582 | inL->setLastModified( modifiedCalendar ); | 1584 | inL->setLastModified( modifiedCalendar ); |
1583 | inR = inL->clone(); | 1585 | inR = inL->clone(); |
1584 | inR->setIDStr( ":" ); | 1586 | inR->setIDStr( ":" ); |
1585 | inR->setCalID( 0 );// add to default cal | 1587 | inR->setCalID( 0 );// add to default cal |
1586 | remote->addIncidence( inR ); | 1588 | remote->addIncidence( inR ); |
1587 | } | 1589 | } |
1588 | } | 1590 | } |
1589 | } | 1591 | } |
1590 | } else { | 1592 | } else { |
1591 | ++filteredOUT; | 1593 | ++filteredOUT; |
1592 | } | 1594 | } |
1593 | } | 1595 | } |
1594 | } | 1596 | } |
1595 | inL = el.next(); | 1597 | inL = el.next(); |
1596 | } | 1598 | } |
1597 | int delFut = 0; | 1599 | int delFut = 0; |
1598 | int remRem = 0; | 1600 | int remRem = 0; |
1599 | if ( mSyncManager->mWriteBackInFuture ) { | 1601 | if ( mSyncManager->mWriteBackInFuture ) { |
1600 | er = remote->rawIncidences(); | 1602 | er = remote->rawIncidences(); |