I need to use QMap<QTcpSocket*, QString>
just to keep a name of every connection.
I was told that using a complex object like QTcpSocket as a key is not ideal since the way map compares key, it could think there is a duplicate while it isn't.
So I would be apparently be better to use QMap<QString, QTcpSocket*>
instead.
I was not able to find "good practice" information on it. Is there any ground to this? Are some objects more/less recommended than others to use as keys?