-rw-r--r-- | libkdepim/ksyncmanager.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index f2ee0ab..2a75bfb 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -1566,11 +1566,17 @@ void KCommandSocket::writeFileToSocket() | |||
1566 | QTextStream os2( mSocket ); | 1566 | QTextStream os2( mSocket ); |
1567 | os2.setEncoding( QTextStream::Latin1 ); | 1567 | os2.setEncoding( QTextStream::Latin1 ); |
1568 | os2 << "PUT " << mPassWord << "\r\n\r\n";; | 1568 | os2 << "PUT " << mPassWord << "\r\n\r\n";; |
1569 | int byteCount = 0; | ||
1570 | int byteMax = file2.size()/53; | ||
1569 | while ( ! ts2.atEnd() ) { | 1571 | while ( ! ts2.atEnd() ) { |
1570 | qApp->processEvents(); | 1572 | qApp->processEvents(); |
1571 | mConnectProgress.setProgress( count ); | 1573 | if ( byteCount > byteMax ) { |
1574 | byteCount = 0; | ||
1575 | mConnectProgress.setProgress( count ); | ||
1576 | } | ||
1572 | QString temp = ts2.readLine(); | 1577 | QString temp = ts2.readLine(); |
1573 | count += temp.length(); | 1578 | count += temp.length(); |
1579 | byteCount += temp.length(); | ||
1574 | os2 << temp << "\r\n"; | 1580 | os2 << temp << "\r\n"; |
1575 | } | 1581 | } |
1576 | file2.close(); | 1582 | file2.close(); |