-rw-r--r-- | libkdepim/ksyncmanager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 0109c02..28c48fe 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -748,17 +748,16 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) | |||
748 | QString pwd = getPassword(); | 748 | QString pwd = getPassword(); |
749 | preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 ); | 749 | preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 ); |
750 | 750 | ||
751 | } | 751 | } |
752 | int maxlen = 30; | 752 | int maxlen = 30; |
753 | if ( QApplication::desktop()->width() > 320 ) | 753 | if ( QApplication::desktop()->width() > 320 ) |
754 | maxlen += 25; | 754 | maxlen += 25; |
755 | mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); | 755 | mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); |
756 | int fileSize = 0; | ||
757 | int result = system ( preCommand ); | 756 | int result = system ( preCommand ); |
758 | // 0 : okay | 757 | // 0 : okay |
759 | // 256: no such file or dir | 758 | // 256: no such file or dir |
760 | // | 759 | // |
761 | qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result ); | 760 | qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result ); |
762 | if ( result != 0 ) { | 761 | if ( result != 0 ) { |
763 | unsigned int len = maxlen; | 762 | unsigned int len = maxlen; |
764 | while ( len < preCommand.length() ) { | 763 | while ( len < preCommand.length() ) { |
@@ -919,17 +918,17 @@ void KSyncManager::confSync() | |||
919 | sp->showMaximized(); | 918 | sp->showMaximized(); |
920 | #else | 919 | #else |
921 | sp->show(); | 920 | sp->show(); |
922 | #endif | 921 | #endif |
923 | sp->exec(); | 922 | sp->exec(); |
924 | QStringList oldSyncProfileNames = mSyncProfileNames; | 923 | QStringList oldSyncProfileNames = mSyncProfileNames; |
925 | mSyncProfileNames = sp->getSyncProfileNames(); | 924 | mSyncProfileNames = sp->getSyncProfileNames(); |
926 | mLocalMachineName = sp->getLocalMachineName (); | 925 | mLocalMachineName = sp->getLocalMachineName (); |
927 | int ii; | 926 | uint ii; |
928 | for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) { | 927 | for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) { |
929 | if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) ) | 928 | if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) ) |
930 | mImplementation->removeSyncInfo( oldSyncProfileNames[ii] ); | 929 | mImplementation->removeSyncInfo( oldSyncProfileNames[ii] ); |
931 | } | 930 | } |
932 | QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); | 931 | QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); |
933 | } | 932 | } |
934 | void KSyncManager::syncKDE() | 933 | void KSyncManager::syncKDE() |
935 | { | 934 | { |
@@ -1136,25 +1135,25 @@ void KSyncManager::syncPi() | |||
1136 | if ( ! ok ) { | 1135 | if ( ! ok ) { |
1137 | mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); | 1136 | mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); |
1138 | mPisyncFinished = true; | 1137 | mPisyncFinished = true; |
1139 | return; | 1138 | return; |
1140 | } | 1139 | } |
1141 | mCurrentResourceLocal = ""; | 1140 | mCurrentResourceLocal = ""; |
1142 | mCurrentResourceRemote = ""; | 1141 | mCurrentResourceRemote = ""; |
1143 | if ( mSpecificResources.count() ) { | 1142 | if ( mSpecificResources.count() ) { |
1144 | int lastSyncRes = mSpecificResources.count()/2; | 1143 | uint lastSyncRes = mSpecificResources.count()/2; |
1145 | int ccc = mSpecificResources.count()-1; | 1144 | int ccc = mSpecificResources.count()-1; |
1146 | while ( lastSyncRes > 0 && ccc > 0 && mSpecificResources[ ccc ].isEmpty() ) { | 1145 | while ( lastSyncRes > 0 && ccc > 0 && mSpecificResources[ ccc ].isEmpty() ) { |
1147 | --ccc; | 1146 | --ccc; |
1148 | --lastSyncRes; | 1147 | --lastSyncRes; |
1149 | //qDebug ( "KSM: sync pi %d",ccc ); | 1148 | //qDebug ( "KSM: sync pi %d",ccc ); |
1150 | } | 1149 | } |
1151 | int startLocal = 0; | 1150 | uint startLocal = 0; |
1152 | int startRemote = mSpecificResources.count()/2; | 1151 | uint startRemote = mSpecificResources.count()/2; |
1153 | emit multiResourceSyncStart( true ); | 1152 | emit multiResourceSyncStart( true ); |
1154 | while ( startLocal < mSpecificResources.count()/2 ) { | 1153 | while ( startLocal < mSpecificResources.count()/2 ) { |
1155 | if ( startLocal+1 >= lastSyncRes ) | 1154 | if ( startLocal+1 >= lastSyncRes ) |
1156 | emit multiResourceSyncStart( false ); | 1155 | emit multiResourceSyncStart( false ); |
1157 | mPisyncFinished = false; | 1156 | mPisyncFinished = false; |
1158 | mCurrentResourceLocal = mSpecificResources[ startLocal ]; | 1157 | mCurrentResourceLocal = mSpecificResources[ startLocal ]; |
1159 | mCurrentResourceRemote = mSpecificResources[ startRemote ]; | 1158 | mCurrentResourceRemote = mSpecificResources[ startRemote ]; |
1160 | //qDebug ( "KSM: AAASyncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); | 1159 | //qDebug ( "KSM: AAASyncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); |