switch QList<> to QVector<> and add some guards against out of range indices

some improvements to the segregated mesh groups