Skip to content

Commit

Permalink
Fix Qt 5.15 deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Sep 18, 2023
1 parent 647f3ec commit f847d76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions visualization/motion_planning_tasks/src/task_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,13 @@ TaskPanel::TaskPanel(QWidget* parent) : rviz::Panel(parent), d_ptr(new TaskPanel
Q_D(TaskPanel);

// sync checked tool button with displayed widget
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect(d->tool_buttons_group, &QButtonGroup::idClicked, d->stackedWidget,
[d](int index) { d->stackedWidget->setCurrentIndex(index); });
#else
connect(d->tool_buttons_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
d->stackedWidget, [d](int index) { d->stackedWidget->setCurrentIndex(index); });
#endif
connect(d->stackedWidget, &QStackedWidget::currentChanged, d->tool_buttons_group,
[d](int index) { d->tool_buttons_group->button(index)->setChecked(true); });

Expand Down

0 comments on commit f847d76

Please sign in to comment.