summaryrefslogtreecommitdiff
path: root/noncore/net/mailit/maillist.cpp
authorllornkcor <llornkcor>2003-06-09 01:37:23 (UTC)
committer llornkcor <llornkcor>2003-06-09 01:37:23 (UTC)
commit364e6e65b4c3b4ceec2b1b6688f2ca2b3dce4560 (patch) (unidiff)
tree1be5d3150c2bda4b3a55f9e7d2529d73fe6d72db /noncore/net/mailit/maillist.cpp
parent5ee1c7dff5679454d46e3c5bd5747c60ea63c959 (diff)
downloadopie-364e6e65b4c3b4ceec2b1b6688f2ca2b3dce4560.zip
opie-364e6e65b4c3b4ceec2b1b6688f2ca2b3dce4560.tar.gz
opie-364e6e65b4c3b4ceec2b1b6688f2ca2b3dce4560.tar.bz2
patch from wim delvaux. fix from me
Diffstat (limited to 'noncore/net/mailit/maillist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mailit/maillist.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/mailit/maillist.cpp b/noncore/net/mailit/maillist.cpp
index b5325a9..8c34295 100644
--- a/noncore/net/mailit/maillist.cpp
+++ b/noncore/net/mailit/maillist.cpp
@@ -65,25 +65,25 @@ void MailList::sizeInsert(int serverId, uint size)
65 newEntry->size = size; 65 newEntry->size = size;
66 66
67 for (tempPtr = sortedList.first(); tempPtr != NULL; tempPtr = sortedList.next() ) { 67 for (tempPtr = sortedList.first(); tempPtr != NULL; tempPtr = sortedList.next() ) {
68 if (newEntry->size < tempPtr->size) { 68 if (newEntry->size < tempPtr->size) {
69 x = sortedList.at(); 69 x = sortedList.at();
70 sortedList.insert(x, newEntry); 70 sortedList.insert(x, newEntry);
71 return; 71 return;
72 } 72 }
73 } 73 }
74 sortedList.append(newEntry); 74 sortedList.append(newEntry);
75} 75}
76 76
77void MailList::moveFront(int serverId, uint size) 77void MailList::moveFront(int serverId, uint/* size*/)
78{ 78{
79 dList *currentPtr; 79 dList *currentPtr;
80 uint tempPos; 80 uint tempPos;
81 QString temp; 81 QString temp;
82 82
83 tempPos = currentPos; 83 tempPos = currentPos;
84 if ( tempPos >= sortedList.count() ) 84 if ( tempPos >= sortedList.count() )
85 return; 85 return;
86 currentPtr = sortedList.at(tempPos); 86 currentPtr = sortedList.at(tempPos);
87 while ( ((tempPos+1) < sortedList.count()) && ( currentPtr->serverId != serverId) ) { 87 while ( ((tempPos+1) < sortedList.count()) && ( currentPtr->serverId != serverId) ) {
88 tempPos++; 88 tempPos++;
89 currentPtr = sortedList.at(tempPos); 89 currentPtr = sortedList.at(tempPos);
@@ -91,41 +91,41 @@ void MailList::moveFront(int serverId, uint size)
91 91
92 if ( (currentPtr != NULL) && (currentPtr->serverId == serverId) ) { 92 if ( (currentPtr != NULL) && (currentPtr->serverId == serverId) ) {
93 temp.setNum(currentPtr->serverId); 93 temp.setNum(currentPtr->serverId);
94 qWarning("moved to front, message: " + temp); 94 qWarning("moved to front, message: " + temp);
95 95
96 dList *itemPtr = sortedList.take(tempPos); 96 dList *itemPtr = sortedList.take(tempPos);
97 sortedList.insert(currentPos, itemPtr); 97 sortedList.insert(currentPos, itemPtr);
98 } 98 }
99 99
100} 100}
101 101
102//only works if mail is not already in download 102//only works if mail is not already in download
103bool MailList::remove(int serverId, uint size) 103bool MailList::remove(int serverId, uint /*size*/)
104{ 104{
105 dList *currentPtr; 105 dList *currentPtr;
106 uint tempPos; 106 uint tempPos;
107 QString temp; 107 QString temp;
108 108
109 tempPos = currentPos; 109 tempPos = currentPos;
110 if ( tempPos >=sortedList.count() ) 110 if ( tempPos >=sortedList.count() )
111 return FALSE; 111 return FALSE;
112 currentPtr = sortedList.at(tempPos); 112 currentPtr = sortedList.at(tempPos);
113 while ( ((tempPos + 1) < sortedList.count()) && ( currentPtr->serverId != serverId) ) { 113 while ( ((tempPos + 1) < sortedList.count()) && ( currentPtr->serverId != serverId) ) {
114 tempPos++; 114 tempPos++;
115 currentPtr = sortedList.at(tempPos); 115 currentPtr = sortedList.at(tempPos);
116 } 116 }
117 117
118 if ( (currentPtr != NULL) && (currentPtr->serverId == serverId) ) { 118 if ( (currentPtr != NULL) && (currentPtr->serverId == serverId) ) {
119 temp.setNum(currentPtr->serverId); 119 temp.setNum(currentPtr->serverId);
120 qWarning("deleted message: " + temp); 120 qWarning("deleted message: " + temp);
121 sortedList.remove(tempPos); 121 sortedList.remove(tempPos);
122 122
123 return TRUE; 123 return TRUE;
124 } 124 }
125 return FALSE; 125 return FALSE;
126} 126}
127 127
128void MailList::insert(int pos, int serverId, uint size) 128void MailList::insert(int /*pos*/, int /*serverId*/, uint/* size*/)
129{ 129{
130 //sortedList.insert(pos, mPtr); 130 //sortedList.insert(pos, mPtr);
131} 131}