[qt4] revert range based for in qt4