author | zautrix <zautrix> | 2005-11-25 18:35:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-25 18:35:16 (UTC) |
commit | 231e6f8215bbc4f7e301965f8f3c650e44586ec9 (patch) (side-by-side diff) | |
tree | 4c221ec7ac9909b5f0d192c68558739b4dcc1f48 | |
parent | 279e183c0325cd9565605f60af0215bb9bfdc825 (diff) | |
download | kdepimpi-231e6f8215bbc4f7e301965f8f3c650e44586ec9.zip kdepimpi-231e6f8215bbc4f7e301965f8f3c650e44586ec9.tar.gz kdepimpi-231e6f8215bbc4f7e301965f8f3c650e44586ec9.tar.bz2 |
sync
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 15 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 18 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 2 |
3 files changed, 24 insertions, 11 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 719d80b..61a9899 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -325,3 +325,3 @@ void KSyncManager::slotSyncMenu( int action ) if ( temp->getIsPiSyncSpec() ) - mSpecificResources = QStringList::split( ":", temp->getResSpecKopi() ); + mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true ); mPassWordPiSync = temp->getRemotePw(); @@ -667,3 +667,3 @@ int KSyncManager::ringSync() } else if ( mTargetApp == KOPI ) { - mSpecificResources = QStringList::split( ":", temp->getResSpecKopi() ); + mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true ); mPassWordPiSync = temp->getRemotePw(); @@ -1143,2 +1143,8 @@ void KSyncManager::syncPi() if ( mSpecificResources.count() ) { + int lastSyncRes = mSpecificResources.count()/2; + int ccc = mSpecificResources.count()-1; + while ( lastSyncRes > 0 && ccc > 0 && mSpecificResources[ ccc ].isEmpty() ) { + --ccc; + --lastSyncRes; + } int startLocal = 0; @@ -1147,3 +1153,3 @@ void KSyncManager::syncPi() while ( startLocal < mSpecificResources.count()/2 ) { - if ( startLocal+1 >= mSpecificResources.count()/2 ) + if ( startLocal+1 >= lastSyncRes ) emit multiResourceSyncStart( false ); @@ -1152,2 +1158,4 @@ void KSyncManager::syncPi() mCurrentResourceRemote = mSpecificResources[ startRemote ]; + if ( !mCurrentResourceRemote.isEmpty() ) { + qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote, mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); @@ -1159,2 +1167,3 @@ void KSyncManager::syncPi() } + } ++startLocal; diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 27f7932..744a914 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -593,10 +593,12 @@ void KSyncPrefsDialog::profileChanged( int item ) - QStringList res = QStringList::split( ":",prof->getResSpecKopi()); - int i= res.count()/2; - for ( ;i < res.count(); ++i ) { - mResTableKopi->setText( i, 0, res[i] ); - } - res = QStringList::split( ":",prof->getResSpecKapi()); - for ( i = 0;i < res.count(); ++i ) { - mResTableKapi->setText( i, 0, res[i] ); + QStringList res = QStringList::split( ":",prof->getResSpecKopi(), true ); + int add = res.count()/2; + int i; + for ( i = 0;i < add ; ++i ) { + mResTableKopi->setText( i, 0, res[i+add] ); + } + res = QStringList::split( ":",prof->getResSpecKapi(), true); + add = res.count()/2; + for ( i = 0;i < add; ++i ) { + mResTableKapi->setText( i, 0, res[i+add] ); } diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index d6620c8..b0d3efc 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp @@ -144,2 +144,4 @@ void KSyncProfile::setDefault() mFilterOutAB = "no filter"; + mResSpecKopi = ""; + mResSpecKapi = ""; } |