--- a/emailuis/nmailui/src/nmattachmentlist.cpp Wed Jun 23 18:00:21 2010 +0300
+++ b/emailuis/nmailui/src/nmattachmentlist.cpp Tue Jul 06 14:04:34 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