- 1. Don't noncopyable signal semantics mean that a class with a signal member will be noncopyable as well?
- 2. Is Boost.Signals thread-safe?
- 3. How do I get Boost.Signals to work with Qt?
- 4. How has the API changed from Boost.Signals version 1.34?
| 1. |
Don't noncopyable signal semantics mean that a class with a signal member will be noncopyable as well? |
|
No. The compiler will not be able to generate a copy constructor or copy assignment operator for your class if it has a signal as a member, but you are free to write your own copy constructor and/or copy assignment operator. Just don't try to copy the signal. |
|
| 2. |
Is Boost.Signals thread-safe? |
|
Yes, if the ThreadingModel template parameter of the signal is set to
|
|
| 3. |
How do I get Boost.Signals to work with Qt? |
|
When building with Qt, the Moc keywords
Alternatively, for Qt 4.1 and later
the CONFIG += no_keywords # so Qt won't #define any non-all-caps `keywords' INCLUDEPATH += . /usr/local/include/thread_safe_signals /usr/local/include/boost-1_33_1/ # ...your exact paths may vary Now you can mix Boost.Signals and Qt Signals and Slots in the same files, and even within the same class or function. You will have to use the upper-case versions of Qt macros in your own code. See the article A Deeper Look at Signals and Slots [off-site] for more complete examples and a survey of the strengths of the two systems. |
|
| 4. |
How has the API changed from Boost.Signals version 1.34? |
|
In summary, the following changes have been made to the signals API:
|