int main() { QList<int> list; list << 27 << 33 << 61 << 62; // Java-style iterator QMutableListIterator<int> javaIter( list ); while (javaIter.hasNext()) { int value = javaIter.next() + 1; javaIter.setValue( value ); qDebug() << value; } // STL-style iterator QList<int>::Iterator stlIter; for (stlIter = list.begin(); stlIter != list.end(); ++stlIter) { (*stlIter) = (*stlIter)*2; qDebug() << (*stlIter); } }
void SFEFileListQuery::doReceive() { QList<QString> fl; _in >> fl; qDebug("fl:"); QMutableListIterator<QString> javaIter( fl ); while( javaIter.hasNext() ){ QString s = javaIter.next(); _fl << s ;//javaIter.next()//.prepend(_baseDir); qDebug() << s; } }