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

The use of .data() looks unsafe here because the temporary object created on
the stack is gone when we call client.ChatMessage_Send() in the next line of
code.

The pattern which I believe is safe is:

client.ChatMessage_Send("MSG", QString("!vote bpm %1").arg(bpm).toUtf8().data());

I think the lifetime of the temporary values will be sufficient if the
expression is part of the function call.