-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Compiling a rqt_gui_cpp plugin which (transitively) depends on boost signals (e.g. via tf package) fails to compile due to macro name clashes of Qt's "signals", "slots", "emit" macros as described here:
http://wiki.ros.org/qt_ros/Tutorials/Mixing%20Qt%20and%20Boost%20Signals
For such a plugin to compile the QT_NO_KEYWORDS flag can be set in its cmake file:
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
But this breaks the current code of qt_gui_core at:
https://github.com/ros-visualization/qt_gui_core/blob/fuerte-devel/qt_gui_cpp/include/qt_gui_cpp/plugin_bridge.h#L63
And also a few other files in the rqt package are affected:
https://github.com/ros-visualization/rqt/search?l=cpp&q=signals+OR+slots+OR+emit&type=Code&utf8=%E2%9C%93
Changing the keywords as follows would resolve this issue:
- signals -> Q_SIGNALS
- slots -> Q_SLOTS
- emit -> Q_EMIT
- foreach -> Q_FOREACH
The use of the QT_NO_KEYWORDS flag should also be mentioned in the rqt cpp plugin tutorial.