208 @return flag indicating a successful call of the extension (boolean) |
208 @return flag indicating a successful call of the extension (boolean) |
209 """ |
209 """ |
210 try: |
210 try: |
211 if extension == QWebPage.ErrorPageExtension: |
211 if extension == QWebPage.ErrorPageExtension: |
212 info = sip.cast(option, QWebPage.ErrorPageExtensionOption) |
212 info = sip.cast(option, QWebPage.ErrorPageExtensionOption) |
|
213 if info.error == 102: |
|
214 # this is something of a hack; hopefully it will work in the future |
|
215 return False |
|
216 |
213 errorPage = sip.cast(output, QWebPage.ErrorPageExtensionReturn) |
217 errorPage = sip.cast(output, QWebPage.ErrorPageExtensionReturn) |
214 urlString = bytes(info.url.toEncoded()).decode() |
218 urlString = bytes(info.url.toEncoded()).decode() |
215 html = notFoundPage_html |
219 html = notFoundPage_html |
216 title = self.trUtf8("Error loading page: {0}").format(urlString) |
220 title = self.trUtf8("Error loading page: {0}").format(urlString) |
217 pixmap = qApp.style()\ |
221 pixmap = qApp.style()\ |
936 dlg = DownloadDialog(reply, requestFilename, self.page(), download) |
940 dlg = DownloadDialog(reply, requestFilename, self.page(), download) |
937 if dlg.initialize(): |
941 if dlg.initialize(): |
938 self.connect(dlg, SIGNAL("done()"), self.__downloadDone) |
942 self.connect(dlg, SIGNAL("done()"), self.__downloadDone) |
939 self.__downloadWindows.append(dlg) |
943 self.__downloadWindows.append(dlg) |
940 dlg.show() |
944 dlg.show() |
941 self.setUrl(self.url()) |
|
942 else: |
945 else: |
943 replyUrl = reply.url() |
946 replyUrl = reply.url() |
944 if replyUrl.isEmpty(): |
947 if replyUrl.isEmpty(): |
945 return |
948 return |
946 |
949 |