diff -r 8a7677a63c8d -r 68ec9c3d4de5 eric7/WebBrowser/WebBrowserTabWidget.py --- a/eric7/WebBrowser/WebBrowserTabWidget.py Sat May 22 17:01:51 2021 +0200 +++ b/eric7/WebBrowser/WebBrowserTabWidget.py Sat May 22 18:51:46 2021 +0200 @@ -16,10 +16,10 @@ ) from PyQt6.QtPrintSupport import QPrinter, QPrintDialog, QAbstractPrintDialog -from E5Gui.E5TabWidget import E5TabWidget -from E5Gui import E5MessageBox -from E5Gui.E5Application import e5App -from E5Gui.E5OverrideCursor import E5OverrideCursor +from E5Gui.EricTabWidget import EricTabWidget +from E5Gui import EricMessageBox +from E5Gui.EricApplication import ericApp +from E5Gui.EricOverrideCursor import EricOverrideCursor from .WebBrowserView import WebBrowserView from .WebBrowserPage import WebBrowserPage @@ -50,7 +50,7 @@ return False -class WebBrowserTabWidget(E5TabWidget): +class WebBrowserTabWidget(EricTabWidget): """ Class implementing the central widget showing the web pages. @@ -703,15 +703,15 @@ filePath, pageLayout = dlg.getData() if filePath: if os.path.exists(filePath): - res = E5MessageBox.warning( + res = EricMessageBox.warning( self, self.tr("Print to PDF"), self.tr("""<p>The file <b>{0}</b> exists""" """ already. Shall it be""" """ overwritten?</p>""").format(filePath), - E5MessageBox.No | E5MessageBox.Yes, - E5MessageBox.No) - if res == E5MessageBox.No: + EricMessageBox.No | EricMessageBox.Yes, + EricMessageBox.No) + if res == EricMessageBox.No: return browser.page().printToPdf( lambda pdf: self.__pdfGeneratedForSave(filePath, pdf), @@ -751,13 +751,13 @@ pdfFile.write(pdfData) pdfFile.close() if pdfFile.error() != QFileDevice.FileError.NoError: - E5MessageBox.critical( + EricMessageBox.critical( self, self.tr("Print to PDF"), self.tr("""<p>The PDF could not be written to file <b>{0}""" """</b>.</p><p><b>Error:</b> {1}</p>""").format( filePath, pdfFile.errorString()), - E5MessageBox.Ok) + EricMessageBox.Ok) @pyqtSlot() def printPreviewBrowser(self, browser=None): @@ -807,7 +807,7 @@ @param browser reference to the browser to be printed @type WebBrowserView """ - with E5OverrideCursor(): + with EricOverrideCursor(): browser.page().execPrintPage(printer, 10 * 1000) def __sourceChanged(self, url, browser): @@ -959,20 +959,20 @@ """ if self.count() > 1 and Preferences.getWebBrowser( "WarnOnMultipleClose"): - mb = E5MessageBox.E5MessageBox( - E5MessageBox.Information, + mb = EricMessageBox.EricMessageBox( + EricMessageBox.Information, self.tr("Are you sure you want to close the window?"), self.tr("""Are you sure you want to close the window?\n""" """You have %n tab(s) open.""", "", self.count()), modal=True, parent=self) quitButton = mb.addButton( - self.tr("&Quit"), E5MessageBox.AcceptRole) + self.tr("&Quit"), EricMessageBox.AcceptRole) quitButton.setIcon(UI.PixmapCache.getIcon("exit")) closeTabButton = mb.addButton( - self.tr("C&lose Current Tab"), E5MessageBox.AcceptRole) + self.tr("C&lose Current Tab"), EricMessageBox.AcceptRole) closeTabButton.setIcon(UI.PixmapCache.getIcon("tabClose")) - mb.addButton(E5MessageBox.Cancel) + mb.addButton(EricMessageBox.Cancel) mb.exec() if mb.clickedButton() == quitButton: return True @@ -1023,7 +1023,7 @@ @type UrlBar """ url = self.__guessUrlFromPath(edit.text()) - if e5App().keyboardModifiers() == Qt.KeyboardModifier.AltModifier: + if ericApp().keyboardModifiers() == Qt.KeyboardModifier.AltModifier: self.newBrowser(url) else: self.currentBrowser().setSource(url)