is this legal? I can compile but i wonder if this is bad practice or, even worse, suited for run time bugs
i.e. can i associate to the same signal of two different QTcpSocket to the same slot but with different parameters (the target socket but also others)?Code:
connect(mTcpSocket, SIGNAL(connected()), this, SLOT(sendMsg(mTcpSocket))); connect(pTcpSocket, SIGNAL(connected()), this, SLOT(sendMsg(pTcpSocket))); ... { QByteArray block; out << this->Cli2SvrMsg.dutId; out << this->Cli2SvrMsg.opCode; out.device()->seek(0); tcpSocket->write(block); tcpSocket->waitForBytesWritten(); }
QTcpSocket is event driven so i do not see any danger for concurrency, right?
not sure this is really a newbie question, hope to get less severe reply from somebody ;-)
thanks much