--- a/emailuis/nmailui/src/nmattachmentlist.cpp Fri Jun 11 16:42:02 2010 +0300
+++ b/emailuis/nmailui/src/nmattachmentlist.cpp Thu Jun 24 14:32:18 2010 +0300
@@ -37,12 +37,10 @@
NmAttachmentList::~NmAttachmentList()
{
NM_FUNCTION;
-
- clearList();
}
/*!
- Insert new list item. Returns the count of the attachment in list
+ Insert new list item. Returns the index of the attachment in list
*/
int NmAttachmentList::insertAttachment(
const QString &fullFileName,
@@ -95,13 +93,14 @@
}
/*!
- Remove attachment from list position
+ Removes attachment from list position
*/
void NmAttachmentList::removeAttachment(int arrayIndex)
{
NM_FUNCTION;
- if (arrayIndex < count()) {
+ if (arrayIndex < count() &&
+ arrayIndex >= 0 ) {
// Remove UI
mListWidget.removeAttachment(arrayIndex);
// Remove from data structure