lets say i have static public function that emit signals. i create a connection (from inside the gui-thread) to a gui-slot. when the connection is established both objects live in the same thread so the connection would be direct.
but if the static public function is called from inside a qthread the connection must not be direct! what will happen?
You need an instance to emit signals. It cannot be done from static functions.
When you connect a slot to that signal, how would you do it without an instance?
if connection type is set to auto, is the state of the connection defined at "connection-time" or on a per-signal basis?
QConnection holds the type of the connection. Therefore you set the connection type when you make the connection.
struct QConnection {
int signal;
int method;
uint refCount:29;
uint type:3; // 0 == auto, 1 == direct, 2 == queued, 4 == blocking
int *types;
};
struct QConnection {
QObject *sender;
int signal;
QObject *receiver;
int method;
uint refCount:29;
uint type:3; // 0 == auto, 1 == direct, 2 == queued, 4 == blocking
int *types;
};
To copy to clipboard, switch view to plain text mode
Regards
Bookmarks