Skip to content

Conversation

@iche033
Copy link
Contributor

@iche033 iche033 commented May 2, 2025

🦟 Bug fix

Fixes #2871

Summary

This fixes the Qt warnings when closing gz sim.

More info:

When a plugin with TreeView is closed, we see warnings about failing to disconnect Qt signals / slots. This is because the tree model used by the TreeView is already destroyed by Qt so the TreeView fails to disconnect their signals / slots. This fix is to manually disconnect all these signals and slots in the tree model destructor so that when deleting the TreeView, it no longer attempts to disconnect them again.

Quick Test:

Launch gz sim -v 4 shapes.sdf, close the window -> you should no longer see Qt warnings like:

(2025-04-22 21:59:49.928) [warning] [Application.cc:922] [GUI] [QT] QObject::disconnect: No such signal QObject::rowsAboutToBeRemoved(QModelIndex,int,int)

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

iche033 added 2 commits May 2, 2025 22:59
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033 iche033 requested a review from mjcarroll as a code owner May 2, 2025 23:08
@github-actions github-actions bot added the 🪵 jetty Gazebo Jetty label May 2, 2025
@iche033 iche033 changed the title fix warnings on shutdown Fix Qt warnings on shutdown May 2, 2025
@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development May 5, 2025
@iche033 iche033 merged commit 339667a into main May 5, 2025
8 of 9 checks passed
@iche033 iche033 deleted the iche033/fix_qt_model_warnings branch May 5, 2025 17:02
@github-project-automation github-project-automation bot moved this from In review to Done in Core development May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪵 jetty Gazebo Jetty

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants