Constrain while loop on item count
Constrain while loop on item count

pos won't necessarily change, but item count does like in the above loop

Task-number: QTBUG-21315
Change-Id: Iaedabeacf4ebe3cd0505193395047b3d65a09442
Reviewed-on: http://codereview.qt-project.org/5347
Reviewed-by: Martin Jones <d1da02505c7f228af82a23235becb435f45569f5@nokia.com>

corngood/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,crobertd/qtdeclarative,crobertd/qtdeclarative,mgrunditz/qtdeclarative-2d,jfaust/qtdeclarative,matthewvogt/qtdeclarative,corngood/qtdeclarative,matthewvogt/qtdeclarative,jfaust/qtdeclarative,mgrunditz/qtdeclarative-2d,jfaust/qtdeclarative,corngood/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,corngood/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,corngood/qtdeclarative,matthewvogt/qtdeclarative,corngood/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,crobertd/qtdeclarative,crobertd/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,crobertd/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,jfaust/qtdeclarative,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,crobertd/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,qmlc/qtdeclarative,crobertd/qtdeclarative,jfaust/qtdeclarative,corngood/qtdeclarative