Show an accurate progress dialog at least when 1 message is uploaded.

For several messages the progress shows only the overall status but this can only
be changed in the progressmanager api which is probably a past-3.4 task.
CCMAIL: 97920@bugs.kde.org

svn path=/trunk/kdepim/; revision=391417
wilder-work
Carsten Burghardt 21 years ago
parent a3cf3ebcf8
commit fc085d94b5
  1. 5
      imapjob.cpp
  2. 6
      kmfolderimap.cpp

@ -126,7 +126,8 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder,
url.setPath( folder->imapPath() + ";SECTION=" + flags );
ImapAccountBase::jobData jd;
jd.parent = 0; jd.offset = 0; jd.done = 0;
jd.total = curMsg->msgSizeServer();
jd.total = ( curMsg->msgSizeServer() > 0 ) ?
curMsg->msgSizeServer() : curMsg->msgSize();
jd.msgList.append( curMsg );
QCString cstr( curMsg->asString() );
int a = cstr.find("\nX-UID: ");
@ -150,7 +151,7 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder,
mParentProgressItem,
"ImapJobUploading"+ProgressManager::getUniqueID(),
i18n("Uploading message data"),
i18n("Destination folder: ") + mDestFolder->prettyURL(),
curMsg->subject(),
true,
account->useSSL() || account->useTLS() );
jd.progressItem->setTotalItems( jd.total );

@ -437,10 +437,12 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
msg->setTransferInProgress( true );
}
imapJob = new ImapJob( msgList, QString::null, ImapJob::tPutMessage, this );
if ( !mAddMessageProgressItem )
if ( !mAddMessageProgressItem && msgList.count() > 1 )
{
// use a parent progress if we have more than 1 message
// otherwise the normal progress is more accurate
mAddMessageProgressItem = ProgressManager::createProgressItem(
"ImapJobUploading"+ProgressManager::getUniqueID(),
"Uploading"+ProgressManager::getUniqueID(),
i18n("Uploading message data"),
i18n("Destination folder: ") + folder()->prettyURL(),
true,

Loading…
Cancel
Save