foreach (const QString &

taking const references is optimal (unless you're dealing with some small type like 'char' or whatever)