Bug #419
RSB clashes with Qt
Status: | Resolved | Start date: | 07/14/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | C++ | |||
Target version: | 0.4 |
Description
The following program does not compile:
#include <qapplication.h> #include <rsb/Informer.h> int main(){ return 0; }
In file included from /vol/xcf/include/rsb/transport/Factory.h:31, from /vol/xcf/include/rsb/Informer.h:33, from application/test.cpp:3: /vol/xcf/include/rsb/transport/InPullConnector.h:48: error: declaration of ‘virtual int rsb::transport::InPullConnector::EventPtr(bool)’ /vol/xcf/include/rsb/Event.h:138: error: changes meaning of ‘EventPtr’ from ‘typedef class boost::shared_ptr<rsb::Event> rsb::EventPtr’
Related issues
History
#1 Updated by J. Moringen almost 13 years ago
- Status changed from New to Resolved
This seems to be broken in QT: from what I understand, QT defines some macros (emit
in this case) which get leaked into other header files causing arbitrary expansions.
There seem to be two workarounds:
- Reversing the order of
#include
statements such that QT-related headers are last - Defining QT_NO_KEYWORDS
#2 Updated by J. Moringen almost 13 years ago
- Status changed from Resolved to Feedback
#3 Updated by M. Rolf almost 13 years ago
Reversing include-order works.
However, Qt is quite widely used, so it would be nice to avoid names like signal/slot/emit in RSB.
#4 Updated by J. Wienke over 12 years ago
- Status changed from Feedback to In Progress
- Assignee set to J. Wienke
- Target version set to 0.4
#5 Updated by J. Wienke over 12 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset r2551.