Hi Peter,
Just fixed the problem in SocketAllocator - simply replaced the cast to an int with a cast to QObject * (that’s what SignalMapper supports) - all pointers do have the same size :-).
I haven’t study the SocketAllocator implementation so I don’t know why there are reinterpret_casts needed, but I just wanted to write a note about pointer sizes.
There are some peculiarities about pointer sizes:
- The size of a pointer is platform dependant.
- Even pointers of different types may not be the same size as each other (details 1, 2).
- Pointers to members may have different size than “ordinary” pointers - they’re mostly implemented as simple structs (details).
- Pointers to functions may have different size than
void *(details - book, see rule n.91).
I’m sorry that I have no direct links to the C++ standard [draft], but I hope that what I’ve written is correct.
Have a nice day,
Petr
