PluginManager/PluginRepositoryDialog.py

branch
maintenance
changeset 5756
1dffdf872fdb
parent 5739
a870f5f03baa
child 5854
be976799b8c0
equal deleted inserted replaced
5753:3c4c305214fb 5756:1dffdf872fdb
508 len(self.__selectedItems())) 508 len(self.__selectedItems()))
509 reply.deleteLater() 509 reply.deleteLater()
510 return 510 return
511 511
512 self.__downloadIODevice.open(QIODevice.WriteOnly) 512 self.__downloadIODevice.open(QIODevice.WriteOnly)
513 self.__downloadIODevice.write(reply.readAll()) 513 # read data in chunks
514 chunkSize = 64 * 1024 * 1024
515 while True:
516 data = reply.read(chunkSize)
517 if data is None or len(data) == 0:
518 break
519 self.__downloadIODevice.write(data)
514 self.__downloadIODevice.close() 520 self.__downloadIODevice.close()
515 if QFile.exists(self.__downloadFileName): 521 if QFile.exists(self.__downloadFileName):
516 QFile.remove(self.__downloadFileName) 522 QFile.remove(self.__downloadFileName)
517 self.__downloadIODevice.rename(self.__downloadFileName) 523 self.__downloadIODevice.rename(self.__downloadFileName)
518 self.__downloadIODevice = None 524 self.__downloadIODevice = None

eric ide

mercurial