--- a/src/eric7/WebBrowser/WebBrowserWindow.py Wed Dec 18 16:51:10 2024 +0100 +++ b/src/eric7/WebBrowser/WebBrowserWindow.py Wed Dec 18 16:52:16 2024 +0100 @@ -4294,7 +4294,16 @@ """ Private slot to show the feature permission dialog. """ - self.featurePermissionManager().showFeaturePermissionsDialog(self) + if QtUtilities.qVersionTuple() >= (6, 8, 0): + # Qt 6.8+ + from .FeaturePermissions.FeaturePermissionsDialog import FeaturePermissionsDialog + + dlg = FeaturePermissionsDialog(self.webProfile().listAllPermissions(), parent=self) + if dlg.exec() == QDialog.DialogCode.Accepted: + dlg.persistChanges() + else: + # Qt <6.8 + self.featurePermissionManager().showFeaturePermissionsDialog(self) @pyqtSlot() def __showZoomValuesDialog(self): @@ -5392,9 +5401,9 @@ if cls._webProfile is None: if private: - cls._webProfile = QWebEngineProfile() + cls._webProfile = QWebEngineProfile.defaultProfile() else: - cls._webProfile = QWebEngineProfile.defaultProfile() + cls._webProfile = QWebEngineProfile("eric7") cls._webProfile.downloadRequested.connect(cls.downloadRequested) # add the default user agent string @@ -5439,6 +5448,9 @@ Preferences.getWebBrowser("SpellCheckLanguages") ) + # TODO: setPersistentPermissionPolicy for Qt 6.8+ + # setting key: "NoPersistentPermissions" for non-private only + # configure notifications cls._webProfile.setNotificationPresenter(cls.__showWebNotification)