-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 @@ -68,23 +68,22 @@ int main( int argc, char **argv ) QString fileName ; fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); QApplication::addLibraryPath ( qApp->applicationDirPath () ); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); // init language - KABPrefs::instance(); + KPimGlobalPrefs::instance()->setGlobalConfig(); KAddressBookMain m ; //US MainWindow m; QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); - KPimGlobalPrefs::instance()->setGlobalConfig(); #ifndef DESKTOP_VERSION a.showMainWidget( &m ); #else a.setMainWidget( &m ); m.resize (640, 480 ); m.show(); diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 284ddbf..2ccccfa 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -955,17 +955,20 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int if ( ! fullDateRange ) { if ( eventLSync->dtStart() != eventRSync->dtStart() ) { // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); fullDateRange = true; } } - if ( fullDateRange && !mSyncKDE ) + if ( mSyncKDE ) { + fullDateRange = ( eventLSync->dtStart() == mLastCalendarSync ); + } + if ( fullDateRange ) mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); else mLastCalendarSync = eventLSync->dtStart(); // for resyncing if own file has changed if ( mCurrentSyncDevice == "deleteaftersync" ) { mLastCalendarSync = loadedFileVersion; //qDebug("setting mLastCalendarSync "); } @@ -1044,23 +1047,26 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int pref = "t"; if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); //remote->deleteIncidence( inR ); ++deletedEventR; } else { inR->setLastModified( modifiedCalendar ); inL = inR->clone(); + inL->setIDStr( ":" ); local->addIncidence( inL ); ++addedEvent; } } else { if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { inR->setLastModified( modifiedCalendar ); - local->addIncidence( inR->clone() ); + inL = inR->clone(); + inL->setIDStr( ":" ); + local->addIncidence( inL ); ++addedEvent; } else { checkExternSyncEvent(eventRSyncSharp, inR); remote->deleteIncidence( inR ); ++deletedEventR; } } } @@ -1099,30 +1105,33 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int ++deletedEventL; } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { inL->removeID(mCurrentSyncDevice ); ++addedEventR; //qDebug("remote added Incidence %s ", inL->summary().latin1()); inL->setLastModified( modifiedCalendar ); inR = inL->clone(); + inR->setIDStr( ":" ); inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); remote->addIncidence( inR ); } } } else { if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { checkExternSyncEvent(eventLSyncSharp, inL); local->deleteIncidence( inL ); ++deletedEventL; } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { ++addedEventR; inL->setLastModified( modifiedCalendar ); - remote->addIncidence( inL->clone() ); + inR = inL->clone(); + inR->setIDStr( ":" ); + remote->addIncidence( inR ); } } } } } inL = el.next(); } int delFut = 0; diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 55ac6d4..5a9ef0e 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -176,17 +176,17 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) void Incidence::recreate() { setCreated(QDateTime::currentDateTime()); setUid(CalFormat::createUniqueId()); setRevision(0); - + setIDStr( ":" ); setLastModified(QDateTime::currentDateTime()); } void Incidence::setReadOnly( bool readOnly ) { IncidenceBase::setReadOnly( readOnly ); recurrence()->setRecurReadOnly( readOnly); } |