342 self.__downloadFileName = filename |
342 self.__downloadFileName = filename |
343 self.__downloadIODevice = QFile(self.__downloadFileName + ".tmp") |
343 self.__downloadIODevice = QFile(self.__downloadFileName + ".tmp") |
344 self.__downloadCancelled = False |
344 self.__downloadCancelled = False |
345 |
345 |
346 reply = self.__networkManager.get(QNetworkRequest(QUrl(url))) |
346 reply = self.__networkManager.get(QNetworkRequest(QUrl(url))) |
347 self.connect(reply, SIGNAL("finished()"), self.__downloadFileDone) |
347 reply.finished[()].connect(self.__downloadFileDone) |
348 self.connect(reply, SIGNAL("downloadProgress(qint64, qint64)"), |
348 self.connect(reply, SIGNAL("downloadProgress(qint64, qint64)"), |
349 self.__downloadProgress) |
349 self.__downloadProgress) |
350 self.__replies.append(reply) |
350 self.__replies.append(reply) |
351 |
351 |
352 def __downloadFileDone(self): |
352 def __downloadFileDone(self): |