-rw-r--r-- | kaddressbook/mainembedded.cpp | 3 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 15 | ||||
-rw-r--r-- | libkcal/incidence.cpp | 2 |
3 files changed, 14 insertions, 6 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 547d208..771bec9 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -72,15 +72,14 @@ int main( int argc, char **argv ) | |||
72 | 72 | ||
73 | #endif | 73 | #endif |
74 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); | 74 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); |
75 | // init language | 75 | // init language |
76 | KABPrefs::instance(); | 76 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
77 | KAddressBookMain m ; | 77 | KAddressBookMain m ; |
78 | //US MainWindow m; | 78 | //US MainWindow m; |
79 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 79 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
80 | 80 | ||
81 | 81 | ||
82 | KPimGlobalPrefs::instance()->setGlobalConfig(); | ||
83 | 82 | ||
84 | #ifndef DESKTOP_VERSION | 83 | #ifndef DESKTOP_VERSION |
85 | a.showMainWidget( &m ); | 84 | a.showMainWidget( &m ); |
86 | 85 | ||
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 284ddbf..2ccccfa 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -959,9 +959,12 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
959 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); | 959 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); |
960 | fullDateRange = true; | 960 | fullDateRange = true; |
961 | } | 961 | } |
962 | } | 962 | } |
963 | if ( fullDateRange && !mSyncKDE ) | 963 | if ( mSyncKDE ) { |
964 | fullDateRange = ( eventLSync->dtStart() == mLastCalendarSync ); | ||
965 | } | ||
966 | if ( fullDateRange ) | ||
964 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); | 967 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); |
965 | else | 968 | else |
966 | mLastCalendarSync = eventLSync->dtStart(); | 969 | mLastCalendarSync = eventLSync->dtStart(); |
967 | // for resyncing if own file has changed | 970 | // for resyncing if own file has changed |
@@ -1048,15 +1051,18 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1048 | ++deletedEventR; | 1051 | ++deletedEventR; |
1049 | } else { | 1052 | } else { |
1050 | inR->setLastModified( modifiedCalendar ); | 1053 | inR->setLastModified( modifiedCalendar ); |
1051 | inL = inR->clone(); | 1054 | inL = inR->clone(); |
1055 | inL->setIDStr( ":" ); | ||
1052 | local->addIncidence( inL ); | 1056 | local->addIncidence( inL ); |
1053 | ++addedEvent; | 1057 | ++addedEvent; |
1054 | } | 1058 | } |
1055 | } else { | 1059 | } else { |
1056 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { | 1060 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { |
1057 | inR->setLastModified( modifiedCalendar ); | 1061 | inR->setLastModified( modifiedCalendar ); |
1058 | local->addIncidence( inR->clone() ); | 1062 | inL = inR->clone(); |
1063 | inL->setIDStr( ":" ); | ||
1064 | local->addIncidence( inL ); | ||
1059 | ++addedEvent; | 1065 | ++addedEvent; |
1060 | } else { | 1066 | } else { |
1061 | checkExternSyncEvent(eventRSyncSharp, inR); | 1067 | checkExternSyncEvent(eventRSyncSharp, inR); |
1062 | remote->deleteIncidence( inR ); | 1068 | remote->deleteIncidence( inR ); |
@@ -1103,8 +1109,9 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1103 | ++addedEventR; | 1109 | ++addedEventR; |
1104 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1110 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1105 | inL->setLastModified( modifiedCalendar ); | 1111 | inL->setLastModified( modifiedCalendar ); |
1106 | inR = inL->clone(); | 1112 | inR = inL->clone(); |
1113 | inR->setIDStr( ":" ); | ||
1107 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1114 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1108 | remote->addIncidence( inR ); | 1115 | remote->addIncidence( inR ); |
1109 | } | 1116 | } |
1110 | } | 1117 | } |
@@ -1116,9 +1123,11 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1116 | } else { | 1123 | } else { |
1117 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1124 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1118 | ++addedEventR; | 1125 | ++addedEventR; |
1119 | inL->setLastModified( modifiedCalendar ); | 1126 | inL->setLastModified( modifiedCalendar ); |
1120 | remote->addIncidence( inL->clone() ); | 1127 | inR = inL->clone(); |
1128 | inR->setIDStr( ":" ); | ||
1129 | remote->addIncidence( inR ); | ||
1121 | } | 1130 | } |
1122 | } | 1131 | } |
1123 | } | 1132 | } |
1124 | } | 1133 | } |
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 55ac6d4..5a9ef0e 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -180,9 +180,9 @@ void Incidence::recreate() | |||
180 | 180 | ||
181 | setUid(CalFormat::createUniqueId()); | 181 | setUid(CalFormat::createUniqueId()); |
182 | 182 | ||
183 | setRevision(0); | 183 | setRevision(0); |
184 | 184 | setIDStr( ":" ); | |
185 | setLastModified(QDateTime::currentDateTime()); | 185 | setLastModified(QDateTime::currentDateTime()); |
186 | } | 186 | } |
187 | 187 | ||
188 | void Incidence::setReadOnly( bool readOnly ) | 188 | void Incidence::setReadOnly( bool readOnly ) |