On 24.02.2012 13:33, Stephan Aßmus wrote: [Qt slots/signals]
For the WebKit port, I was faced with the situation that WebCore contained asserts that certain stuff was executed on the main thread. This forced me to, instead of locking the BApplication and calling some method, actually send it a BMessage instead, so that in the BApplication thread, I could decompose the BMessage and then call whatever WebCore method it was I needed to call in the first place. This is significantly more code, and error prone, than using signals and slots where emiting a signal invokes the respective slot of another QObject automatically in the correct thread.
Sure, but that's a very specific usage, and, in the end, sounds mostly like a bug in WebCore (or just a creative way to avoid locking :-)).
I'm not saying that signals don't have their uses, only that they are alien to C++, and I would rather choose a language that suits my needs than to hack features into it this way. If they were a genuine language feature, they could even be quite elegant, but the way it's done spoils it a bit for me.
And, for common use cases, I find BMessages generally more useful/versatile. Bye, Axel.