25 except ImportError: |
25 except ImportError: |
26 SSL_AVAILABLE = False |
26 SSL_AVAILABLE = False |
27 |
27 |
28 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
28 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
29 from .NetworkUrlInterceptor import NetworkUrlInterceptor |
29 from .NetworkUrlInterceptor import NetworkUrlInterceptor |
30 from ..Tools.WebBrowserTools import readAllFileContents, pixmapToDataUrl |
30 from ..Tools.WebBrowserTools import getHtmlPage, pixmapToDataUrl |
31 |
31 |
32 from Utilities.AutoSaver import AutoSaver |
32 from Utilities.AutoSaver import AutoSaver |
33 import Preferences |
33 import Preferences |
34 |
34 |
35 |
35 |
323 @param page reference to the page |
323 @param page reference to the page |
324 @type QWebEnginePage |
324 @type QWebEnginePage |
325 @param url reference to the URL requesting authentication |
325 @param url reference to the URL requesting authentication |
326 @type QUrl |
326 @type QUrl |
327 """ |
327 """ |
328 html = readAllFileContents(":/html/authenticationErrorPage.html") |
328 html = getHtmlPage("authenticationErrorPage.html") |
329 html = html.replace("@IMAGE@", pixmapToDataUrl( |
329 html = html.replace("@IMAGE@", pixmapToDataUrl( |
330 qApp.style().standardIcon(QStyle.SP_MessageBoxCritical).pixmap( |
330 qApp.style().standardIcon(QStyle.SP_MessageBoxCritical).pixmap( |
331 48, 48)).toString()) |
331 48, 48)).toString()) |
332 html = html.replace("@FAVICON@", pixmapToDataUrl( |
332 html = html.replace("@FAVICON@", pixmapToDataUrl( |
333 qApp.style() .standardIcon(QStyle.SP_MessageBoxCritical).pixmap( |
333 qApp.style() .standardIcon(QStyle.SP_MessageBoxCritical).pixmap( |