Fix attachment issues.

BUGS:102766
BUGS:102663

svn path=/trunk/kdepim/; revision=402260
wilder-work
Carsten Burghardt 21 years ago
parent 0c97c41045
commit df660a6456
  1. 11
      folderstorage.cpp
  2. 5
      kmfoldermaildir.cpp
  3. 4
      kmfoldermbox.cpp

@ -433,10 +433,10 @@ KMMessage* FolderStorage::getMsg(int idx)
msg = readMsg(idx);
// sanity check
if (mCompactable && (!msg || (msg->subject().isEmpty() != mbSubject.isEmpty()))) {
kdDebug(5006) << "Error: " << location() <<
" Index file is inconsistent with folder file. This should never happen." << endl;
mCompactable = FALSE; // Don't compact
writeConfig();
kdDebug(5006) << "Error: " << location() <<
" Index file is inconsistent with folder file. This should never happen." << endl;
mCompactable = FALSE; // Don't compact
writeConfig();
}
}
@ -470,14 +470,15 @@ KMMessage* FolderStorage::readTemporaryMsg(int idx)
// the caller will delete it, so we must make a copy it
msg = new KMMessage(*(KMMessage*)mb);
msg->setMsgSerNum(sernum);
msg->setComplete( true );
} else {
// ## Those two lines need to be moved to a virtual method for KMFolderSearch, like readMsg
msg = new KMMessage(*(KMMsgInfo*)mb);
msg->setMsgSerNum(sernum); // before fromDwString so that readyToShow uses the right sernum
msg->setComplete( true );
msg->fromDwString(getDwString(idx));
}
msg->setEnableUndo(undo);
msg->setComplete( true );
return msg;
}

@ -469,6 +469,10 @@ if( fileD0.open( IO_WriteOnly ) ) {
}
++mTotalMsgs;
if ( aMsg->attachmentState() == KMMsgAttachmentUnknown &&
aMsg->readyToShow() )
aMsg->updateAttachmentState();
// store information about the position in the folder file in the message
aMsg->setParent(folder());
aMsg->setMsgSize(size);
@ -545,6 +549,7 @@ KMMessage* KMFolderMaildir::readMsg(int idx)
KMMsgInfo* mi = (KMMsgInfo*)mMsgList[idx];
KMMessage *msg = new KMMessage(*mi); // note that mi is deleted by the line below
mMsgList.set(idx,&msg->toMsgBase()); // done now so that the serial number can be computed
msg->setComplete( true );
msg->fromDwString(getDwString(idx));
return msg;
}

@ -1078,6 +1078,10 @@ if( fileD1.open( IO_WriteOnly ) ) {
}
++mTotalMsgs;
if ( aMsg->attachmentState() == KMMsgAttachmentUnknown &&
aMsg->readyToShow() )
aMsg->updateAttachmentState();
// store information about the position in the folder file in the message
aMsg->setParent(folder());
aMsg->setFolderOffset(offs);

Loading…
Cancel
Save