Fix compilation with -DQT_NO_CAST_TO_ASCII and enable it.
error: no matching function for call to ‘QByteArray::replace(char, const QString&)’