We know we will never have more than t_dir pages but since QList::count can be an int, make the index variable also be int and let clang-tidy be happy