Qt4: never assign qtu() to a variable
As far as I understand, this breaks C++ object scoping. qtu() creates a temporary anonymous QByteArray from its QString parameter. That array is destroyed at the end of the expression, thus the return value of qtu() becomes a dangling pointer.
Showing
Please register or sign in to comment