replaced deprecated qstrdup