QVector::length() is QT5 only

.. so changed to count() which does the same.