Merge "Make sure to sync GPU after deleting memory in trimMemory." into qt-dev