src/eric7/WebBrowser/WebBrowserWindow.py

branch
eric7
changeset 11103
382e5c9a43f0
parent 11102
ceabb30155b8
child 11104
683af9c45c5b
equal deleted inserted replaced
11102:ceabb30155b8 11103:382e5c9a43f0
4174 """ 4174 """
4175 Private slot to clear the private data. 4175 Private slot to clear the private data.
4176 """ 4176 """
4177 from .WebBrowserClearPrivateDataDialog import WebBrowserClearPrivateDataDialog 4177 from .WebBrowserClearPrivateDataDialog import WebBrowserClearPrivateDataDialog
4178 4178
4179 # TODO: add entry "Website Permissions"
4179 dlg = WebBrowserClearPrivateDataDialog(parent=self) 4180 dlg = WebBrowserClearPrivateDataDialog(parent=self)
4180 if dlg.exec() == QDialog.DialogCode.Accepted: 4181 if dlg.exec() == QDialog.DialogCode.Accepted:
4181 # browsing history, search history, favicons, disk cache, cookies, 4182 # browsing history, search history, favicons, disk cache, cookies,
4182 # passwords, web databases, downloads, zoom values, SSL error 4183 # passwords, web databases, downloads, zoom values, SSL error
4183 # exceptions, history period 4184 # exceptions, history period
4218 self.passwordManager().clear() 4219 self.passwordManager().clear()
4219 if zoomValues: 4220 if zoomValues:
4220 ZoomManager.instance().clear() 4221 ZoomManager.instance().clear()
4221 if sslExceptions: 4222 if sslExceptions:
4222 self.networkManager().clearSslExceptions() 4223 self.networkManager().clearSslExceptions()
4224 # TODO: add entry "Website Permissions"
4223 4225
4224 @pyqtSlot() 4226 @pyqtSlot()
4225 def __showEnginesConfigurationDialog(self): 4227 def __showEnginesConfigurationDialog(self):
4226 """ 4228 """
4227 Private slot to show the search engines configuration dialog. 4229 Private slot to show the search engines configuration dialog.
5437 with contextlib.suppress(AttributeError): 5439 with contextlib.suppress(AttributeError):
5438 # Qt 6.5+ 5440 # Qt 6.5+
5439 cls._webProfile.setPushServiceEnabled( 5441 cls._webProfile.setPushServiceEnabled(
5440 Preferences.getWebBrowser("PushServiceEnabled") 5442 Preferences.getWebBrowser("PushServiceEnabled")
5441 ) 5443 )
5444 with contextlib.suppress(AttributeError):
5445 # Qt 6.8+
5446 cls._webProfile.setPersistentPermissionsPolicy(
5447 QWebEngineProfile.PersistentPermissionsPolicy.StoreInMemory
5448 if Preferences.getWebBrowser("NoPersistentPermissions")
5449 else QWebEngineProfile.PersistentPermissionsPolicy.StoreOnDisk
5450 )
5442 5451
5443 with contextlib.suppress(AttributeError): 5452 with contextlib.suppress(AttributeError):
5444 cls._webProfile.setSpellCheckEnabled( 5453 cls._webProfile.setSpellCheckEnabled(
5445 Preferences.getWebBrowser("SpellCheckEnabled") 5454 Preferences.getWebBrowser("SpellCheckEnabled")
5446 ) 5455 )
5447 cls._webProfile.setSpellCheckLanguages( 5456 cls._webProfile.setSpellCheckLanguages(
5448 Preferences.getWebBrowser("SpellCheckLanguages") 5457 Preferences.getWebBrowser("SpellCheckLanguages")
5449 ) 5458 )
5450
5451 # TODO: setPersistentPermissionPolicy for Qt 6.8+
5452 # setting key: "NoPersistentPermissions" for non-private only
5453 5459
5454 # configure notifications 5460 # configure notifications
5455 cls._webProfile.setNotificationPresenter(cls.__showWebNotification) 5461 cls._webProfile.setNotificationPresenter(cls.__showWebNotification)
5456 5462
5457 # Setup QWebChannel user scripts 5463 # Setup QWebChannel user scripts

eric ide

mercurial