rem: parentSerNum = kmkernel->msgDict()->getMsgSerNum( folder, parent_id ) + KMAIL_RESERVED;
add: parentSerNum = KMMsgDict::instance()->getMsgSerNum( folder, parent_id ) + KMAIL_RESERVED;
context: static void internalWriteItem(FILE *sortStream, KMFolder *folder, int msgid,                              int parent_id, QString key,                              bool update_discover=true){  unsigned long msgSerNum;  unsigned long parentSerNum;  msgSerNum = kmkernel->msgDict()->getMsgSerNum( folder, msgid );  if (parent_id >= 0)    parentSerNum = kmkernel->msgDict()->getMsgSerNum( folder, parent_id ) + KMAIL_RESERVED;  else    parentSerNum = (unsigned long)(parent_id + KMAIL_RESERVED);  fwrite(&msgSerNum, sizeof(msgSerNum), 1, sortStream);  fwrite(&parentSerNum, sizeof(parentSerNum), 1, sortStream);  Q_INT32 len = key.length() * sizeof(QChar);  fwrite(&len, sizeof(len), 1, sortStream);  if (len)    fwrite(key.unicode(), QMIN(len, KMAIL_MAX_KEY_LEN), 1, sortStream);  if (update_discover) {    //update the discovered change count      Q_INT32 discovered_count = 0;      fseek(sortStream, KMAIL_MAGIC_HEADER_OFFSET + 20, SEEK_SET);      fread(&discovered_count, sizeof(discovered_count), 1, sortStream);      discovered_count++;      fseek(sortStream, KMAIL_MAGIC_HEADER_OFFSET + 20, SEEK_SET);      fwrite(&discovered_count, sizeof(discovered_count), 1, sortStream);  }}