@@ -192,7 +192,7 @@ void setExpanded(QTreeView* view, const QModelIndex& index, bool expand, int dep
192192 // recursively expand all children
193193 if (depth != 0 ) {
194194 for (int row = 0 , rows = index.model ()->rowCount (index); row < rows; ++row)
195- setExpanded (view, index.child ( row, 0 ), expand, depth - 1 );
195+ setExpanded (view, index.model ()-> index ( row, 0 , index ), expand, depth - 1 );
196196 }
197197
198198 view->setExpanded (index, expand);
@@ -212,7 +212,7 @@ TaskViewPrivate::TaskViewPrivate(TaskView* q_ptr) : q_ptr(q_ptr), exec_action_cl
212212 if (parent.isValid () && !parent.parent ().isValid ()) { // top-level task items inserted
213213 int expand = this ->q_ptr ->initial_task_expand ->getOptionInt ();
214214 for (int row = first; row <= last; ++row) {
215- QModelIndex child = parent.child ( row, 0 );
215+ QModelIndex child = parent.model ()-> index ( row, 0 , parent );
216216 if (expand != TaskView::EXPAND_NONE) {
217217 // recursively expand all inserted items
218218 setExpanded (tasks_view, child, true );
@@ -352,7 +352,7 @@ void TaskView::load(const rviz::Config& config) {
352352
353353 QTreeView* view = d_ptr->solutions_view ;
354354 rviz::Config group = config.mapGetChild (" solution_sorting" );
355- int order;
355+ int order = 0 ;
356356 if (group.mapGetInt (" column" , &column) && group.mapGetInt (" order" , &order))
357357 view->sortByColumn (column, static_cast <Qt::SortOrder>(order));
358358}
0 commit comments