author | zautrix <zautrix> | 2005-11-25 22:51:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-25 22:51:38 (UTC) |
commit | 0e18027f386280bf427ef9d0ffec61a5516cebda (patch) (unidiff) | |
tree | 91f93d724d141b9f087e4cef0c1a11e354ee389a | |
parent | b71ee5442df23bb9900d3db6e6244773ee34ef13 (diff) | |
download | kdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.zip kdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.tar.gz kdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.tar.bz2 |
sync
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 2 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 6128137..538325e 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1900,25 +1900,25 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1900 | dt = inR->dtStart(); | 1900 | dt = inR->dtStart(); |
1901 | if ( dt < cur || dt > end ) { | 1901 | if ( dt < cur || dt > end ) { |
1902 | remote->deleteIncidence( inR ); | 1902 | remote->deleteIncidence( inR ); |
1903 | ++delFut; | 1903 | ++delFut; |
1904 | } | 1904 | } |
1905 | inR = er.next(); | 1905 | inR = er.next(); |
1906 | } | 1906 | } |
1907 | } | 1907 | } |
1908 | bar.hide(); | 1908 | bar.hide(); |
1909 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); | 1909 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); |
1910 | if ( mMultiResourceSync ) { | 1910 | if ( mMultiResourceSync ) { |
1911 | remote->removeSyncInfo( "" ); //all | 1911 | remote->removeSyncInfo( "" ); //all |
1912 | 1912 | qDebug("KO: Remoing all sync info on remote "); | |
1913 | } else { | 1913 | } else { |
1914 | eventLSync->setReadOnly( false ); | 1914 | eventLSync->setReadOnly( false ); |
1915 | eventLSync->setDtStart( mLastCalendarSync ); | 1915 | eventLSync->setDtStart( mLastCalendarSync ); |
1916 | eventRSync->setDtStart( mLastCalendarSync ); | 1916 | eventRSync->setDtStart( mLastCalendarSync ); |
1917 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1917 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1918 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1918 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1919 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; | 1919 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; |
1920 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); | 1920 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); |
1921 | eventLSync->setReadOnly( true ); | 1921 | eventLSync->setReadOnly( true ); |
1922 | } | 1922 | } |
1923 | qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); | 1923 | qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); |
1924 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop() && !mMultiResourceSync ) // kde is abnormal... | 1924 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop() && !mMultiResourceSync ) // kde is abnormal... |
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index c33581c..c82ea92 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -976,25 +976,25 @@ QPtrList<Journal> CalendarLocal::journals() | |||
976 | QPtrList<Journal> el; | 976 | QPtrList<Journal> el; |
977 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 977 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
978 | if ( it->calEnabled() ) el.append( it ); | 978 | if ( it->calEnabled() ) el.append( it ); |
979 | return el; | 979 | return el; |
980 | } | 980 | } |
981 | void CalendarLocal::setCalendarRemove( int id ) | 981 | void CalendarLocal::setCalendarRemove( int id ) |
982 | { | 982 | { |
983 | 983 | ||
984 | { | 984 | { |
985 | QPtrList<Event> EventList = mEventList; | 985 | QPtrList<Event> EventList = mEventList; |
986 | Event * ev = EventList.first(); | 986 | Event * ev = EventList.first(); |
987 | while ( ev ) { | 987 | while ( ev ) { |
988 | if ( ev->calID() == id ) | 988 | if ( ev->calID() == id && ev->uid().left( 15 ) != QString("last-syncEvent-") ) |
989 | deleteEvent( ev ); | 989 | deleteEvent( ev ); |
990 | ev = EventList.next(); | 990 | ev = EventList.next(); |
991 | } | 991 | } |
992 | } | 992 | } |
993 | { | 993 | { |
994 | 994 | ||
995 | QPtrList<Todo> TodoList = mTodoList; | 995 | QPtrList<Todo> TodoList = mTodoList; |
996 | Todo * ev = TodoList.first(); | 996 | Todo * ev = TodoList.first(); |
997 | while ( ev ) { | 997 | while ( ev ) { |
998 | if ( ev->calID() == id ) | 998 | if ( ev->calID() == id ) |
999 | deleteTodo( ev ); | 999 | deleteTodo( ev ); |
1000 | ev = TodoList.next(); | 1000 | ev = TodoList.next(); |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 8bf0d27..fa7804e 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -1266,25 +1266,25 @@ void KSyncManager::readFileFromSocket() | |||
1266 | KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) | 1266 | KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) |
1267 | { | 1267 | { |
1268 | mPendingConnect = 0; | 1268 | mPendingConnect = 0; |
1269 | mPassWord = pw; | 1269 | mPassWord = pw; |
1270 | mSocket = 0; | 1270 | mSocket = 0; |
1271 | mSyncActionDialog = 0; | 1271 | mSyncActionDialog = 0; |
1272 | blockRC = false; | 1272 | blockRC = false; |
1273 | mErrorMessage = 0; | 1273 | mErrorMessage = 0; |
1274 | } | 1274 | } |
1275 | void KServerSocket::waitForSocketFinish() | 1275 | void KServerSocket::waitForSocketFinish() |
1276 | { | 1276 | { |
1277 | if ( mSocket ) { | 1277 | if ( mSocket ) { |
1278 | qDebug("KSS:: waiting for finish operation"); | 1278 | //qDebug("KSS:: waiting for finish operation"); |
1279 | QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish())); | 1279 | QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish())); |
1280 | return; | 1280 | return; |
1281 | } | 1281 | } |
1282 | mSocket = new QSocket( this ); | 1282 | mSocket = new QSocket( this ); |
1283 | connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); | 1283 | connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); |
1284 | connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); | 1284 | connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); |
1285 | mSocket->setSocket( mPendingConnect ); | 1285 | mSocket->setSocket( mPendingConnect ); |
1286 | mPendingConnect = 0; | 1286 | mPendingConnect = 0; |
1287 | } | 1287 | } |
1288 | void KServerSocket::newConnection ( int socket ) | 1288 | void KServerSocket::newConnection ( int socket ) |
1289 | { | 1289 | { |
1290 | // qDebug("KServerSocket:New connection %d ", socket); | 1290 | // qDebug("KServerSocket:New connection %d ", socket); |
@@ -1579,49 +1579,49 @@ void KCommandSocket::sendFileRequest() | |||
1579 | mTimerSocket->start( 100, true ); | 1579 | mTimerSocket->start( 100, true ); |
1580 | QTextStream os( mSocket ); | 1580 | QTextStream os( mSocket ); |
1581 | os.setEncoding( QTextStream::Latin1 ); | 1581 | os.setEncoding( QTextStream::Latin1 ); |
1582 | 1582 | ||
1583 | QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); | 1583 | QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); |
1584 | os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n"; | 1584 | os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n"; |
1585 | } | 1585 | } |
1586 | 1586 | ||
1587 | void KCommandSocket::readFile( QString fn ) | 1587 | void KCommandSocket::readFile( QString fn ) |
1588 | { | 1588 | { |
1589 | if ( !mSocket ) { | 1589 | if ( !mSocket ) { |
1590 | mSocket = new QSocket( this ); | 1590 | mSocket = new QSocket( this ); |
1591 | qDebug("KCS: read file - new socket"); | 1591 | //qDebug("KCS: read file - new socket"); |
1592 | connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) ); | 1592 | connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) ); |
1593 | connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); | 1593 | connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); |
1594 | connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() )); | 1594 | connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() )); |
1595 | } | 1595 | } |
1596 | mFileString = ""; | 1596 | mFileString = ""; |
1597 | mFileName = fn; | 1597 | mFileName = fn; |
1598 | mFirst = true; | 1598 | mFirst = true; |
1599 | if ( tlw ) | 1599 | if ( tlw ) |
1600 | tlw->setCaption( i18n("Trying to connect to remote...") ); | 1600 | tlw->setCaption( i18n("Trying to connect to remote...") ); |
1601 | mConnectCount = 30;mConnectMax = 30; | 1601 | mConnectCount = 30;mConnectMax = 30; |
1602 | mTimerSocket->start( 1000, true ); | 1602 | mTimerSocket->start( 1000, true ); |
1603 | mSocket->connectToHost( mHost, mPort ); | 1603 | mSocket->connectToHost( mHost, mPort ); |
1604 | qDebug("KCS: Waiting for connection"); | 1604 | qDebug("KCS: Waiting for connection"); |
1605 | } | 1605 | } |
1606 | void KCommandSocket::updateConnectDialog() | 1606 | void KCommandSocket::updateConnectDialog() |
1607 | { | 1607 | { |
1608 | 1608 | ||
1609 | if ( mConnectCount == mConnectMax ) { | 1609 | if ( mConnectCount == mConnectMax ) { |
1610 | qDebug("MAXX %d", mConnectMax); | 1610 | //qDebug("MAXX %d", mConnectMax); |
1611 | mConnectProgress.setTotalSteps ( 30 ); | 1611 | mConnectProgress.setTotalSteps ( 30 ); |
1612 | mConnectProgress.show(); | 1612 | mConnectProgress.show(); |
1613 | mConnectProgress.setLabelText( i18n("Trying to connect to remote...") ); | 1613 | mConnectProgress.setLabelText( i18n("Trying to connect to remote...") ); |
1614 | } | 1614 | } |
1615 | qDebug("updateConnectDialog() %d", mConnectCount); | 1615 | //qDebug("updateConnectDialog() %d", mConnectCount); |
1616 | mConnectProgress.raise(); | 1616 | mConnectProgress.raise(); |
1617 | mConnectProgress.setProgress( (mConnectMax - mConnectCount)%30 ); | 1617 | mConnectProgress.setProgress( (mConnectMax - mConnectCount)%30 ); |
1618 | --mConnectCount; | 1618 | --mConnectCount; |
1619 | if ( mConnectCount > 0 ) | 1619 | if ( mConnectCount > 0 ) |
1620 | mTimerSocket->start( 1000, true ); | 1620 | mTimerSocket->start( 1000, true ); |
1621 | else | 1621 | else |
1622 | deleteSocket(); | 1622 | deleteSocket(); |
1623 | 1623 | ||
1624 | } | 1624 | } |
1625 | void KCommandSocket::writeFile( QString fileName ) | 1625 | void KCommandSocket::writeFile( QString fileName ) |
1626 | { | 1626 | { |
1627 | if ( !mSocket ) { | 1627 | if ( !mSocket ) { |