teamikl/wahjam — comment on commit b34e012b3deb89cf49a2cfb55675521fff315b61
File: ninjam/qtclient/MainWindow.cpp line 663
By teamikl:

Yes you're right, QByteArray object toUtf8() returns was temporary object.
the pointer will be invalid. I read that in FAQ before too.

http://developer.qt.nokia.com/faq/answer/how_can_i_convert_a_qstring_to_char_and_vice_versa

I wanted to do here was make the type explicit without static cast.
.data() has overload chat* and const char* return types (there is .constData() method for const explicit).
now I think of use const_cast instead.