Quote Originally Posted by Lykurg View Post
Is this class still thread-safe since it does not use any functions of QObject? What about emit?
That should be ok.

Quote Originally Posted by Lykurg View Post
What does this mean for calling increase() through a pointer from a different tread. Which thread does the "work" (manipulating m_ints) of increase(): The main thread or the local thread?
The thread calling the method is the one executing its code.
If the receiver of the signal has a different thread affinity than the thread executing the emit, then the slot will be executed by the receiver's owner thread (assuming Qt::AutoConnection).

However, I would suggest to unlock before emitting, otherwise it is easy to get into a recursive lock situation (e.g. the slot or a methods called from the slot calling a method of this object again).

Cheers,
_