See epic for more details.
QTBUG-106197 for the agreed-upon overload set.
- QByteArray has an assign() overload set following
- For a QByteArray that is not shared and has sufficient capacity() to hold the result of the operation, these functions do not allocate additional memory.
- Otherwise, the moral equivalent of *this = QByteArray(~~~args~~~) (even if QByteArray cannot actually be constructed using ~~~args~~~.