Because '#' and '?' are valid URL characters, without QUrl::fromLocalFile, they don't get properly percent-encoded.
The problem was more visible with the number sign since Android is pretty adamant about preventing question marks in filenames.
See T6730.