368 return |
368 return |
369 |
369 |
370 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
370 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
371 self.__downloading = WebBrowserWindow.networkManager().get( |
371 self.__downloading = WebBrowserWindow.networkManager().get( |
372 QNetworkRequest(self.location())) |
372 QNetworkRequest(self.location())) |
373 self.__downloading.finished.connect(self.__rulesDownloaded) |
373 self.__downloading.finished.connect( |
374 |
374 lambda: self.__rulesDownloaded(self.__downloading)) |
375 def __rulesDownloaded(self): |
375 |
|
376 def __rulesDownloaded(self, reply): |
376 """ |
377 """ |
377 Private slot to deal with the downloaded rules. |
378 Private slot to deal with the downloaded rules. |
378 """ |
379 |
379 reply = self.sender() |
380 @param reply reference to the network reply |
380 |
381 @type QNetworkReply |
|
382 """ |
381 response = reply.readAll() |
383 response = reply.readAll() |
382 reply.close() |
384 reply.close() |
383 self.__downloading = None |
385 self.__downloading = None |
384 |
386 |
385 if reply.error() != QNetworkReply.NoError: |
387 if reply.error() != QNetworkReply.NoError: |