Ouch. No idea how that crept in but calling KMFolderIndex::take instead of KMFolderMaildir is simply wrong.

BUGS:102171

svn path=/trunk/KDE/kdepim/; revision=417469
wilder-work
Carsten Burghardt 21 years ago
parent 52dcf2642c
commit 9baa20e7a7
  1. 3
      folderstorage.cpp
  2. 9
      kmfoldermaildir.cpp
  3. 2
      kmfoldermaildir.h

@ -453,8 +453,7 @@ void FolderStorage::take(QPtrList<KMMessage> msgList)
if (msg->parent())
{
int idx = msg->parent()->find(msg);
assert( idx != -1);
FolderStorage::take(idx);
take(idx);
}
}
}

@ -940,12 +940,15 @@ KMMessage* KMFolderMaildir::take(int idx)
// first, we do the high-level stuff.. then delete later
KMMessage *msg = KMFolderIndex::take(idx);
if (!msg || !msg->fileName()) return 0;
if (!msg || !msg->fileName()) {
return 0;
}
if (removeFile(msg->fileName()))
if ( removeFile(msg->fileName()) ) {
return msg;
else
} else {
return 0;
}
}
// static

@ -35,8 +35,6 @@ public:
/** Detach message from this folder. Usable to call addMsg() afterwards.
Loads the message if it is not loaded up to now. */
virtual KMMessage* take(int idx);
virtual void take(QPtrList<KMMessage> msgList)
{ return KMFolderIndex::take(msgList); }
/** Add the given message to the folder. Usually the message
is added at the end of the folder. Returns zero on success and

Loading…
Cancel
Save