-rw-r--r-- | libkdepim/ksyncmanager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index f2ee0ab..2a75bfb 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -1568,7 +1568,13 @@ void KCommandSocket::writeFileToSocket() os2 << "PUT " << mPassWord << "\r\n\r\n";; + int byteCount = 0; + int byteMax = file2.size()/53; while ( ! ts2.atEnd() ) { qApp->processEvents(); + if ( byteCount > byteMax ) { + byteCount = 0; mConnectProgress.setProgress( count ); + } QString temp = ts2.readLine(); count += temp.length(); + byteCount += temp.length(); os2 << temp << "\r\n"; |