Small code simplification
Small code simplification

Replace a backwards iteration to make the code simpler and more
expressive.

Change-Id: I43c65750eec0f7ea8fe276a215050dce1ed5f601
Reviewed-by: Christian Kandeler <3aa99dcdd3f0cac61fb81c2a11771c0cc2497607@qt.io>

qt-labs/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs