833 EricPixmapCache.getIcon("download"), |
833 EricPixmapCache.getIcon("download"), |
834 self.tr("Save Media"), |
834 self.tr("Save Media"), |
835 self.__downloadMedia, |
835 self.__downloadMedia, |
836 ) |
836 ) |
837 |
837 |
838 def __createSelectedTextContextMenu(self, menu, hitTest): |
838 def __createSelectedTextContextMenu(self, menu, hitTest): # noqa: U100 |
839 """ |
839 """ |
840 Private method to populate the context menu for selected text. |
840 Private method to populate the context menu for selected text. |
841 |
841 |
842 @param menu reference to the menu to be populated |
842 @param menu reference to the menu to be populated |
843 @type QMenu |
843 @type QMenu |
1745 |
1745 |
1746 ########################################################################### |
1746 ########################################################################### |
1747 ## Signal handlers below |
1747 ## Signal handlers below |
1748 ########################################################################### |
1748 ########################################################################### |
1749 |
1749 |
1750 def __renderProcessTerminated(self, status, exitCode): |
1750 def __renderProcessTerminated(self, status, exitCode): # noqa: U100 |
1751 """ |
1751 """ |
1752 Private slot handling a crash of the web page render process. |
1752 Private slot handling a crash of the web page render process. |
1753 |
1753 |
1754 @param status termination status |
1754 @param status termination status |
1755 @type QWebEnginePage.RenderProcessTerminationStatus |
1755 @type QWebEnginePage.RenderProcessTerminationStatus |
1983 extensions = extensionsList[index] |
1983 extensions = extensionsList[index] |
1984 fileName += extensions[extensionsIndex] |
1984 fileName += extensions[extensionsIndex] |
1985 |
1985 |
1986 return fileName, saveFormat |
1986 return fileName, saveFormat |
1987 |
1987 |
|
1988 @pyqtSlot("QWebEngineClientCertificateSelection") |
|
1989 def __selectClientCertificate(self, clientCertificateSelection): |
|
1990 """ |
|
1991 Private slot to handle the client certificate selection request. |
|
1992 |
|
1993 @param clientCertificateSelection list of client SSL certificates |
|
1994 found in system's client certificate store |
|
1995 @type QWebEngineClientCertificateSelection |
|
1996 """ |
|
1997 from eric7.EricNetwork.EricSslCertificateSelectionDialog import ( |
|
1998 EricSslCertificateSelectionDialog, |
|
1999 ) |
|
2000 |
|
2001 certificates = clientCertificateSelection.certificates() |
|
2002 if len(certificates) == 0: |
|
2003 clientCertificateSelection.selectNone() |
|
2004 elif len(certificates) == 1: |
|
2005 clientCertificateSelection.select(certificates[0]) |
|
2006 else: |
|
2007 certificate = None |
|
2008 dlg = EricSslCertificateSelectionDialog(certificates, self) |
|
2009 if dlg.exec() == QDialog.DialogCode.Accepted: |
|
2010 certificate = dlg.getSelectedCertificate() |
|
2011 |
|
2012 if certificate is None: |
|
2013 clientCertificateSelection.selectNone() |
|
2014 else: |
|
2015 clientCertificateSelection.select(certificate) |
|
2016 |
1988 ########################################################################### |
2017 ########################################################################### |
1989 ## Miscellaneous methods below |
2018 ## Miscellaneous methods below |
1990 ########################################################################### |
2019 ########################################################################### |
1991 |
2020 |
1992 def createWindow(self, windowType): |
2021 def createWindow(self, windowType): |
2279 Private slot to support printing from the web page. |
2308 Private slot to support printing from the web page. |
2280 """ |
2309 """ |
2281 self.__mw.tabWidget.printBrowser(browser=self) |
2310 self.__mw.tabWidget.printBrowser(browser=self) |
2282 |
2311 |
2283 ########################################################################### |
2312 ########################################################################### |
2284 ## Methods below implement slots for Qt 5.11+ |
2313 ## Methods below implement slots for Qt 6.0 to 6.4 |
2285 ########################################################################### |
2314 ########################################################################### |
2286 |
2315 |
2287 # deprecated with Qt 6.5+ |
2316 # deprecated with Qt 6.5+ |
2288 @pyqtSlot("QWebEngineQuotaRequest") |
2317 @pyqtSlot("QWebEngineQuotaRequest") |
2289 def __quotaRequested(self, quotaRequest): |
2318 def __quotaRequested(self, quotaRequest): |
2318 |
2347 |
2319 if ok: |
2348 if ok: |
2320 quotaRequest.accept() |
2349 quotaRequest.accept() |
2321 else: |
2350 else: |
2322 quotaRequest.reject() |
2351 quotaRequest.reject() |
2323 |
|
2324 ########################################################################### |
|
2325 ## Methods below implement slots for Qt 5.12+ |
|
2326 ########################################################################### |
|
2327 |
|
2328 @pyqtSlot("QWebEngineClientCertificateSelection") |
|
2329 def __selectClientCertificate(self, clientCertificateSelection): |
|
2330 """ |
|
2331 Private slot to handle the client certificate selection request. |
|
2332 |
|
2333 @param clientCertificateSelection list of client SSL certificates |
|
2334 found in system's client certificate store |
|
2335 @type QWebEngineClientCertificateSelection |
|
2336 """ |
|
2337 from eric7.EricNetwork.EricSslCertificateSelectionDialog import ( |
|
2338 EricSslCertificateSelectionDialog, |
|
2339 ) |
|
2340 |
|
2341 certificates = clientCertificateSelection.certificates() |
|
2342 if len(certificates) == 0: |
|
2343 clientCertificateSelection.selectNone() |
|
2344 elif len(certificates) == 1: |
|
2345 clientCertificateSelection.select(certificates[0]) |
|
2346 else: |
|
2347 certificate = None |
|
2348 dlg = EricSslCertificateSelectionDialog(certificates, self) |
|
2349 if dlg.exec() == QDialog.DialogCode.Accepted: |
|
2350 certificate = dlg.getSelectedCertificate() |
|
2351 |
|
2352 if certificate is None: |
|
2353 clientCertificateSelection.selectNone() |
|
2354 else: |
|
2355 clientCertificateSelection.select(certificate) |
|
2356 |
2352 |
2357 ########################################################################### |
2353 ########################################################################### |
2358 ## Methods below implement slots for Qt 6.4+ |
2354 ## Methods below implement slots for Qt 6.4+ |
2359 ########################################################################### |
2355 ########################################################################### |
2360 |
2356 |