Results 1 to 3 of 3

Thread: conflict between boost signals and Qt signals

  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default conflict between boost signals and Qt signals

    We had the above problem and could not find on the forum posts that dealt with it, and thought to post the solution in case someone else will for it here.
    http://labs.trolltech.com/blogs/2007...slots-with-qt/
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  2. #2
    Join Date
    Jun 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Angry Re: conflict between boost signals and Qt signals

    This doesn't work for me. I tried the CONFIG += no_keywords which resulted in lots of errors like :

    ISO C++ forbids declaration of ‘signals’ with no type
    ISO C++ forbids declaration of ‘slots’ with no type

    and if I remove the CONFIG += no_keywords I get the following stupid errors :
    /usr/include/boost/signals/detail/signals_common.hpp:26: error: expected identifier before ‘protected’
    /usr/include/boost/signals/detail/signals_common.hpp:26: error: expected unqualified-id before ‘protected’
    .tmp/moc_robotmanager.cpp:81: error: expected `}' at end of input

    The only way i can make it work is by including :
    • #include <boost/signal.hpp>
    • #include <boost/bind.hpp>


    at the top of each header file which really doesn't make any sense !!!
    Is there anyway to get rid of this stupid naming clash ??

  3. #3
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: conflict between boost signals and Qt signals

    You can use "CONFIG += no_keywords" in .pro file and use Q_SIGNALS and Q_SLOTS instead of "signals" and "slots"
    A camel can go 14 days without drink,
    I can't!!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.