eric7/WebBrowser/SafeBrowsing/SafeBrowsingDialog.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
--- a/eric7/WebBrowser/SafeBrowsing/SafeBrowsingDialog.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/WebBrowser/SafeBrowsing/SafeBrowsingDialog.py	Sat May 22 18:51:46 2021 +0200
@@ -12,8 +12,8 @@
     QDialog, QDialogButtonBox, QAbstractButton
 )
 
-from E5Gui import E5MessageBox
-from E5Gui.E5OverrideCursor import E5OverrideCursor
+from E5Gui import EricMessageBox
+from E5Gui.EricOverrideCursor import EricOverrideCursor
 
 from .Ui_SafeBrowsingDialog import Ui_SafeBrowsingDialog
 
@@ -82,11 +82,11 @@
         browsing API key.".
         """
         if self.__gsbHelpDialog is None:
-            from E5Gui.E5SimpleHelpDialog import E5SimpleHelpDialog
+            from E5Gui.EricSimpleHelpDialog import EricSimpleHelpDialog
             from . import SafeBrowsingHelp
             
             helpStr = SafeBrowsingHelp()
-            self.__gsbHelpDialog = E5SimpleHelpDialog(
+            self.__gsbHelpDialog = EricSimpleHelpDialog(
                 title=self.tr("Google Safe Browsing API Help"),
                 helpStr=helpStr, parent=self)
         
@@ -170,7 +170,7 @@
         @rtype bool
         """
         if self.__isModified():
-            res = E5MessageBox.okToClearData(
+            res = EricMessageBox.okToClearData(
                 self,
                 self.tr("Safe Browsing Management"),
                 self.tr("""The dialog contains unsaved changes."""),
@@ -195,24 +195,24 @@
         """
         Private slot to update the local cache database.
         """
-        E5MessageBox.information(
+        EricMessageBox.information(
             self,
             self.tr("Update Safe Browsing Cache"),
             self.tr("""Updating the Safe Browsing cache might be a lengthy"""
                     """ operation. Please be patient!"""))
         
-        with E5OverrideCursor():
+        with EricOverrideCursor():
             ok, error = self.__manager.updateHashPrefixCache()
             self.__resetProgress()
         if not ok:
             if error:
-                E5MessageBox.critical(
+                EricMessageBox.critical(
                     self,
                     self.tr("Update Safe Browsing Cache"),
                     self.tr("""<p>Updating the Safe Browsing cache failed."""
                             """</p><p>Reason: {0}</p>""").format(error))
             else:
-                E5MessageBox.critical(
+                EricMessageBox.critical(
                     self,
                     self.tr("Update Safe Browsing Cache"),
                     self.tr("""<p>Updating the Safe Browsing cache failed."""
@@ -223,13 +223,13 @@
         """
         Private slot to clear the local cache database.
         """
-        res = E5MessageBox.yesNo(
+        res = EricMessageBox.yesNo(
             self,
             self.tr("Clear Safe Browsing Cache"),
             self.tr("""Do you really want to clear the Safe Browsing cache?"""
                     """ Re-populating it might take some time."""))
         if res:
-            with E5OverrideCursor():
+            with EricOverrideCursor():
                 self.__manager.fullCacheCleanup()
     
     @pyqtSlot(str, int)
@@ -295,7 +295,7 @@
         threatLists, error = self.__manager.lookupUrl(url)
         
         if error:
-            E5MessageBox.warning(
+            EricMessageBox.warning(
                 self,
                 self.tr("Check URL"),
                 self.tr("<p>The Google Safe Browsing Server reported an"
@@ -303,7 +303,7 @@
             )
         elif threatLists:
             threatMessages = self.__manager.getThreatMessages(threatLists)
-            E5MessageBox.warning(
+            EricMessageBox.warning(
                 self,
                 self.tr("Check URL"),
                 self.tr("<p>The URL <b>{0}</b> was found in the Safe"
@@ -311,7 +311,7 @@
                     urlStr, "".join(threatMessages))
             )
         else:
-            E5MessageBox.information(
+            EricMessageBox.information(
                 self,
                 self.tr("Check URL"),
                 self.tr("<p>The URL <b>{0}</b> was not found in the Safe"
@@ -343,7 +343,7 @@
                 nextUpdateDateTime.toString("yyyy-MM-dd, HH:mm:ss"))
         )
         
-        E5MessageBox.information(
+        EricMessageBox.information(
             self,
             self.tr("Update Time"),
             message)

eric ide

mercurial