ros-visualization / rviz

ROS 3D Robot Visualizer
BSD 3-Clause "New" or "Revised" License
831 stars 463 forks source link

use static QCoreApplication::processEvents() function without a QApplication instance. #1772

Closed ygerlach closed 1 year ago

ygerlach commented 1 year ago

This removes the need for the setApp() call.

Description

As seen in the Qt documentation processEvents is a static function so no member of QCoreApplication is required. Removing this takes away the need for setApp() in VisualizationFrame and VisualizerApp which i have keept for now, but should be marked as deprecated and get removed in the future. Removing this requirement of QApplication help to ease the step of integrating rviz into other possibly quite big Qt-Applications, if there is no need to pass around a pointer to the main Application.

Checklist

ygerlach commented 1 year ago

thanks, i wasn't sure how deprecated methods are annotated in this project.

ygerlach commented 1 year ago

What needs to happen, that this PR can be merged?

rhaschke commented 1 year ago

Sorry, this got out of my sight. Closing and reopening to trigger CI again...