Fix handling of null terminated ANI metadata with Qt6
In Qt5 conversting a QByteArray to a QString stops at the first null byte, in Qt6 the QByteArray size is respected, and trailing null bytes are therefore included in the final QString. Explicitly determine the length of the string data to deal with that.