I read here that the QVector class uses implicit data sharing to maximize resource usage and minimize copying. I don't know if emitting a signal with a QVector parameter to a slot in a different thread causes data copy or not! These questions also relate to this issue:
Passing QVector from worker thread to main thread via signal/slot
Emitting QVector reference in Qt signal results in copy
But i could not get the point from those. clearly my question is:
I have a signal :
void someSignal(QVector<int> values);
And a slot :
void someSlot(QVector<int> values);
These are in different threads and I connect them. so the connection type is Qt::QueuedConnection. Also i should state that the QVector elements are not modified in the slot. They are just read.
Does emitting the signal cause the QVector elements be copied?