def mimeData(self, items): links = [ struct.RevLink(self.__store, self.__revs[self.row(item)]) for item in items ] if not links: return None mimeData = QtCore.QMimeData() struct.dumpMimeData(mimeData, links) return mimeData
def mimeData(self, indexes): links = [self.getItemLink(index) for index in indexes if index.isValid() and (index.column() == 0)] if not links: return None mimeData = QtCore.QMimeData() struct.dumpMimeData(mimeData, links) fuseData = [] for link in links: if isinstance(link, struct.DocLink): f = fuse.findFuseFile(link) if f: fuseData.append(f) if fuseData: mimeData.setUrls([QtCore.QUrl.fromLocalFile(f) for f in fuseData]) return mimeData