author | mickeyl <mickeyl> | 2004-04-23 13:44:25 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-23 13:44:25 (UTC) |
commit | 8e32516bbda3fda10314f2afe4ee00eb9a49c013 (patch) (unidiff) | |
tree | 598226dff8f623159b7bec675ae95c463bb711a5 | |
parent | 25f3f2fe15578fd4deb04a951e3e23927977e032 (diff) | |
download | opie-8e32516bbda3fda10314f2afe4ee00eb9a49c013.zip opie-8e32516bbda3fda10314f2afe4ee00eb9a49c013.tar.gz opie-8e32516bbda3fda10314f2afe4ee00eb9a49c013.tar.bz2 |
gcc3.4 fixlet
-rw-r--r-- | noncore/apps/checkbook/listedit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/listedit.cpp b/noncore/apps/checkbook/listedit.cpp index 5026c9d..2612488 100644 --- a/noncore/apps/checkbook/listedit.cpp +++ b/noncore/apps/checkbook/listedit.cpp | |||
@@ -155,49 +155,49 @@ class ColMap { | |||
155 | QString _sValue; | 155 | QString _sValue; |
156 | QListViewItem *_pEntry; | 156 | QListViewItem *_pEntry; |
157 | }; | 157 | }; |
158 | 158 | ||
159 | class ColList : public QList<QString> | 159 | class ColList : public QList<QString> |
160 | { | 160 | { |
161 | public: | 161 | public: |
162 | ColList() : QList<QString>() { } | 162 | ColList() : QList<QString>() { } |
163 | 163 | ||
164 | protected: | 164 | protected: |
165 | int compareItems(QCollection::Item, QCollection::Item); | 165 | int compareItems(QCollection::Item, QCollection::Item); |
166 | }; | 166 | }; |
167 | 167 | ||
168 | int ColList::compareItems(QCollection::Item i1, QCollection::Item i2) { | 168 | int ColList::compareItems(QCollection::Item i1, QCollection::Item i2) { |
169 | return( ((QString *)i1)->compare(*(QString *)i2) ); | 169 | return( ((QString *)i1)->compare(*(QString *)i2) ); |
170 | } | 170 | } |
171 | 171 | ||
172 | void ListEdit::fixTypes(int iColumn) | 172 | void ListEdit::fixTypes(int iColumn) |
173 | { | 173 | { |
174 | // get column def | 174 | // get column def |
175 | ColumnDef *pDef=this->at(iColumn); | 175 | ColumnDef *pDef=this->at(iColumn); |
176 | 176 | ||
177 | // create map of entries | 177 | // create map of entries |
178 | if( !_typeTable->childCount() ) return; | 178 | if( !_typeTable->childCount() ) return; |
179 | ColMap **colMap=new (ColMap *)[_typeTable->childCount()]; | 179 | ColMap **colMap=new ColMap *[_typeTable->childCount()]; |
180 | QListViewItem *cur=_typeTable->firstChild(); | 180 | QListViewItem *cur=_typeTable->firstChild(); |
181 | ColList lst; | 181 | ColList lst; |
182 | for(int i=0; i<_typeTable->childCount(); i++) { | 182 | for(int i=0; i<_typeTable->childCount(); i++) { |
183 | colMap[i]=new ColMap(cur->text(iColumn), cur); | 183 | colMap[i]=new ColMap(cur->text(iColumn), cur); |
184 | lst.append( &(colMap[i]->getValue()) ); | 184 | lst.append( &(colMap[i]->getValue()) ); |
185 | cur=cur->nextSibling(); | 185 | cur=cur->nextSibling(); |
186 | } | 186 | } |
187 | 187 | ||
188 | // fix empty entries | 188 | // fix empty entries |
189 | int i=0; | 189 | int i=0; |
190 | for(QString *ptr=lst.first(); ptr; ptr=lst.next()) { | 190 | for(QString *ptr=lst.first(); ptr; ptr=lst.next()) { |
191 | *ptr=ptr->stripWhiteSpace(); | 191 | *ptr=ptr->stripWhiteSpace(); |
192 | if( ptr->isEmpty() ) { | 192 | if( ptr->isEmpty() ) { |
193 | i++; | 193 | i++; |
194 | if( i==1 ) *ptr=pDef->getNewValue(); | 194 | if( i==1 ) *ptr=pDef->getNewValue(); |
195 | else ptr->sprintf("%s %d", (const char *)pDef->getNewValue(), i); | 195 | else ptr->sprintf("%s %d", (const char *)pDef->getNewValue(), i); |
196 | } | 196 | } |
197 | } | 197 | } |
198 | 198 | ||
199 | // fix dups | 199 | // fix dups |
200 | lst.sort(); | 200 | lst.sort(); |
201 | QString repl; | 201 | QString repl; |
202 | for(uint iCur=0; iCur<lst.count()-1; iCur++) { | 202 | for(uint iCur=0; iCur<lst.count()-1; iCur++) { |
203 | QString *current=lst.at(iCur); | 203 | QString *current=lst.at(iCur); |