Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Data type conversion [qint64 / int]
LeLev last edited by
After updating qt creator, i have a warning on this :
QByteArray buffer; buffer.resize(socket->pendingDatagramSize());
warning : implicit conversion loses integer precision : 'qing64' (aka 'lonl long') to int
can i just do static_cast<int>() or is there a better solution ?
You can safely do a static_cast<int> here since the pendingDatagramSize will never exceed 2GB (in the near future)