Remove duplicated code where the only difference is the return type.

The function has been removed and a static function put in it's place in the
DataArrayPath class that converts from a QStringList to a QVector<DataArrayPath>
which is needed by some classes.