Remove calls to qMalloc and qFree as they are depricated