Conflict when using with Qt-Framework

Issue #1 wontfix
Former user created an issue

There is an error caused by the term signals in the Vector::DBC::Message Class, because this keyword is used for the signal-slot-mechanism. I had to rename std::map< std::string, Signal > signals.

Comments (3)

  1. Tobias Lorenz repo owner

    When I implemented this class I had to decide between handling the name of this particular variable different to all other variable names of the library, or to make things more complicated when using Qt. I'm also favoring Qt bye the way, but I decided to go with harmonized names. ;-) The reason is that it's easy to solve for Qt application. Just set the macro QT_NO_KEYWORDS and use Q_EMIT, Q_SIGNALS, and Q_SLOTS instead of emit, signals and slots. If you look in the source code of Qt itself, they did exactly the same for their own source code. Is this ok? Bye Tobias

  2. Tobias Lorenz repo owner

    Set to wontfix, as this was implemented intentionally this way. It's more elegant to circumvent the name clash in Qt applications by setting QT_NO_KEYWORDS and using Q_SIGNALS instead of signal.

  3. Log in to comment