void MythGenericTree::sortByAttributeThenByString(int which_attribute) { m_ordered_subnodes->Sort(SortableMythGenericTreeList::SORT_ATT_THEN_STRING, which_attribute); QList<MythGenericTree*>::iterator it; it = m_subnodes->begin(); MythGenericTree *child; while ((child = *it) != 0) { child->sortByAttributeThenByString(which_attribute); ++it; } }