That's what I already have coded.
But for some functions I need somethings that look like an immediate response.
Indeed, for example a function isUserConnected(QString nickname).
isUserConnected would be called in a lot of different contexts (for different functions)
If I write those :
void checkUserConnected(QString nick); (equivalent to listChannels in your example)
userConnectedResponse(bool); (the signal, equivalent to channelFound)
I will have, for each function that would use checkUserConnected, to implement two functions.
1/ The first part of the code (before I need to check the user) in the first function
2/ The second part of the code (after checking) in a second function (ie, a slot).
That don't look really 'beautiful'. I will quickly get enormous interfaces for my classes.
Moreover, if I want to use the checkUser func again, in another part of the code , I will have to connect / disconnect signals and slots at each call :-/
That don't look really nice for me. Even more if you know that this 'framework' has to be easy reusable...
Don't you think so ?
Bookmarks