def mimedata_from_paths(paths):
 abspaths = [core.abspath(path) for path in paths]
 urls = [QtCore.QUrl.fromLocalFile(path) for path in abspaths]
 mimedata = QtCore.QMimeData()
 mimedata.setUrls(urls)
 paths_text = core.list2cmdline(abspaths)
 encoding = gitcfg.current().get(u'cola.dragencoding', u'utf-16')
 moz_text = core.encode(paths_text, encoding=encoding)
 mimedata.setData(u'text/x-moz-url', moz_text)
 return mimedata

def mimedata_from_paths ( paths ) : abspaths = [ core . abspath ( path ) for path in paths ] urls = [ QtCore . QUrl . fromLocalFile ( path ) for path in abspaths ] mimedata = QtCore . QMimeData ( ) mimedata . setUrls ( urls ) paths_text = core . list2cmdline ( abspaths ) encoding = gitcfg . current ( ) . get ( u'cola.dragencoding' , u'utf-16' ) moz_text = core . encode ( paths_text , encoding = encoding ) mimedata . setData ( u'text/x-moz-url' , moz_text ) return mimedata
return mimedata with a list of absolute path urls .