Correctly handle temporary QByteArray in Matrix when converting from QString to…

Authored by asemke on Oct 2 2017, 2:56 PM.