MimeDataWithIndexes and MimeDataWithReferences advertised every stored format in formats() but denied all of them except their own format name in hasFormat(). The object reference paths that the tree view stores under the ObjectReferenceList mime type were therefore reported as absent, and only worked because QMimeData::data() does not consult hasFormat().
Fall back to QMimeData::hasFormat() so the two functions agree.