-rw-r--r-- | korganizer/koprefs.cpp | 8 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 13 |
2 files changed, 18 insertions, 3 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 31ef338..9147af3 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -537,4 +537,12 @@ int KOPrefs::getFuzzyCalendarID( const QString & name ) | |||
537 | kkf = mCalendars.next(); | 537 | kkf = mCalendars.next(); |
538 | } | 538 | } |
539 | QString name2 = name; | ||
540 | name2.replace (QRegExp ("_")," " ); | ||
541 | kkf = mCalendars.first(); | ||
542 | while ( kkf ) { | ||
543 | if ( name2.lower() == kkf->mName.lower()) | ||
544 | return kkf->mCalNumber; | ||
545 | kkf = mCalendars.next(); | ||
546 | } | ||
539 | return 0; | 547 | return 0; |
540 | } | 548 | } |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 61a9899..795cd30 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -1141,4 +1141,5 @@ void KSyncManager::syncPi() | |||
1141 | mCurrentResourceLocal = ""; | 1141 | mCurrentResourceLocal = ""; |
1142 | mCurrentResourceRemote = ""; | 1142 | mCurrentResourceRemote = ""; |
1143 | qDebug ( "KSM: sync pi %d",mSpecificResources.count() ); | ||
1143 | if ( mSpecificResources.count() ) { | 1144 | if ( mSpecificResources.count() ) { |
1144 | int lastSyncRes = mSpecificResources.count()/2; | 1145 | int lastSyncRes = mSpecificResources.count()/2; |
@@ -1147,4 +1148,5 @@ void KSyncManager::syncPi() | |||
1147 | --ccc; | 1148 | --ccc; |
1148 | --lastSyncRes; | 1149 | --lastSyncRes; |
1150 | qDebug ( "KSM: sync pi %d",ccc ); | ||
1149 | } | 1151 | } |
1150 | int startLocal = 0; | 1152 | int startLocal = 0; |
@@ -1156,5 +1158,6 @@ void KSyncManager::syncPi() | |||
1156 | mPisyncFinished = false; | 1158 | mPisyncFinished = false; |
1157 | mCurrentResourceLocal = mSpecificResources[ startLocal ]; | 1159 | mCurrentResourceLocal = mSpecificResources[ startLocal ]; |
1158 | mCurrentResourceRemote = mSpecificResources[ startRemote ]; | 1160 | mCurrentResourceRemote = mSpecificResources[ startRemote ]; |
1161 | qDebug ( "KSM: AAASyncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); | ||
1159 | if ( !mCurrentResourceRemote.isEmpty() ) { | 1162 | if ( !mCurrentResourceRemote.isEmpty() ) { |
1160 | qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); | 1163 | qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); |
@@ -1167,6 +1170,8 @@ void KSyncManager::syncPi() | |||
1167 | } | 1170 | } |
1168 | } | 1171 | } |
1172 | ++startRemote; | ||
1169 | ++startLocal; | 1173 | ++startLocal; |
1170 | } | 1174 | } |
1175 | mPisyncFinished = true; | ||
1171 | } else { | 1176 | } else { |
1172 | KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); | 1177 | KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); |
@@ -1517,4 +1522,6 @@ KCommandSocket::KCommandSocket ( QString remres, QString password, Q_UINT16 port | |||
1517 | if ( mRemoteResource.isEmpty() ) | 1522 | if ( mRemoteResource.isEmpty() ) |
1518 | mRemoteResource = "ALL"; | 1523 | mRemoteResource = "ALL"; |
1524 | else | ||
1525 | mRemoteResource.replace (QRegExp (" "),"_" ); | ||
1519 | mPassWord = password; | 1526 | mPassWord = password; |
1520 | mSocket = 0; | 1527 | mSocket = 0; |
@@ -1543,5 +1550,5 @@ void KCommandSocket::sendFileRequest() | |||
1543 | 1550 | ||
1544 | QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); | 1551 | QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); |
1545 | os << "GET " << mPassWord << curDt << mRemoteResource << "\r\n\r\n"; | 1552 | os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n"; |
1546 | } | 1553 | } |
1547 | 1554 | ||
@@ -1618,5 +1625,5 @@ void KCommandSocket::writeFileToSocket() | |||
1618 | QTextStream os2( mSocket ); | 1625 | QTextStream os2( mSocket ); |
1619 | os2.setEncoding( QTextStream::Latin1 ); | 1626 | os2.setEncoding( QTextStream::Latin1 ); |
1620 | os2 << "PUT " << mPassWord << mRemoteResource << "\r\n\r\n";; | 1627 | os2 << "PUT " << mPassWord << " " << mRemoteResource << "\r\n\r\n";; |
1621 | int byteCount = 0; | 1628 | int byteCount = 0; |
1622 | int byteMax = file2.size()/53; | 1629 | int byteMax = file2.size()/53; |