Skip to content

Optional support for Qt6#3582

Merged
rhaschke merged 11 commits intomoveit:masterfrom
isys-vision:qt6
Jan 9, 2025
Merged

Optional support for Qt6#3582
rhaschke merged 11 commits intomoveit:masterfrom
isys-vision:qt6

Conversation

@simonschmeisser
Copy link
Copy Markdown
Contributor

Description

This enables compiling against Qt6 if rviz has been compiled against Qt6 as well.

I noticed that the CMake code allows compiling against Qt4 but there are usages of QRegularExpression which was introduced in Qt 5.0.0 only. I started adding conditional use of QRegularExpression but I'm wondering if this is really necessary so the PR is currently inconsistent.

QStringView was introduced in Qt 5.10 and replaces QStringRef since Qt 6.0.0, I added a condition on >= 6.0.0 but it could be 5.10.0 just as well.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 47.24%. Comparing base (c174715) to head (4092832).
Report is 7 commits behind head on master.

❗ Current head 4092832 differs from pull request most recent head 0bb3c71. Consider uploading reports for the commit 0bb3c71 to get more accurate results

Files Patch % Lines
...sistant/src/widgets/configuration_files_widget.cpp 0.00% 3 Missing ⚠️
...tup_assistant/src/tools/collision_linear_model.cpp 0.00% 2 Missing ⚠️
...tup_assistant/src/tools/collision_matrix_model.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3582      +/-   ##
==========================================
+ Coverage   47.15%   47.24%   +0.09%     
==========================================
  Files         603      603              
  Lines       58999    59004       +5     
  Branches     6969     6984      +15     
==========================================
+ Hits        27814    27868      +54     
+ Misses      30773    30718      -55     
- Partials      412      418       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@simonschmeisser simonschmeisser force-pushed the qt6 branch 2 times, most recently from 4ce7eb6 to 4092832 Compare March 24, 2024 20:53
Copy link
Copy Markdown
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QRegularExpression already exists since Qt 5.0: https://doc.qt.io/qt-5/qregularexpression.html
You can drop the corresponding ifdefs.

@simonschmeisser
Copy link
Copy Markdown
Contributor Author

QRegularExpression already exists since Qt 5.0: https://doc.qt.io/qt-5/qregularexpression.html You can drop the corresponding ifdefs.

There is (incomplete) support for Qt 4 still around in some places. Should I ignore this and assume Qt is at least 5.0 or make this more explicit (removing some ifdefs, enforcing in CMake etc)?

@rhaschke
Copy link
Copy Markdown
Contributor

I think we have dropped Qt4 support.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 47 lines in your changes missing coverage. Please review.

Project coverage is 47.50%. Comparing base (3aed1dc) to head (e687586).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...setup_assistant/src/widgets/robot_poses_widget.cpp 0.00% 13 Missing ⚠️
...tup_assistant/src/widgets/end_effectors_widget.cpp 0.00% 8 Missing ⚠️
...tup_assistant/src/tools/collision_linear_model.cpp 0.00% 7 Missing ⚠️
...up_assistant/src/widgets/virtual_joints_widget.cpp 0.00% 7 Missing ⚠️
...plugin/src/motion_planning_frame_joints_widget.cpp 0.00% 4 Missing ⚠️
...sistant/src/widgets/configuration_files_widget.cpp 0.00% 3 Missing ⚠️
...planning_rviz_plugin/src/motion_planning_frame.cpp 0.00% 2 Missing ⚠️
...tup_assistant/src/tools/xml_syntax_highlighter.cpp 0.00% 2 Missing ⚠️
...tup_assistant/src/tools/collision_matrix_model.cpp 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3582      +/-   ##
==========================================
- Coverage   47.88%   47.50%   -0.38%     
==========================================
  Files         604      604              
  Lines       61141    61557     +416     
  Branches     7059     7023      -36     
==========================================
- Hits        29270    29234      -36     
- Misses      31462    31905     +443     
- Partials      409      418       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, this looks good. See the comments below for some small cleanups.
Can you please add a CI path testing against Qt6 - the same way I did for rviz?

@rhaschke
Copy link
Copy Markdown
Contributor

@simonschmeisser: I fixed the Jammy + Noble builds on the master branch. Can you please rebase and resolve the conflicts? Then this PR should be mergeable.

@simonschmeisser
Copy link
Copy Markdown
Contributor Author

I rebased and squashed this a bit. I based the Qt6 build on noble but we could also base it on jammy

@simonschmeisser
Copy link
Copy Markdown
Contributor Author

Seems like I need to implement Qt6 support for rviz_visual_tools and moveit_visual_tools as well

@rhaschke
Copy link
Copy Markdown
Contributor

Seems like I need to implement Qt6 support for rviz_visual_tools and moveit_visual_tools as well

Yes, please ;-)

@rhaschke rhaschke merged commit da4131d into moveit:master Jan 9, 2025
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Feb 6, 2025
* QRegExp has been removed in Qt6
* No longer need to add std::string as QMetaType
* QStringRef was removed in Qt6
* Use modern Qt connect syntax
* QComboBox::currentIndexChanged(QString) is gone in Qt6
* currentIndexChanged(QString) and modern connect

Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
@rhaschke rhaschke mentioned this pull request Jun 4, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants