replace strcpy to normal QString code