Fri, 27 Sep 2024 17:27:11 +0200
Refactored some packages, modules and code to allow extracting the 'EricXxx' packages into a library project.
--- a/eric7.epj Fri Sep 27 11:00:27 2024 +0200 +++ b/eric7.epj Fri Sep 27 17:27:11 2024 +0200 @@ -1248,6 +1248,7 @@ "src/eric7/EricNetwork/data/__init__.py", "src/eric7/EricUtilities/EricCache.py", "src/eric7/EricUtilities/EricMutexLocker.py", + "src/eric7/EricUtilities/EricPasswordChecker.py", "src/eric7/EricUtilities/__init__.py", "src/eric7/EricUtilities/crypto/__init__.py", "src/eric7/EricUtilities/crypto/py3AES.py", @@ -2674,7 +2675,6 @@ "src/eric7/Utilities/MimeTypes.py", "src/eric7/Utilities/ModuleParser.py", "src/eric7/Utilities/MouseUtilities.py", - "src/eric7/Utilities/PasswordChecker.py", "src/eric7/Utilities/__init__.py", "src/eric7/Utilities/uic.py", "src/eric7/VCS/CommandOptionsDialog.py",
--- a/src/eric7/APIs/Python3/eric7.api Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/APIs/Python3/eric7.api Fri Sep 27 17:27:11 2024 +0200 @@ -1109,12 +1109,12 @@ eric7.EricCore.EricFileSystemWatcher._GlobalFileSystemWatcher?8 eric7.EricCore.EricFileSystemWatcher.instance?4() eric7.EricCore.EricPreferences.EricPreferences.proxyDefaults?7 -eric7.EricCore.EricPreferences._settingsNameGlobal?8 -eric7.EricCore.EricPreferences._settingsNameOrganization?8 eric7.EricCore.EricPreferences.convertPasswords?4(oldPassword, newPassword) eric7.EricCore.EricPreferences.getNetworkProxy?4(key) eric7.EricCore.EricPreferences.initPreferences?4() eric7.EricCore.EricPreferences.setNetworkProxy?4(key, value) +eric7.EricCore.EricPreferences.settingsNameGlobal?7 +eric7.EricCore.EricPreferences.settingsNameOrganization?7 eric7.EricCore.EricPreferences.syncPreferences?4() eric7.EricCore.EricProcess.EricProcess.failed?7 eric7.EricCore.EricProcess.EricProcess.succeeded?7 @@ -1374,6 +1374,16 @@ eric7.EricUtilities.EricCache.EricCache.setSize?4(newSize) eric7.EricUtilities.EricCache.EricCache?1(size=100) eric7.EricUtilities.EricMutexLocker.EricMutexLocker?1(mutex) +eric7.EricUtilities.EricPasswordChecker.PasswordCheckStatus.Exceeded?7 +eric7.EricUtilities.EricPasswordChecker.PasswordCheckStatus.Failed?7 +eric7.EricUtilities.EricPasswordChecker.PasswordCheckStatus.Passed?7 +eric7.EricUtilities.EricPasswordChecker.PasswordChecker.checkPassword?4(password) +eric7.EricUtilities.EricPasswordChecker.PasswordChecker?1() +eric7.EricUtilities.EricPasswordChecker.PasswordStrength.Good?7 +eric7.EricUtilities.EricPasswordChecker.PasswordStrength.Strong?7 +eric7.EricUtilities.EricPasswordChecker.PasswordStrength.VeryStrong?7 +eric7.EricUtilities.EricPasswordChecker.PasswordStrength.VeryWeak?7 +eric7.EricUtilities.EricPasswordChecker.PasswordStrength.Weak?7 eric7.EricUtilities._configDir?8 eric7.EricUtilities._escape?8 eric7.EricUtilities._escape_map?8 @@ -1500,12 +1510,13 @@ eric7.EricWidgets.EricErrorMessage._defaultFilters?8 eric7.EricWidgets.EricErrorMessage._filterSettings?8 eric7.EricWidgets.EricErrorMessage._msgHandlerDialog?8 +eric7.EricWidgets.EricErrorMessage._msgHandlerMinSeverity?8 eric7.EricWidgets.EricErrorMessage._origMsgHandler?8 eric7.EricWidgets.EricErrorMessage.editMessageFilters?4() eric7.EricWidgets.EricErrorMessage.filterMessage?4(message) eric7.EricWidgets.EricErrorMessage.messageHandler?4(msgType, context, message) eric7.EricWidgets.EricErrorMessage.messageHandlerInstalled?4() -eric7.EricWidgets.EricErrorMessage.qtHandler?4() +eric7.EricWidgets.EricErrorMessage.qtHandler?4(minSeverity) eric7.EricWidgets.EricErrorMessageFilterDialog.EricErrorMessageFilterDialog.getFilters?4() eric7.EricWidgets.EricErrorMessageFilterDialog.EricErrorMessageFilterDialog?1(messageFilters, parent=None) eric7.EricWidgets.EricFileDialog.DontConfirmOverwrite?7 @@ -1618,7 +1629,7 @@ eric7.EricWidgets.EricListView.EricListView.keyPressEvent?4(evt) eric7.EricWidgets.EricListView.EricListView.removeAll?4() eric7.EricWidgets.EricListView.EricListView.removeSelected?4() -eric7.EricWidgets.EricMainWindow.EricMainWindow.setStyle?4(styleName, styleSheetFile) +eric7.EricWidgets.EricMainWindow.EricMainWindow.setStyle?4(styleName, styleSheetFile, itemClickBehavior="default") eric7.EricWidgets.EricMainWindow.EricMainWindow?1(parent=None) eric7.EricWidgets.EricMapWidget.EricMapWidget._paintIt?5(painter) eric7.EricWidgets.EricMapWidget.EricMapWidget.backgroundColor?4() @@ -1845,11 +1856,12 @@ eric7.EricWidgets.EricProcessDialog.EricProcessDialog.on_passwordCheckBox_toggled?4(isOn) eric7.EricWidgets.EricProcessDialog.EricProcessDialog.on_sendButton_clicked?4() eric7.EricWidgets.EricProcessDialog.EricProcessDialog.startProcess?4(program, args, workingDir=None, showArgs=True, environment=None) -eric7.EricWidgets.EricProcessDialog.EricProcessDialog?1(outputTitle="", windowTitle="", showProgress=False, showInput=True, combinedOutput=False, parent=None, ) +eric7.EricWidgets.EricProcessDialog.EricProcessDialog?1(outputTitle="", windowTitle="", showProgress=False, showInput=True, combinedOutput=False, monospacedFont=None, encoding="utf-8", parent=None, ) eric7.EricWidgets.EricProgressDialog.EricProgressDialog.format?4() eric7.EricWidgets.EricProgressDialog.EricProgressDialog.setFormat?4(labelFormat) eric7.EricWidgets.EricProgressDialog.EricProgressDialog?1(labelText, cancelButtonText, minimum, maximum, labelFormat=None, parent=None, flags=None, ) eric7.EricWidgets.EricProxyStyle.EricProxyStyle.styleHint?4(hint, option=None, widget=None, returnData=None) +eric7.EricWidgets.EricProxyStyle.EricProxyStyle?1(style=None, itemClickBehavior="default") eric7.EricWidgets.EricSideBar.EricSideBar.Version?7 eric7.EricWidgets.EricSideBar.EricSideBar.addTab?4(widget, icon, label=None) eric7.EricWidgets.EricSideBar.EricSideBar.barSize?4() @@ -2035,7 +2047,6 @@ eric7.EricWidgets.EricToolBarManager.EricToolBarManager.isDefaultToolBar?4(toolBar) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.isWidgetAction?4(action) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.mainWindow?4() -eric7.EricWidgets.EricToolBarManager.EricToolBarManager.preferencesChanged?4() eric7.EricWidgets.EricToolBarManager.EricToolBarManager.removeAction?4(action) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.removeCategoryActions?4(category) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.removeToolBar?4(toolBar) @@ -2045,6 +2056,7 @@ eric7.EricWidgets.EricToolBarManager.EricToolBarManager.resetToolBar?4(toolBar) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.restoreState?4(state, version=0) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.saveState?4(version=0) +eric7.EricWidgets.EricToolBarManager.EricToolBarManager.setIconSize?4(iconSize) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.setMainWindow?4(mainWindow) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.setToolBar?4(toolBar, actions) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.setToolBars?4(toolBars) @@ -2053,7 +2065,7 @@ eric7.EricWidgets.EricToolBarManager.EricToolBarManager.toolBarWidgetAction?4(action) eric7.EricWidgets.EricToolBarManager.EricToolBarManager.toolBars?4() eric7.EricWidgets.EricToolBarManager.EricToolBarManager.toolBarsActions?4() -eric7.EricWidgets.EricToolBarManager.EricToolBarManager?1(ui=None, parent=None) +eric7.EricWidgets.EricToolBarManager.EricToolBarManager?1(ui=None, iconSize="", parent=None) eric7.EricWidgets.EricToolBox.EricHorizontalToolBox.addItem?4(widget, icon, text) eric7.EricWidgets.EricToolBox.EricHorizontalToolBox.insertItem?4(index, widget, icon, text) eric7.EricWidgets.EricToolBox.EricHorizontalToolBox.removeItem?4(index) @@ -11351,16 +11363,6 @@ eric7.Utilities.ModuleParser.resetParsedModule?4(module, basename="") eric7.Utilities.ModuleParser.resetParsedModules?4() eric7.Utilities.MouseUtilities.MouseButtonModifier2String?4(modifiers, button) -eric7.Utilities.PasswordChecker.PasswordCheckStatus.Exceeded?7 -eric7.Utilities.PasswordChecker.PasswordCheckStatus.Failed?7 -eric7.Utilities.PasswordChecker.PasswordCheckStatus.Passed?7 -eric7.Utilities.PasswordChecker.PasswordChecker.checkPassword?4(password) -eric7.Utilities.PasswordChecker.PasswordChecker?1() -eric7.Utilities.PasswordChecker.PasswordStrength.Good?7 -eric7.Utilities.PasswordChecker.PasswordStrength.Strong?7 -eric7.Utilities.PasswordChecker.PasswordStrength.VeryStrong?7 -eric7.Utilities.PasswordChecker.PasswordStrength.VeryWeak?7 -eric7.Utilities.PasswordChecker.PasswordStrength.Weak?7 eric7.Utilities._percentReplacementFunc?5(matchobj) eric7.Utilities._slashmap?8 eric7.Utilities.codingBytes_regexps?7
--- a/src/eric7/Documentation/Help/source.qhp Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Help/source.qhp Fri Sep 27 17:27:11 2024 +0200 @@ -158,6 +158,7 @@ </section> <section title="eric7.EricUtilities.EricCache" ref="eric7.EricUtilities.EricCache.html" /> <section title="eric7.EricUtilities.EricMutexLocker" ref="eric7.EricUtilities.EricMutexLocker.html" /> + <section title="eric7.EricUtilities.EricPasswordChecker" ref="eric7.EricUtilities.EricPasswordChecker.html" /> <section title="eric7.EricUtilities.__init__" ref="eric7.EricUtilities.__init__.html" /> </section> <section title="eric7.EricWidgets" ref="index-eric7.EricWidgets.html"> @@ -1286,7 +1287,6 @@ <section title="eric7.Utilities.MimeTypes" ref="eric7.Utilities.MimeTypes.html" /> <section title="eric7.Utilities.ModuleParser" ref="eric7.Utilities.ModuleParser.html" /> <section title="eric7.Utilities.MouseUtilities" ref="eric7.Utilities.MouseUtilities.html" /> - <section title="eric7.Utilities.PasswordChecker" ref="eric7.Utilities.PasswordChecker.html" /> <section title="eric7.Utilities.__init__" ref="eric7.Utilities.__init__.html" /> <section title="eric7.Utilities.uic" ref="eric7.Utilities.uic.html" /> </section> @@ -5903,6 +5903,7 @@ <keyword name="EricPassivePopup.timeout" id="EricPassivePopup.timeout" ref="eric7.EricWidgets.EricPassivePopup.html#EricPassivePopup.timeout" /> <keyword name="EricPassivePopup.view" id="EricPassivePopup.view" ref="eric7.EricWidgets.EricPassivePopup.html#EricPassivePopup.view" /> <keyword name="EricPassivePopupStyle" id="EricPassivePopupStyle" ref="eric7.EricWidgets.EricPassivePopup.html#EricPassivePopupStyle" /> + <keyword name="EricPasswordChecker (Module)" id="EricPasswordChecker (Module)" ref="eric7.EricUtilities.EricPasswordChecker.html" /> <keyword name="EricPasswordMeter" id="EricPasswordMeter" ref="eric7.EricWidgets.EricPasswordMeter.html#EricPasswordMeter" /> <keyword name="EricPasswordMeter (Constructor)" id="EricPasswordMeter (Constructor)" ref="eric7.EricWidgets.EricPasswordMeter.html#EricPasswordMeter.__init__" /> <keyword name="EricPasswordMeter (Module)" id="EricPasswordMeter (Module)" ref="eric7.EricWidgets.EricPasswordMeter.html" /> @@ -6031,6 +6032,7 @@ <keyword name="EricProgressDialog.format" id="EricProgressDialog.format" ref="eric7.EricWidgets.EricProgressDialog.html#EricProgressDialog.format" /> <keyword name="EricProgressDialog.setFormat" id="EricProgressDialog.setFormat" ref="eric7.EricWidgets.EricProgressDialog.html#EricProgressDialog.setFormat" /> <keyword name="EricProxyStyle" id="EricProxyStyle" ref="eric7.EricWidgets.EricProxyStyle.html#EricProxyStyle" /> + <keyword name="EricProxyStyle (Constructor)" id="EricProxyStyle (Constructor)" ref="eric7.EricWidgets.EricProxyStyle.html#EricProxyStyle.__init__" /> <keyword name="EricProxyStyle (Module)" id="EricProxyStyle (Module)" ref="eric7.EricWidgets.EricProxyStyle.html" /> <keyword name="EricProxyStyle.styleHint" id="EricProxyStyle.styleHint" ref="eric7.EricWidgets.EricProxyStyle.html#EricProxyStyle.styleHint" /> <keyword name="EricRequestCategory" id="EricRequestCategory" ref="eric7.RemoteServer.EricRequestCategory.html#EricRequestCategory" /> @@ -6348,6 +6350,7 @@ <keyword name="EricSqueezeLabel.setText" id="EricSqueezeLabel.setText" ref="eric7.EricWidgets.EricSqueezeLabels.html#EricSqueezeLabel.setText" /> <keyword name="EricSqueezeLabelPath" id="EricSqueezeLabelPath" ref="eric7.EricWidgets.EricSqueezeLabels.html#EricSqueezeLabelPath" /> <keyword name="EricSqueezeLabelPath (Constructor)" id="EricSqueezeLabelPath (Constructor)" ref="eric7.EricWidgets.EricSqueezeLabels.html#EricSqueezeLabelPath.__init__" /> + <keyword name="EricSqueezeLabelPath.__compactPath" id="EricSqueezeLabelPath.__compactPath" ref="eric7.EricWidgets.EricSqueezeLabels.html#EricSqueezeLabelPath.__compactPath" /> <keyword name="EricSqueezeLabelPath.length" id="EricSqueezeLabelPath.length" ref="eric7.EricWidgets.EricSqueezeLabels.html#EricSqueezeLabelPath.length" /> <keyword name="EricSqueezeLabelPath.paintEvent" id="EricSqueezeLabelPath.paintEvent" ref="eric7.EricWidgets.EricSqueezeLabels.html#EricSqueezeLabelPath.paintEvent" /> <keyword name="EricSqueezeLabelPath.setPath" id="EricSqueezeLabelPath.setPath" ref="eric7.EricWidgets.EricSqueezeLabels.html#EricSqueezeLabelPath.setPath" /> @@ -6577,7 +6580,6 @@ <keyword name="EricToolBarManager.isDefaultToolBar" id="EricToolBarManager.isDefaultToolBar" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.isDefaultToolBar" /> <keyword name="EricToolBarManager.isWidgetAction" id="EricToolBarManager.isWidgetAction" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.isWidgetAction" /> <keyword name="EricToolBarManager.mainWindow" id="EricToolBarManager.mainWindow" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.mainWindow" /> - <keyword name="EricToolBarManager.preferencesChanged" id="EricToolBarManager.preferencesChanged" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.preferencesChanged" /> <keyword name="EricToolBarManager.removeAction" id="EricToolBarManager.removeAction" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.removeAction" /> <keyword name="EricToolBarManager.removeCategoryActions" id="EricToolBarManager.removeCategoryActions" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.removeCategoryActions" /> <keyword name="EricToolBarManager.removeToolBar" id="EricToolBarManager.removeToolBar" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.removeToolBar" /> @@ -6587,6 +6589,7 @@ <keyword name="EricToolBarManager.resetToolBar" id="EricToolBarManager.resetToolBar" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.resetToolBar" /> <keyword name="EricToolBarManager.restoreState" id="EricToolBarManager.restoreState" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.restoreState" /> <keyword name="EricToolBarManager.saveState" id="EricToolBarManager.saveState" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.saveState" /> + <keyword name="EricToolBarManager.setIconSize" id="EricToolBarManager.setIconSize" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.setIconSize" /> <keyword name="EricToolBarManager.setMainWindow" id="EricToolBarManager.setMainWindow" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.setMainWindow" /> <keyword name="EricToolBarManager.setToolBar" id="EricToolBarManager.setToolBar" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.setToolBar" /> <keyword name="EricToolBarManager.setToolBars" id="EricToolBarManager.setToolBars" ref="eric7.EricWidgets.EricToolBarManager.html#EricToolBarManager.setToolBars" /> @@ -12590,14 +12593,13 @@ <keyword name="Parser" id="Parser" ref="eric7.DataViews.CodeMetrics.html#Parser" /> <keyword name="Parser.__addToken" id="Parser.__addToken" ref="eric7.DataViews.CodeMetrics.html#Parser.__addToken" /> <keyword name="Parser.parse" id="Parser.parse" ref="eric7.DataViews.CodeMetrics.html#Parser.parse" /> - <keyword name="PasswordCheckStatus" id="PasswordCheckStatus" ref="eric7.Utilities.PasswordChecker.html#PasswordCheckStatus" /> - <keyword name="PasswordChecker" id="PasswordChecker" ref="eric7.Utilities.PasswordChecker.html#PasswordChecker" /> - <keyword name="PasswordChecker (Constructor)" id="PasswordChecker (Constructor)" ref="eric7.Utilities.PasswordChecker.html#PasswordChecker.__init__" /> - <keyword name="PasswordChecker (Module)" id="PasswordChecker (Module)" ref="eric7.Utilities.PasswordChecker.html" /> - <keyword name="PasswordChecker.__determineBinaryStatus" id="PasswordChecker.__determineBinaryStatus" ref="eric7.Utilities.PasswordChecker.html#PasswordChecker.__determineBinaryStatus" /> - <keyword name="PasswordChecker.__determineStatus" id="PasswordChecker.__determineStatus" ref="eric7.Utilities.PasswordChecker.html#PasswordChecker.__determineStatus" /> - <keyword name="PasswordChecker.__strReverse" id="PasswordChecker.__strReverse" ref="eric7.Utilities.PasswordChecker.html#PasswordChecker.__strReverse" /> - <keyword name="PasswordChecker.checkPassword" id="PasswordChecker.checkPassword" ref="eric7.Utilities.PasswordChecker.html#PasswordChecker.checkPassword" /> + <keyword name="PasswordCheckStatus" id="PasswordCheckStatus" ref="eric7.EricUtilities.EricPasswordChecker.html#PasswordCheckStatus" /> + <keyword name="PasswordChecker" id="PasswordChecker" ref="eric7.EricUtilities.EricPasswordChecker.html#PasswordChecker" /> + <keyword name="PasswordChecker (Constructor)" id="PasswordChecker (Constructor)" ref="eric7.EricUtilities.EricPasswordChecker.html#PasswordChecker.__init__" /> + <keyword name="PasswordChecker.__determineBinaryStatus" id="PasswordChecker.__determineBinaryStatus" ref="eric7.EricUtilities.EricPasswordChecker.html#PasswordChecker.__determineBinaryStatus" /> + <keyword name="PasswordChecker.__determineStatus" id="PasswordChecker.__determineStatus" ref="eric7.EricUtilities.EricPasswordChecker.html#PasswordChecker.__determineStatus" /> + <keyword name="PasswordChecker.__strReverse" id="PasswordChecker.__strReverse" ref="eric7.EricUtilities.EricPasswordChecker.html#PasswordChecker.__strReverse" /> + <keyword name="PasswordChecker.checkPassword" id="PasswordChecker.checkPassword" ref="eric7.EricUtilities.EricPasswordChecker.html#PasswordChecker.checkPassword" /> <keyword name="PasswordManager" id="PasswordManager" ref="eric7.WebBrowser.Passwords.PasswordManager.html#PasswordManager" /> <keyword name="PasswordManager (Constructor)" id="PasswordManager (Constructor)" ref="eric7.WebBrowser.Passwords.PasswordManager.html#PasswordManager.__init__" /> <keyword name="PasswordManager (Module)" id="PasswordManager (Module)" ref="eric7.WebBrowser.Passwords.PasswordManager.html" /> @@ -12642,7 +12644,7 @@ <keyword name="PasswordReader.__readPasswords" id="PasswordReader.__readPasswords" ref="eric7.WebBrowser.Passwords.PasswordReader.html#PasswordReader.__readPasswords" /> <keyword name="PasswordReader.__skipUnknownElement" id="PasswordReader.__skipUnknownElement" ref="eric7.WebBrowser.Passwords.PasswordReader.html#PasswordReader.__skipUnknownElement" /> <keyword name="PasswordReader.read" id="PasswordReader.read" ref="eric7.WebBrowser.Passwords.PasswordReader.html#PasswordReader.read" /> - <keyword name="PasswordStrength" id="PasswordStrength" ref="eric7.Utilities.PasswordChecker.html#PasswordStrength" /> + <keyword name="PasswordStrength" id="PasswordStrength" ref="eric7.EricUtilities.EricPasswordChecker.html#PasswordStrength" /> <keyword name="PasswordWriter" id="PasswordWriter" ref="eric7.WebBrowser.Passwords.PasswordWriter.html#PasswordWriter" /> <keyword name="PasswordWriter (Constructor)" id="PasswordWriter (Constructor)" ref="eric7.WebBrowser.Passwords.PasswordWriter.html#PasswordWriter.__init__" /> <keyword name="PasswordWriter (Module)" id="PasswordWriter (Module)" ref="eric7.WebBrowser.Passwords.PasswordWriter.html" /> @@ -21440,6 +21442,7 @@ <file>eric7.EricNetwork.EricUrlInfo.html</file> <file>eric7.EricUtilities.EricCache.html</file> <file>eric7.EricUtilities.EricMutexLocker.html</file> + <file>eric7.EricUtilities.EricPasswordChecker.html</file> <file>eric7.EricUtilities.__init__.html</file> <file>eric7.EricUtilities.crypto.__init__.html</file> <file>eric7.EricUtilities.crypto.py3AES.html</file> @@ -22356,7 +22359,6 @@ <file>eric7.Utilities.MimeTypes.html</file> <file>eric7.Utilities.ModuleParser.html</file> <file>eric7.Utilities.MouseUtilities.html</file> - <file>eric7.Utilities.PasswordChecker.html</file> <file>eric7.Utilities.__init__.html</file> <file>eric7.Utilities.uic.html</file> <file>eric7.VCS.CommandOptionsDialog.html</file>
--- a/src/eric7/Documentation/Source/eric7.EricCore.EricPreferences.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/eric7.EricCore.EricPreferences.html Fri Sep 27 17:27:11 2024 +0200 @@ -13,8 +13,8 @@ <h3>Global Attributes</h3> <table> -<tr><td>_settingsNameGlobal</td></tr> -<tr><td>_settingsNameOrganization</td></tr> +<tr><td>settingsNameGlobal</td></tr> +<tr><td>settingsNameOrganization</td></tr> </table> <h3>Classes</h3>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/eric7/Documentation/Source/eric7.EricUtilities.EricPasswordChecker.html Fri Sep 27 17:27:11 2024 +0200 @@ -0,0 +1,273 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.EricUtilities.EricPasswordChecker</title> +<meta charset="UTF-8"> +<link rel="stylesheet" href="styles.css"> +</head> +<body> +<a NAME="top" ID="top"></a> +<h1>eric7.EricUtilities.EricPasswordChecker</h1> +<p> +Module implementing a checker for password strength. +</p> + +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Classes</h3> +<table> +<tr> +<td><a href="#PasswordCheckStatus">PasswordCheckStatus</a></td> +<td>Class defining the status of a password check.</td> +</tr> +<tr> +<td><a href="#PasswordChecker">PasswordChecker</a></td> +<td>Class implementing a checker for password strength.</td> +</tr> +<tr> +<td><a href="#PasswordStrength">PasswordStrength</a></td> +<td>Class defining the password strength.</td> +</tr> +</table> + +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> + +<hr /> +<hr /> +<a NAME="PasswordCheckStatus" ID="PasswordCheckStatus"></a> +<h2>PasswordCheckStatus</h2> +<p> + Class defining the status of a password check. +</p> + +<h3>Derived from</h3> +enum.Enum +<h3>Class Attributes</h3> +<table> +<tr><td>Exceeded</td></tr> +<tr><td>Failed</td></tr> +<tr><td>Passed</td></tr> +</table> + +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + + +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="PasswordChecker" ID="PasswordChecker"></a> +<h2>PasswordChecker</h2> +<p> + Class implementing a checker for password strength. +</p> + +<h3>Derived from</h3> +None +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Methods</h3> +<table> +<tr> +<td><a href="#PasswordChecker.__init__">PasswordChecker</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#PasswordChecker.__determineBinaryStatus">__determineBinaryStatus</a></td> +<td>Private method to determine a binary status.</td> +</tr> +<tr> +<td><a href="#PasswordChecker.__determineStatus">__determineStatus</a></td> +<td>Private method to determine the status.</td> +</tr> +<tr> +<td><a href="#PasswordChecker.__strReverse">__strReverse</a></td> +<td>Private method to reverse a string.</td> +</tr> +<tr> +<td><a href="#PasswordChecker.checkPassword">checkPassword</a></td> +<td>Public method to check a given password.</td> +</tr> +</table> + +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + + +<a NAME="PasswordChecker.__init__" ID="PasswordChecker.__init__"></a> +<h4>PasswordChecker (Constructor)</h4> +<b>PasswordChecker</b>(<i></i>) +<p> + Constructor +</p> + +<a NAME="PasswordChecker.__determineBinaryStatus" ID="PasswordChecker.__determineBinaryStatus"></a> +<h4>PasswordChecker.__determineBinaryStatus</h4> +<b>__determineBinaryStatus</b>(<i>value</i>) +<p> + Private method to determine a binary status. +</p> + +<dl> + +<dt><i>value</i> (int)</dt> +<dd> +value to check +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +status +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +PasswordCheckStatus +</dd> +</dl> +<a NAME="PasswordChecker.__determineStatus" ID="PasswordChecker.__determineStatus"></a> +<h4>PasswordChecker.__determineStatus</h4> +<b>__determineStatus</b>(<i>value</i>) +<p> + Private method to determine the status. +</p> + +<dl> + +<dt><i>value</i> (int)</dt> +<dd> +value to check +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +status +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +PasswordCheckStatus +</dd> +</dl> +<a NAME="PasswordChecker.__strReverse" ID="PasswordChecker.__strReverse"></a> +<h4>PasswordChecker.__strReverse</h4> +<b>__strReverse</b>(<i>string</i>) +<p> + Private method to reverse a string. +</p> + +<dl> + +<dt><i>string</i> (str)</dt> +<dd> +string to be reversed +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +reversed string +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str +</dd> +</dl> +<a NAME="PasswordChecker.checkPassword" ID="PasswordChecker.checkPassword"></a> +<h4>PasswordChecker.checkPassword</h4> +<b>checkPassword</b>(<i>password</i>) +<p> + Public method to check a given password. +</p> + +<dl> + +<dt><i>password</i> (str)</dt> +<dd> +password to be checked +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +indication for the password strength +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +PasswordStrength +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="PasswordStrength" ID="PasswordStrength"></a> +<h2>PasswordStrength</h2> +<p> + Class defining the password strength. +</p> + +<h3>Derived from</h3> +enum.IntEnum +<h3>Class Attributes</h3> +<table> +<tr><td>Good</td></tr> +<tr><td>Strong</td></tr> +<tr><td>VeryStrong</td></tr> +<tr><td>VeryWeak</td></tr> +<tr><td>Weak</td></tr> +</table> + +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + + +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html>
--- a/src/eric7/Documentation/Source/eric7.EricWidgets.EricErrorMessage.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/eric7.EricWidgets.EricErrorMessage.html Fri Sep 27 17:27:11 2024 +0200 @@ -16,6 +16,7 @@ <tr><td>_defaultFilters</td></tr> <tr><td>_filterSettings</td></tr> <tr><td>_msgHandlerDialog</td></tr> +<tr><td>_msgHandlerMinSeverity</td></tr> <tr><td>_origMsgHandler</td></tr> </table> @@ -223,13 +224,20 @@ <hr /> <a NAME="qtHandler" ID="qtHandler"></a> <h2>qtHandler</h2> -<b>qtHandler</b>(<i></i>) +<b>qtHandler</b>(<i>minSeverity</i>) <p> Module function to install an EricErrorMessage dialog as the global message handler. </p> <dl> + +<dt><i>minSeverity</i> (int)</dt> +<dd> +minimum severity of messages to be shown +</dd> +</dl> +<dl> <dt>Return:</dt> <dd> reference to the message handler dialog
--- a/src/eric7/Documentation/Source/eric7.EricWidgets.EricMainWindow.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/eric7.EricWidgets.EricMainWindow.html Fri Sep 27 17:27:11 2024 +0200 @@ -83,7 +83,7 @@ </dl> <a NAME="EricMainWindow.setStyle" ID="EricMainWindow.setStyle"></a> <h4>EricMainWindow.setStyle</h4> -<b>setStyle</b>(<i>styleName, styleSheetFile</i>) +<b>setStyle</b>(<i>styleName, styleSheetFile, itemClickBehavior="default"</i>) <p> Public method to set the style of the interface. </p> @@ -99,6 +99,11 @@ name of a style sheet file to read to overwrite defaults of the given style </dd> +<dt><i>itemClickBehavior</i> (str (optional))</dt> +<dd> +string describing the item activation behavior (one of + "default", "doubleclick" or "singleclick") (defaults to "default") +</dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr />
--- a/src/eric7/Documentation/Source/eric7.EricWidgets.EricProcessDialog.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/eric7.EricWidgets.EricProcessDialog.html Fri Sep 27 17:27:11 2024 +0200 @@ -118,7 +118,7 @@ <a NAME="EricProcessDialog.__init__" ID="EricProcessDialog.__init__"></a> <h4>EricProcessDialog (Constructor)</h4> -<b>EricProcessDialog</b>(<i>outputTitle="", windowTitle="", showProgress=False, showInput=True, combinedOutput=False, parent=None, </i>) +<b>EricProcessDialog</b>(<i>outputTitle="", windowTitle="", showProgress=False, showInput=True, combinedOutput=False, monospacedFont=None, encoding="utf-8", parent=None, </i>) <p> Constructor </p> @@ -147,6 +147,16 @@ flag indicating to show output of the stderr channel in the main output pane (defaults to False) </dd> +<dt><i>monospacedFont</i> (QFont)</dt> +<dd> +font to be used (should be a monospaced one) (defaults + to None) +</dd> +<dt><i>encoding</i> (str (optional))</dt> +<dd> +encoding used for the communication with the process (defaults + to "utf-8") +</dd> <dt><i>parent</i> (QWidget (optional))</dt> <dd> reference to the parent widget (defaults to None)
--- a/src/eric7/Documentation/Source/eric7.EricWidgets.EricProxyStyle.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/eric7.EricWidgets.EricProxyStyle.html Fri Sep 27 17:27:11 2024 +0200 @@ -54,6 +54,10 @@ <h3>Methods</h3> <table> <tr> +<td><a href="#EricProxyStyle.__init__">EricProxyStyle</a></td> +<td>Constructor</td> +</tr> +<tr> <td><a href="#EricProxyStyle.styleHint">styleHint</a></td> <td>Public method returning a style hint for the given widget described by the provided style option.</td> </tr> @@ -65,6 +69,26 @@ </table> +<a NAME="EricProxyStyle.__init__" ID="EricProxyStyle.__init__"></a> +<h4>EricProxyStyle (Constructor)</h4> +<b>EricProxyStyle</b>(<i>style=None, itemClickBehavior="default"</i>) +<p> + Constructor +</p> + +<dl> + +<dt><i>style</i> (QStyle, str or None (optional))</dt> +<dd> +style object or style name or None for the default native style + (defaults to None) +</dd> +<dt><i>itemClickBehavior</i> (str (optional))</dt> +<dd> +string describing the item activation behavior (one of + "default", "doubleclick" or "singleclick") (defaults to "default") +</dd> +</dl> <a NAME="EricProxyStyle.styleHint" ID="EricProxyStyle.styleHint"></a> <h4>EricProxyStyle.styleHint</h4> <b>styleHint</b>(<i>hint, option=None, widget=None, returnData=None</i>)
--- a/src/eric7/Documentation/Source/eric7.EricWidgets.EricSqueezeLabels.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/eric7.EricWidgets.EricSqueezeLabels.html Fri Sep 27 17:27:11 2024 +0200 @@ -146,6 +146,10 @@ <td>Constructor</td> </tr> <tr> +<td><a href="#EricSqueezeLabelPath.__compactPath">__compactPath</a></td> +<td>Private method to return a compacted path fitting inside the label width.</td> +</tr> +<tr> <td><a href="#EricSqueezeLabelPath.length">length</a></td> <td>Public method to return the length of a text in pixels.</td> </tr> @@ -187,6 +191,25 @@ reference to the parent Widget </dd> </dl> +<a NAME="EricSqueezeLabelPath.__compactPath" ID="EricSqueezeLabelPath.__compactPath"></a> +<h4>EricSqueezeLabelPath.__compactPath</h4> +<b>__compactPath</b>(<i></i>) +<p> + Private method to return a compacted path fitting inside the label width. +</p> + +<dl> +<dt>Return:</dt> +<dd> +compacted path +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str +</dd> +</dl> <a NAME="EricSqueezeLabelPath.length" ID="EricSqueezeLabelPath.length"></a> <h4>EricSqueezeLabelPath.length</h4> <b>length</b>(<i>txt</i>)
--- a/src/eric7/Documentation/Source/eric7.EricWidgets.EricToolBarManager.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/eric7.EricWidgets.EricToolBarManager.html Fri Sep 27 17:27:11 2024 +0200 @@ -123,10 +123,6 @@ <td>Public method to get the reference to the main window.</td> </tr> <tr> -<td><a href="#EricToolBarManager.preferencesChanged">preferencesChanged</a></td> -<td>Public slot to handle a change of preferences.</td> -</tr> -<tr> <td><a href="#EricToolBarManager.removeAction">removeAction</a></td> <td>Public method to remove an action from the manager.</td> </tr> @@ -163,6 +159,10 @@ <td>Public method to save the state of the toolbar manager.</td> </tr> <tr> +<td><a href="#EricToolBarManager.setIconSize">setIconSize</a></td> +<td>Public method to set the icon size.</td> +</tr> +<tr> <td><a href="#EricToolBarManager.setMainWindow">setMainWindow</a></td> <td>Public method to set the reference to the main window.</td> </tr> @@ -204,20 +204,25 @@ <a NAME="EricToolBarManager.__init__" ID="EricToolBarManager.__init__"></a> <h4>EricToolBarManager (Constructor)</h4> -<b>EricToolBarManager</b>(<i>ui=None, parent=None</i>) +<b>EricToolBarManager</b>(<i>ui=None, iconSize="", parent=None</i>) <p> Constructor </p> <dl> -<dt><i>ui</i> (UI.UserInterface)</dt> +<dt><i>ui</i> (UI.UserInterface (optional))</dt> <dd> -reference to the user interface object +reference to the user interface object (defaults to None) </dd> -<dt><i>parent</i> (QObject)</dt> +<dt><i>iconSize</i> (str (optional))</dt> <dd> -reference to the parent object +string giving the icon size (one of the sizes defined by the + IconSizes dictionary) (defaults to "") +</dd> +<dt><i>parent</i> (QObject (optional))</dt> +<dd> +reference to the parent object (defaults to None) </dd> </dl> <a NAME="EricToolBarManager.__findAction" ID="EricToolBarManager.__findAction"></a> @@ -583,13 +588,6 @@ QMainWindow </dd> </dl> -<a NAME="EricToolBarManager.preferencesChanged" ID="EricToolBarManager.preferencesChanged"></a> -<h4>EricToolBarManager.preferencesChanged</h4> -<b>preferencesChanged</b>(<i></i>) -<p> - Public slot to handle a change of preferences. -</p> - <a NAME="EricToolBarManager.removeAction" ID="EricToolBarManager.removeAction"></a> <h4>EricToolBarManager.removeAction</h4> <b>removeAction</b>(<i>action</i>) @@ -742,6 +740,21 @@ QByteArray </dd> </dl> +<a NAME="EricToolBarManager.setIconSize" ID="EricToolBarManager.setIconSize"></a> +<h4>EricToolBarManager.setIconSize</h4> +<b>setIconSize</b>(<i>iconSize</i>) +<p> + Public method to set the icon size. +</p> + +<dl> + +<dt><i>iconSize</i> (str)</dt> +<dd> +string giving the icon size (one of the sizes defined by the + IconSizes dictionary) +</dd> +</dl> <a NAME="EricToolBarManager.setMainWindow" ID="EricToolBarManager.setMainWindow"></a> <h4>EricToolBarManager.setMainWindow</h4> <b>setMainWindow</b>(<i>mainWindow</i>)
--- a/src/eric7/Documentation/Source/eric7.Utilities.PasswordChecker.html Fri Sep 27 11:00:27 2024 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,273 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>eric7.Utilities.PasswordChecker</title> -<meta charset="UTF-8"> -<link rel="stylesheet" href="styles.css"> -</head> -<body> -<a NAME="top" ID="top"></a> -<h1>eric7.Utilities.PasswordChecker</h1> -<p> -Module implementing a checker for password strength. -</p> - -<h3>Global Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> - -<h3>Classes</h3> -<table> -<tr> -<td><a href="#PasswordCheckStatus">PasswordCheckStatus</a></td> -<td>Class defining the status of a password check.</td> -</tr> -<tr> -<td><a href="#PasswordChecker">PasswordChecker</a></td> -<td>Class implementing a checker for password strength.</td> -</tr> -<tr> -<td><a href="#PasswordStrength">PasswordStrength</a></td> -<td>Class defining the password strength.</td> -</tr> -</table> - -<h3>Functions</h3> -<table> -<tr><td>None</td></tr> -</table> - -<hr /> -<hr /> -<a NAME="PasswordCheckStatus" ID="PasswordCheckStatus"></a> -<h2>PasswordCheckStatus</h2> -<p> - Class defining the status of a password check. -</p> - -<h3>Derived from</h3> -enum.Enum -<h3>Class Attributes</h3> -<table> -<tr><td>Exceeded</td></tr> -<tr><td>Failed</td></tr> -<tr><td>Passed</td></tr> -</table> - -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<h3>Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - - -<div align="right"><a href="#top">Up</a></div> -<hr /> -<hr /> -<a NAME="PasswordChecker" ID="PasswordChecker"></a> -<h2>PasswordChecker</h2> -<p> - Class implementing a checker for password strength. -</p> - -<h3>Derived from</h3> -None -<h3>Class Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> - -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<h3>Methods</h3> -<table> -<tr> -<td><a href="#PasswordChecker.__init__">PasswordChecker</a></td> -<td>Constructor</td> -</tr> -<tr> -<td><a href="#PasswordChecker.__determineBinaryStatus">__determineBinaryStatus</a></td> -<td>Private method to determine a binary status.</td> -</tr> -<tr> -<td><a href="#PasswordChecker.__determineStatus">__determineStatus</a></td> -<td>Private method to determine the status.</td> -</tr> -<tr> -<td><a href="#PasswordChecker.__strReverse">__strReverse</a></td> -<td>Private method to reverse a string.</td> -</tr> -<tr> -<td><a href="#PasswordChecker.checkPassword">checkPassword</a></td> -<td>Public method to check a given password.</td> -</tr> -</table> - -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - - -<a NAME="PasswordChecker.__init__" ID="PasswordChecker.__init__"></a> -<h4>PasswordChecker (Constructor)</h4> -<b>PasswordChecker</b>(<i></i>) -<p> - Constructor -</p> - -<a NAME="PasswordChecker.__determineBinaryStatus" ID="PasswordChecker.__determineBinaryStatus"></a> -<h4>PasswordChecker.__determineBinaryStatus</h4> -<b>__determineBinaryStatus</b>(<i>value</i>) -<p> - Private method to determine a binary status. -</p> - -<dl> - -<dt><i>value</i> (int)</dt> -<dd> -value to check -</dd> -</dl> -<dl> -<dt>Return:</dt> -<dd> -status -</dd> -</dl> -<dl> -<dt>Return Type:</dt> -<dd> -PasswordCheckStatus -</dd> -</dl> -<a NAME="PasswordChecker.__determineStatus" ID="PasswordChecker.__determineStatus"></a> -<h4>PasswordChecker.__determineStatus</h4> -<b>__determineStatus</b>(<i>value</i>) -<p> - Private method to determine the status. -</p> - -<dl> - -<dt><i>value</i> (int)</dt> -<dd> -value to check -</dd> -</dl> -<dl> -<dt>Return:</dt> -<dd> -status -</dd> -</dl> -<dl> -<dt>Return Type:</dt> -<dd> -PasswordCheckStatus -</dd> -</dl> -<a NAME="PasswordChecker.__strReverse" ID="PasswordChecker.__strReverse"></a> -<h4>PasswordChecker.__strReverse</h4> -<b>__strReverse</b>(<i>string</i>) -<p> - Private method to reverse a string. -</p> - -<dl> - -<dt><i>string</i> (str)</dt> -<dd> -string to be reversed -</dd> -</dl> -<dl> -<dt>Return:</dt> -<dd> -reversed string -</dd> -</dl> -<dl> -<dt>Return Type:</dt> -<dd> -str -</dd> -</dl> -<a NAME="PasswordChecker.checkPassword" ID="PasswordChecker.checkPassword"></a> -<h4>PasswordChecker.checkPassword</h4> -<b>checkPassword</b>(<i>password</i>) -<p> - Public method to check a given password. -</p> - -<dl> - -<dt><i>password</i> (str)</dt> -<dd> -password to be checked -</dd> -</dl> -<dl> -<dt>Return:</dt> -<dd> -indication for the password strength -</dd> -</dl> -<dl> -<dt>Return Type:</dt> -<dd> -PasswordStrength -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /> -<hr /> -<a NAME="PasswordStrength" ID="PasswordStrength"></a> -<h2>PasswordStrength</h2> -<p> - Class defining the password strength. -</p> - -<h3>Derived from</h3> -enum.IntEnum -<h3>Class Attributes</h3> -<table> -<tr><td>Good</td></tr> -<tr><td>Strong</td></tr> -<tr><td>VeryStrong</td></tr> -<tr><td>VeryWeak</td></tr> -<tr><td>Weak</td></tr> -</table> - -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<h3>Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - - -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html>
--- a/src/eric7/Documentation/Source/index-eric7.EricUtilities.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/index-eric7.EricUtilities.html Fri Sep 27 17:27:11 2024 +0200 @@ -32,6 +32,10 @@ <td>Module implementing a context manager locking and unlocking a mutex.</td> </tr> <tr> +<td><a href="eric7.EricUtilities.EricPasswordChecker.html">EricPasswordChecker</a></td> +<td>Module implementing a checker for password strength.</td> +</tr> +<tr> <td><a href="eric7.EricUtilities.__init__.html">EricUtilities</a></td> <td>Package containing utility modules and functions.</td> </tr>
--- a/src/eric7/Documentation/Source/index-eric7.Utilities.html Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Documentation/Source/index-eric7.Utilities.html Fri Sep 27 17:27:11 2024 +0200 @@ -56,10 +56,6 @@ <td>Module implementing utility functions related to Mouse stuff.</td> </tr> <tr> -<td><a href="eric7.Utilities.PasswordChecker.html">PasswordChecker</a></td> -<td>Module implementing a checker for password strength.</td> -</tr> -<tr> <td><a href="eric7.Utilities.__init__.html">Utilities</a></td> <td>Package implementing various functions/classes needed everywhere within eric.</td> </tr>
--- a/src/eric7/EricCore/EricPreferences.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricCore/EricPreferences.py Fri Sep 27 17:27:11 2024 +0200 @@ -16,8 +16,8 @@ from eric7.EricUtilities.crypto import pwConvert # names of the various settings objects -_settingsNameOrganization = "Eric7" -_settingsNameGlobal = "eric7-lib" +settingsNameOrganization = "Eric7" +settingsNameGlobal = "eric7-lib" class EricPreferences: @@ -60,8 +60,8 @@ EricPreferences.settings = QSettings( QSettings.Format.IniFormat, QSettings.Scope.UserScope, - _settingsNameOrganization, - _settingsNameGlobal, + settingsNameOrganization, + settingsNameGlobal, QCoreApplication.instance(), ) if not sys.platform.startswith(("win", "cygwin")):
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/eric7/EricUtilities/EricPasswordChecker.py Fri Sep 27 17:27:11 2024 +0200 @@ -0,0 +1,693 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2011 - 2024 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing a checker for password strength. +""" + +import enum +import re + + +class PasswordStrength(enum.IntEnum): + """ + Class defining the password strength. + """ + + VeryWeak = 0 + Weak = 1 + Good = 2 + Strong = 3 + VeryStrong = 4 + + +class PasswordCheckStatus(enum.Enum): + """ + Class defining the status of a password check. + """ + + Failed = 0 + Passed = 1 + Exceeded = 2 + + +class PasswordChecker: + """ + Class implementing a checker for password strength. + """ + + def __init__(self): + """ + Constructor + """ + self.score = {"count": 0, "adjusted": 0, "beforeRedundancy": 0} + + # complexity index + self.complexity = { + "limits": [20, 50, 60, 80, 100], + "value": PasswordStrength.VeryWeak, + } + + # check categories follow + + # length of the password + self.passwordLength = { + "count": 0, + "minimum": 6, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.5, # per character bonus + "bonus": 10, # minimum reached? Get a bonus. + "penalty": -20, # if we stay under minimum, we get punished + } + + # recommended password length + self.recommendedPasswordLength = { + "count": 0, + "minimum": 8, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 1.2, + "bonus": 10, + "penalty": -10, + } + + # Basic requirements are: + # 1) Password Length + # 2) Uppercase letter use + # 3) Lowercase letter use + # 4) Numeric character use + # 5) Symbol use + self.basicRequirements = { + "count": 0, + "minimum": 3, # have to be matched to get the bonus + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 1.0, + "bonus": 10, + "penalty": -10, + } + + # how much redundancy is permitted, if the password is + # long enough. we will skip the redudancy penalty if this + # number is not exceeded (meaning redundancy < this number) + self.redundancy = { + "value": 1, # 1 means, not double characters, + # default to start + "permitted": 2.0, # 2 means, in average every character + # can occur twice + "status": PasswordCheckStatus.Failed, + "rating": 0, + } + + # number of uppercase letters, such as A-Z + self.uppercaseLetters = { + "count": 0, + "minimum": 1, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.0, + "bonus": 10, + "penalty": -10, + } + + # number of lowercase letters, such as a-z + self.lowercaseLetters = { + "count": 0, + "minimum": 1, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.0, + "bonus": 10, + "penalty": -10, + } + + # number of numeric characters + self.numerics = { + "count": 0, + "minimum": 1, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.0, + "bonus": 10, + "penalty": -10, + } + + # number of symbol characters + self.symbols = { + "count": 0, + "minimum": 1, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.0, + "bonus": 10, + "penalty": -10, + } + + # number of dedicated symbols in the middle + self.middleSymbols = { + "count": 0, + "minimum": 1, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.0, + "bonus": 10, + "penalty": -10, + } + + # number of dedicated numbers in the middle + self.middleNumerics = { + "count": 0, + "minimum": 1, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.0, + "bonus": 10, + "penalty": -10, + } + + # how many sequential characters should be checked + # such as "abc" or "MNO" to be not part of the password + self.sequentialLetters = { + "data": "abcdefghijklmnopqrstuvwxyz", + "length": 3, + "count": 0, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": -1.0, + "bonus": 0, + "penalty": -10, + } + + # how many sequential characters should be checked + # such as "123" to be not part of the password + self.sequentialNumerics = { + "data": "0123456789", + "length": 3, + "count": 0, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": -1.0, + "bonus": 0, + "penalty": -10, + } + + # keyboard patterns to check, typical sequences from your + # keyboard + self.keyboardPatterns = { + # German and English keyboard text + "data": [ + "qwertzuiop", + "asdfghjkl", + "yxcvbnm", + '!"§$%&/()=', # de + "1234567890", # de numbers + "qaywsxedcrfvtgbzhnujmik,ol.pö-üä+#", # de up-down + "qwertyuiop", + "asdfghjkl", + "zyxcvbnm", + "!@#$%^&*()_", # en + "1234567890", # en numbers + "qazwsxedcrfvtgbyhnujmik,ol.p;/[']\\", # en up-down + ], + "length": 4, # how long is the pattern to check and blame for? + "count": 0, # how many of these pattern can be found + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": -1.0, # each occurrence is punished with that factor + "bonus": 0, + "penalty": -10, + } + + # check for repeated sequences, like in catcat + self.repeatedSequences = { + "length": 3, + "count": 0, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.0, + "bonus": 0, + "penalty": -10, + } + + # check for repeated mirrored sequences, like in tactac + self.mirroredSequences = { + "length": 3, + "count": 0, + "status": PasswordCheckStatus.Failed, + "rating": 0, + "factor": 0.0, + "bonus": 0, + "penalty": -10, + } + + self.uppercaseRe = re.compile("[A-Z]") + self.lowercaseRe = re.compile("[a-z]") + self.numberRe = re.compile("[0-9]") + self.symbolRe = re.compile("[^a-zA-Z0-9]") + + def __strReverse(self, string): + """ + Private method to reverse a string. + + @param string string to be reversed + @type str + @return reversed string + @rtype str + """ + return "".join(reversed(string)) + + def __determineStatus(self, value): + """ + Private method to determine the status. + + @param value value to check + @type int + @return status + @rtype PasswordCheckStatus + """ + if value == 0: + return PasswordCheckStatus.Passed + elif value > 0: + return PasswordCheckStatus.Exceeded + else: + return PasswordCheckStatus.Failed + + def __determineBinaryStatus(self, value): + """ + Private method to determine a binary status. + + @param value value to check + @type int + @return status + @rtype PasswordCheckStatus + """ + if value == 0: + return PasswordCheckStatus.Passed + else: + return PasswordCheckStatus.Failed + + def checkPassword(self, password): + """ + Public method to check a given password. + + @param password password to be checked + @type str + @return indication for the password strength + @rtype PasswordStrength + """ + # how long is the password? + self.passwordLength["count"] = len(password) + self.recommendedPasswordLength["count"] = len(password) + + # Loop through password to check for Symbol, Numeric, Lowercase + # and Uppercase pattern matches + for index in range(len(password)): + if self.uppercaseRe.match(password[index]): + self.uppercaseLetters["count"] += 1 + elif self.lowercaseRe.match(password[index]): + self.lowercaseLetters["count"] += 1 + elif self.numberRe.match(password[index]): + if index > 0 and index < len(password) - 1: + self.middleNumerics["count"] += 1 + self.numerics["count"] += 1 + elif self.symbolRe.match(password[index]): + if index > 0 and index < len(password) - 1: + self.middleSymbols["count"] += 1 + self.symbols["count"] += 1 + + # check the variance of symbols or better the redundancy + # makes only sense for at least two characters + if len(password) > 1: + uniqueCharacters = [] + for index1 in range(len(password)): + found = False + for index2 in range(index1 + 1, len(password)): + if password[index1] == password[index2]: + found = True + break + if not found: + uniqueCharacters.append(password[index1]) + + # calculate a redundancy number + self.redundancy["value"] = len(password) / len(uniqueCharacters) + + # Check for sequential alpha string patterns (forward and reverse) + # but only, if the string has already a length to check for, does + # not make sense to check the password "ab" for the sequential data + # "abc" + lowercasedPassword = password.lower() + + if self.passwordLength["count"] >= self.sequentialLetters["length"]: + for index in range( + len(self.sequentialLetters["data"]) + - self.sequentialLetters["length"] + + 1 + ): + fwd = self.sequentialLetters["data"][ + index : index + self.sequentialLetters["length"] + ] + rev = self.__strReverse(fwd) + if lowercasedPassword.find(fwd) != -1: + self.sequentialLetters["count"] += 1 + if lowercasedPassword.find(rev) != -1: + self.sequentialLetters["count"] += 1 + + # Check for sequential numeric string patterns (forward and reverse) + if self.passwordLength["count"] >= self.sequentialNumerics["length"]: + for index in range( + len(self.sequentialNumerics["data"]) + - self.sequentialNumerics["length"] + + 1 + ): + fwd = self.sequentialNumerics["data"][ + index : index + self.sequentialNumerics["length"] + ] + rev = self.__strReverse(fwd) + if lowercasedPassword.find(fwd) != -1: + self.sequentialNumerics["count"] += 1 + if lowercasedPassword.find(rev) != -1: + self.sequentialNumerics["count"] += 1 + + # Check common keyboard patterns + patternsMatched = [] + if self.passwordLength["count"] >= self.keyboardPatterns["length"]: + for pattern in self.keyboardPatterns["data"]: + for index in range(len(pattern) - self.keyboardPatterns["length"] + 1): + fwd = pattern[index : index + self.keyboardPatterns["length"]] + rev = self.__strReverse(fwd) + if ( + lowercasedPassword.find(fwd) != -1 + and fwd not in patternsMatched + ): + self.keyboardPatterns["count"] += 1 + patternsMatched.append(fwd) + if ( + lowercasedPassword.find(rev) != -1 + and fwd not in patternsMatched + ): + self.keyboardPatterns["count"] += 1 + patternsMatched.append(rev) + + # Try to find repeated sequences of characters. + if self.passwordLength["count"] >= self.repeatedSequences["length"]: + for index in range( + len(lowercasedPassword) - self.repeatedSequences["length"] + 1 + ): + fwd = lowercasedPassword[ + index : index + self.repeatedSequences["length"] + ] + if ( + lowercasedPassword.find( + fwd, index + self.repeatedSequences["length"] + ) + != -1 + ): + self.repeatedSequences["count"] += 1 + + # Try to find mirrored sequences of characters. + if self.passwordLength["count"] >= self.mirroredSequences["length"]: + for index in range( + len(lowercasedPassword) - self.mirroredSequences["length"] + 1 + ): + fwd = lowercasedPassword[ + index : index + self.mirroredSequences["length"] + ] + rev = self.__strReverse(fwd) + if ( + lowercasedPassword.find( + fwd, index + self.mirroredSequences["length"] + ) + != -1 + ): + self.mirroredSequences["count"] += 1 + + # Initial score based on length + self.score["count"] = ( + self.passwordLength["count"] * self.passwordLength["factor"] + ) + + # passwordLength + # credit additional length or punish "under" length + if self.passwordLength["count"] >= self.passwordLength["minimum"]: + # credit additional characters over minimum + self.passwordLength["rating"] = ( + self.passwordLength["bonus"] + + (self.passwordLength["count"] - self.passwordLength["minimum"]) + * self.passwordLength["factor"] + ) + else: + self.passwordLength["rating"] = self.passwordLength["penalty"] + self.score["count"] += self.passwordLength["rating"] + + # recommendedPasswordLength + # Credit reaching the recommended password length or put a + # penalty on it + if self.passwordLength["count"] >= self.recommendedPasswordLength["minimum"]: + self.recommendedPasswordLength["rating"] = ( + self.recommendedPasswordLength["bonus"] + + ( + self.passwordLength["count"] + - self.recommendedPasswordLength["minimum"] + ) + * self.recommendedPasswordLength["factor"] + ) + else: + self.recommendedPasswordLength["rating"] = self.recommendedPasswordLength[ + "penalty" + ] + self.score["count"] += self.recommendedPasswordLength["rating"] + + # lowercaseLetters + # Honor or punish the lowercase letter use + if self.lowercaseLetters["count"] > 0: + self.lowercaseLetters["rating"] = ( + self.lowercaseLetters["bonus"] + + self.lowercaseLetters["count"] * self.lowercaseLetters["factor"] + ) + else: + self.lowercaseLetters["rating"] = self.lowercaseLetters["penalty"] + self.score["count"] += self.lowercaseLetters["rating"] + + # uppercaseLetters + # Honor or punish the lowercase letter use + if self.uppercaseLetters["count"] > 0: + self.uppercaseLetters["rating"] = ( + self.uppercaseLetters["bonus"] + + self.uppercaseLetters["count"] * self.uppercaseLetters["factor"] + ) + else: + self.uppercaseLetters["rating"] = self.uppercaseLetters["penalty"] + self.score["count"] += self.uppercaseLetters["rating"] + + # numerics + # Honor or punish the numerics use + if self.numerics["count"] > 0: + self.numerics["rating"] = ( + self.numerics["bonus"] + + self.numerics["count"] * self.numerics["factor"] + ) + else: + self.numerics["rating"] = self.numerics["penalty"] + self.score["count"] += self.numerics["rating"] + + # symbols + # Honor or punish the symbols use + if self.symbols["count"] > 0: + self.symbols["rating"] = ( + self.symbols["bonus"] + self.symbols["count"] * self.symbols["factor"] + ) + else: + self.symbols["rating"] = self.symbols["penalty"] + self.score["count"] += self.symbols["rating"] + + # middleSymbols + # Honor or punish the middle symbols use + if self.middleSymbols["count"] > 0: + self.middleSymbols["rating"] = ( + self.middleSymbols["bonus"] + + self.middleSymbols["count"] * self.middleSymbols["factor"] + ) + else: + self.middleSymbols["rating"] = self.middleSymbols["penalty"] + self.score["count"] += self.middleSymbols["rating"] + + # middleNumerics + # Honor or punish the middle numerics use + if self.middleNumerics["count"] > 0: + self.middleNumerics["rating"] = ( + self.middleNumerics["bonus"] + + self.middleNumerics["count"] * self.middleNumerics["factor"] + ) + else: + self.middleNumerics["rating"] = self.middleNumerics["penalty"] + self.score["count"] += self.middleNumerics["rating"] + + # sequentialLetters + # Honor or punish the sequential letter use + if self.sequentialLetters["count"] == 0: + self.sequentialLetters["rating"] = ( + self.sequentialLetters["bonus"] + + self.sequentialLetters["count"] * self.sequentialLetters["factor"] + ) + else: + self.sequentialLetters["rating"] = self.sequentialLetters["penalty"] + self.score["count"] += self.sequentialLetters["rating"] + + # sequentialNumerics + # Honor or punish the sequential numerics use + if self.sequentialNumerics["count"] == 0: + self.sequentialNumerics["rating"] = ( + self.sequentialNumerics["bonus"] + + self.sequentialNumerics["count"] * self.sequentialNumerics["factor"] + ) + else: + self.sequentialNumerics["rating"] = self.sequentialNumerics["penalty"] + self.score["count"] += self.sequentialNumerics["rating"] + + # keyboardPatterns + # Honor or punish the keyboard patterns use + if self.keyboardPatterns["count"] == 0: + self.keyboardPatterns["rating"] = ( + self.keyboardPatterns["bonus"] + + self.keyboardPatterns["count"] * self.keyboardPatterns["factor"] + ) + else: + self.keyboardPatterns["rating"] = self.keyboardPatterns["penalty"] + self.score["count"] += self.keyboardPatterns["rating"] + + # Count our basicRequirements and set the status + self.basicRequirements["count"] = 0 + + # password length + self.passwordLength["status"] = self.__determineStatus( + self.passwordLength["count"] - self.passwordLength["minimum"] + ) + if self.passwordLength["status"] != PasswordCheckStatus.Failed: + # requirement met + self.basicRequirements["count"] += 1 + + # uppercase letters + self.uppercaseLetters["status"] = self.__determineStatus( + self.uppercaseLetters["count"] - self.uppercaseLetters["minimum"] + ) + if self.uppercaseLetters["status"] != PasswordCheckStatus.Failed: + # requirement met + self.basicRequirements["count"] += 1 + + # lowercase letters + self.lowercaseLetters["status"] = self.__determineStatus( + self.lowercaseLetters["count"] - self.lowercaseLetters["minimum"] + ) + if self.lowercaseLetters["status"] != PasswordCheckStatus.Failed: + # requirement met + self.basicRequirements["count"] += 1 + + # numerics + self.numerics["status"] = self.__determineStatus( + self.numerics["count"] - self.numerics["minimum"] + ) + if self.numerics["status"] != PasswordCheckStatus.Failed: + # requirement met + self.basicRequirements["count"] += 1 + + # symbols + self.symbols["status"] = self.__determineStatus( + self.symbols["count"] - self.symbols["minimum"] + ) + if self.symbols["status"] != PasswordCheckStatus.Failed: + # requirement met + self.basicRequirements["count"] += 1 + + # judge the requirement status + self.basicRequirements["status"] = self.__determineStatus( + self.basicRequirements["count"] - self.basicRequirements["minimum"] + ) + if self.basicRequirements["status"] != PasswordCheckStatus.Failed: + self.basicRequirements["rating"] = ( + self.basicRequirements["bonus"] + + self.basicRequirements["factor"] * self.basicRequirements["count"] + ) + else: + self.basicRequirements["rating"] = self.basicRequirements["penalty"] + self.score["count"] += self.basicRequirements["rating"] + + # beyond basic requirements + self.recommendedPasswordLength["status"] = self.__determineStatus( + self.recommendedPasswordLength["count"] + - self.recommendedPasswordLength["minimum"] + ) + self.middleNumerics["status"] = self.__determineStatus( + self.middleNumerics["count"] - self.middleNumerics["minimum"] + ) + self.middleSymbols["status"] = self.__determineStatus( + self.middleSymbols["count"] - self.middleSymbols["minimum"] + ) + self.sequentialLetters["status"] = self.__determineBinaryStatus( + self.sequentialLetters["count"] + ) + self.sequentialNumerics["status"] = self.__determineBinaryStatus( + self.sequentialNumerics["count"] + ) + self.keyboardPatterns["status"] = self.__determineBinaryStatus( + self.keyboardPatterns["count"] + ) + self.repeatedSequences["status"] = self.__determineBinaryStatus( + self.repeatedSequences["count"] + ) + self.mirroredSequences["status"] = self.__determineBinaryStatus( + self.mirroredSequences["count"] + ) + + # we apply them only, if the length is not awesome + if self.recommendedPasswordLength["status"] != PasswordCheckStatus.Exceeded: + # repeatedSequences + # Honor or punish the use of repeated sequences + if self.repeatedSequences["count"] == 0: + self.repeatedSequences["rating"] = self.repeatedSequences["bonus"] + else: + self.repeatedSequences["rating"] = ( + self.repeatedSequences["penalty"] + + self.repeatedSequences["count"] * self.repeatedSequences["factor"] + ) + + # mirroredSequences + # Honor or punish the use of mirrored sequences + if self.mirroredSequences["count"] == 0: + self.mirroredSequences["rating"] = self.mirroredSequences["bonus"] + else: + self.mirroredSequences["rating"] = ( + self.mirroredSequences["penalty"] + + self.mirroredSequences["count"] * self.mirroredSequences["factor"] + ) + + # save value before redundancy + self.score["beforeRedundancy"] = self.score["count"] + + # apply the redundancy + # is the password length requirement fulfilled? + if ( + self.recommendedPasswordLength["status"] != PasswordCheckStatus.Exceeded + and self.score["count"] > 0 + ): + # full penalty, because password is not long enough, only for + # a positive score + self.score["count"] *= 1.0 / self.redundancy["value"] + + # level it out + if self.score["count"] > 100: + self.score["adjusted"] = 100 + elif self.score["count"] < 0: + self.score["adjusted"] = 0 + else: + self.score["adjusted"] = self.score["count"] + + # judge it + for index in range(len(self.complexity["limits"])): + if self.score["adjusted"] <= self.complexity["limits"][index]: + self.complexity["value"] = PasswordStrength(index) + break + + return self.complexity["value"]
--- a/src/eric7/EricWidgets/EricApplication.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricWidgets/EricApplication.py Fri Sep 27 17:27:11 2024 +0200 @@ -9,6 +9,7 @@ import contextlib import os +import pathlib import sys from PyQt6.QtCore import QCoreApplication, Qt @@ -18,8 +19,6 @@ if not QCoreApplication.testAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts): QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts, True) -from eric7.SystemUtilities import FileSystemUtilities - from . import EricMessageBox @@ -204,7 +203,11 @@ styleIconsPath = os.path.join(getConfig("ericIconDir"), "StyleIcons") if universal: - return FileSystemUtilities.fromNativeSeparators(styleIconsPath) + return ( + pathlib.PurePath(styleIconsPath).as_posix() + if bool(styleIconsPath) + else "" + ) else: return styleIconsPath
--- a/src/eric7/EricWidgets/EricErrorMessage.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricWidgets/EricErrorMessage.py Fri Sep 27 17:27:11 2024 +0200 @@ -20,16 +20,18 @@ ) from PyQt6.QtWidgets import QDialog, QErrorMessage -from eric7 import EricUtilities, Globals, Preferences, Utilities +from eric7 import EricUtilities +from eric7.EricCore import EricPreferences from eric7.EricWidgets.EricApplication import ericApp _msgHandlerDialog = None +_msgHandlerMinSeverity = None _origMsgHandler = None _filterSettings = QSettings( QSettings.Format.IniFormat, QSettings.Scope.UserScope, - Globals.settingsNameOrganization, + EricPreferences.settingsNameOrganization, "eric7messagefilters", ) _defaultFilters = [ @@ -121,7 +123,7 @@ @type bytes """ if _msgHandlerDialog: - if msgType.value < Preferences.getUI("MinimumMessageTypeSeverity"): + if msgType.value < _msgHandlerMinSeverity: # severity is lower than configured # just ignore the message return @@ -138,7 +140,7 @@ elif msgType == QtMsgType.QtFatalMsg: messageType = "Fatal Error:" if isinstance(message, bytes): - message = Utilities.decodeBytes(message) + message = EricUtilities.decodeBytes(message) if filterMessage(message): return message = ( @@ -195,21 +197,25 @@ ) -def qtHandler(): +def qtHandler(minSeverity): """ Module function to install an EricErrorMessage dialog as the global message handler. + @param minSeverity minimum severity of messages to be shown + @type int @return reference to the message handler dialog @rtype EricErrorMessage """ - global _msgHandlerDialog, _origMsgHandler + global _msgHandlerDialog, _msgHandlerMinSeverity, _origMsgHandler if _msgHandlerDialog is None: # Install an EricErrorMessage dialog as the global message handler. _msgHandlerDialog = EricErrorMessage() _origMsgHandler = qInstallMessageHandler(messageHandler) + _msgHandlerMinSeverity = minSeverity + return _msgHandlerDialog
--- a/src/eric7/EricWidgets/EricMainWindow.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricWidgets/EricMainWindow.py Fri Sep 27 17:27:11 2024 +0200 @@ -29,7 +29,7 @@ self.defaultStyleName = QApplication.style().objectName() - def setStyle(self, styleName, styleSheetFile): + def setStyle(self, styleName, styleSheetFile, itemClickBehavior="default"): """ Public method to set the style of the interface. @@ -38,6 +38,9 @@ @param styleSheetFile name of a style sheet file to read to overwrite defaults of the given style @type str + @param itemClickBehavior string describing the item activation behavior (one of + "default", "doubleclick" or "singleclick") (defaults to "default") + @type str (optional) """ # step 1: set the style style = None @@ -46,10 +49,9 @@ if style is None: style = QStyleFactory.create(self.defaultStyleName) - if style is None: - QApplication.setStyle(EricProxyStyle()) - else: - QApplication.setStyle(EricProxyStyle(style)) + QApplication.setStyle( + EricProxyStyle(style=style, itemClickBehavior=itemClickBehavior) + ) # step 2: set a style sheet ericApp().setStyleSheetFile(styleSheetFile)
--- a/src/eric7/EricWidgets/EricPasswordMeter.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricWidgets/EricPasswordMeter.py Fri Sep 27 17:27:11 2024 +0200 @@ -9,7 +9,7 @@ from PyQt6.QtWidgets import QProgressBar -from eric7.Utilities.PasswordChecker import PasswordChecker, PasswordStrength +from eric7.EricUtilities.EricPasswordChecker import PasswordChecker, PasswordStrength class EricPasswordMeter(QProgressBar):
--- a/src/eric7/EricWidgets/EricProcessDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricWidgets/EricProcessDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -18,9 +18,9 @@ QTimer, pyqtSlot, ) +from PyQt6.QtGui import QFont from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLineEdit -from eric7 import Preferences from eric7.EricUtilities import strToQByteArray from eric7.EricWidgets import EricMessageBox @@ -43,6 +43,8 @@ showProgress=False, showInput=True, combinedOutput=False, + monospacedFont=None, + encoding="utf-8", parent=None, ): """ @@ -60,6 +62,12 @@ @param combinedOutput flag indicating to show output of the stderr channel in the main output pane (defaults to False) @type bool (optional) + @param monospacedFont font to be used (should be a monospaced one) (defaults + to None) + @type QFont + @param encoding encoding used for the communication with the process (defaults + to "utf-8") + @type str (optional) @param parent reference to the parent widget (defaults to None) @type QWidget (optional) """ @@ -69,11 +77,14 @@ self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True) - font = Preferences.getEditorOtherFonts("MonospacedFont") - self.resultbox.setFontFamily(font.family()) - self.resultbox.setFontPointSize(font.pointSize()) - self.errors.setFontFamily(font.family()) - self.errors.setFontPointSize(font.pointSize()) + if monospacedFont is None: + monospacedFont = QFont("Monospace") + self.resultbox.setFontFamily(monospacedFont.family()) + self.resultbox.setFontPointSize(monospacedFont.pointSize()) + self.errors.setFontFamily(monospacedFont.family()) + self.errors.setFontPointSize(monospacedFont.pointSize()) + + self.__ioEncoding = encoding if windowTitle: self.setWindowTitle(windowTitle) @@ -247,7 +258,7 @@ if self.__process is not None: s = str( self.__process.readAllStandardOutput(), - Preferences.getSystem("IOEncoding"), + self.__ioEncoding, "replace", ) if self.__showProgress: @@ -272,7 +283,7 @@ if self.__process is not None: s = str( self.__process.readAllStandardError(), - Preferences.getSystem("IOEncoding"), + self.__ioEncoding, "replace", )
--- a/src/eric7/EricWidgets/EricProxyStyle.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricWidgets/EricProxyStyle.py Fri Sep 27 17:27:11 2024 +0200 @@ -11,8 +11,6 @@ from PyQt6.QtCore import Qt from PyQt6.QtWidgets import QApplication, QProxyStyle, QStyle -from eric7 import Preferences - class EricProxyStyle(QProxyStyle): """ @@ -20,6 +18,21 @@ platform default. """ + def __init__(self, style=None, itemClickBehavior="default"): + """ + Constructor + + @param style style object or style name or None for the default native style + (defaults to None) + @type QStyle, str or None (optional) + @param itemClickBehavior string describing the item activation behavior (one of + "default", "doubleclick" or "singleclick") (defaults to "default") + @type str (optional) + """ + super().__init__(style) + + self.__itemClickBehavior = itemClickBehavior + def styleHint(self, hint, option=None, widget=None, returnData=None): """ Public method returning a style hint for the given widget described by the @@ -36,14 +49,15 @@ @return integer representing the style hint @rtype int """ - if hint == QStyle.StyleHint.SH_ItemView_ActivateItemOnSingleClick: + if ( + hint == QStyle.StyleHint.SH_ItemView_ActivateItemOnSingleClick + and QApplication.keyboardModifiers() == Qt.KeyboardModifier.NoModifier + ): # Activate item with a single click? - activate = Preferences.getUI("ActivateItemOnSingleClick") - if QApplication.keyboardModifiers() == Qt.KeyboardModifier.NoModifier: - if activate == "singleclick": - return 1 - elif activate == "doubleclick": - return 0 + if self.__itemClickBehavior == "singleclick": + return 1 + elif self.__itemClickBehavior == "doubleclick": + return 0 # return the default style hint return super().styleHint(
--- a/src/eric7/EricWidgets/EricSqueezeLabels.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricWidgets/EricSqueezeLabels.py Fri Sep 27 17:27:11 2024 +0200 @@ -8,11 +8,11 @@ label. """ +import os + from PyQt6.QtCore import Qt from PyQt6.QtWidgets import QLabel -from eric7.SystemUtilities import FileSystemUtilities - class EricSqueezeLabel(QLabel): """ @@ -118,13 +118,7 @@ @type QPaintEvent """ if self.length(self.__path) > self.contentsRect().width(): - super().setText( - self.__surrounding.format( - FileSystemUtilities.compactPath( - self.__path, self.contentsRect().width(), self.length - ) - ) - ) + super().setText(self.__surrounding.format(self.__compactPath())) else: super().setText(self.__surrounding.format(self.__path)) super().paintEvent(event) @@ -140,3 +134,43 @@ """ fm = self.fontMetrics() return fm.horizontalAdvance(self.__surrounding.format(txt)) + + ############################################################################ + ## Internal path handling methods. + ############################################################################ + + def __compactPath(self): + """ + Private method to return a compacted path fitting inside the label width. + + @return compacted path + @rtype str + """ + width = self.contentsRect().width() + path = self.__path + + if self.length(path) <= width: + return path + + ellipsis = "..." + + head, tail = os.path.split(path) + mid = len(head) // 2 + head1 = head[:mid] + head2 = head[mid:] + while head1: + # head1 is same size as head2 or one shorter + path = os.path.join("{0}{1}{2}".format(head1, ellipsis, head2), tail) + if self.length(path) <= width: + return path + head1 = head1[:-1] + head2 = head2[1:] + path = os.path.join(ellipsis, tail) + if self.length(path) <= width: + return path + while tail: + path = "{0}{1}".format(ellipsis, tail) + if self.length(path) <= width: + return path + tail = tail[1:] + return ""
--- a/src/eric7/EricWidgets/EricToolBarManager.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/EricWidgets/EricToolBarManager.py Fri Sep 27 17:27:11 2024 +0200 @@ -16,11 +16,10 @@ QIODevice, QObject, QSize, - pyqtSlot, ) from PyQt6.QtWidgets import QStyle, QToolBar -from eric7 import Preferences, Utilities +from eric7 import EricUtilities class EricToolBarManager(QObject): @@ -53,19 +52,23 @@ ), } - def __init__(self, ui=None, parent=None): + def __init__(self, ui=None, iconSize="", parent=None): """ Constructor - @param ui reference to the user interface object - @type UI.UserInterface - @param parent reference to the parent object - @type QObject + @param ui reference to the user interface object (defaults to None) + @type UI.UserInterface (optional) + @param iconSize string giving the icon size (one of the sizes defined by the + IconSizes dictionary) (defaults to "") + @type str (optional) + @param parent reference to the parent object (defaults to None) + @type QObject (optional) """ super().__init__(parent) self.__mainWindow = None self.__ui = ui + self.__iconSizeStr = "" self.__toolBars = {} # maps toolbar IDs to actions @@ -188,10 +191,9 @@ if toolBar is None: return - iconSizeStr = Preferences.getIcons("IconSize") - if iconSizeStr: + if self.__iconSizeStr: with contextlib.suppress(KeyError): - iconSize = EricToolBarManager.IconSizes[iconSizeStr][0] + iconSize = EricToolBarManager.IconSizes[self.__iconSizeStr][0] toolBar.setIconSize(QSize(iconSize, iconSize)) newActions = [] @@ -620,11 +622,11 @@ toolBarCount = stream.readUInt16() for _i in range(toolBarCount): - objectName = Utilities.readStringFromStream(stream) + objectName = EricUtilities.readStringFromStream(stream) actionCount = stream.readUInt16() actions = [] for _j in range(actionCount): - actionName = Utilities.readStringFromStream(stream) + actionName = EricUtilities.readStringFromStream(stream) if actionName: action = self.__findAction(actionName) if action is not None: @@ -643,12 +645,12 @@ toolBarCount = stream.readUInt16() for _i in range(toolBarCount): - objectName = Utilities.readStringFromStream(stream) - toolBarTitle = Utilities.readStringFromStream(stream) + objectName = EricUtilities.readStringFromStream(stream) + toolBarTitle = EricUtilities.readStringFromStream(stream) actionCount = stream.readUInt16() actions = [] for _j in range(actionCount): - actionName = Utilities.readStringFromStream(stream) + actionName = EricUtilities.readStringFromStream(stream) if actionName: action = self.__findAction(actionName) if action is not None: @@ -808,15 +810,18 @@ return [] return self.__defaultToolBars[tbID][:] - @pyqtSlot() - def preferencesChanged(self): - """ - Public slot to handle a change of preferences. + def setIconSize(self, iconSize): """ - iconSizeStr = Preferences.getIcons("IconSize") - if iconSizeStr: + Public method to set the icon size. + + @param iconSize string giving the icon size (one of the sizes defined by the + IconSizes dictionary) + @type str + """ + self.__iconSizeStr = iconSize + if self.__iconSizeStr: try: - iconSize = EricToolBarManager.IconSizes[iconSizeStr][0] + iconSize = EricToolBarManager.IconSizes[self.__iconSizeStr][0] except KeyError: # determine icon size through the style iconSize = (
--- a/src/eric7/HexEdit/HexEditMainWindow.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/HexEdit/HexEditMainWindow.py Fri Sep 27 17:27:11 2024 +0200 @@ -82,7 +82,11 @@ self.setWindowIcon(EricPixmapCache.getIcon("hexEditor")) if not self.__fromEric: - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.__remotefsInterface = ( ericApp().getObject("EricServer").getServiceInterface("FileSystem")
--- a/src/eric7/IconEditor/IconEditorWindow.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/IconEditor/IconEditorWindow.py Fri Sep 27 17:27:11 2024 +0200 @@ -82,7 +82,9 @@ else: if not self.fromEric: self.setStyle( - Preferences.getUI("Style"), Preferences.getUI("StyleSheet") + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), ) self.__editor = IconEditorGrid() self.__scrollArea = QScrollArea()
--- a/src/eric7/MicroPython/Devices/EspDevices.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/MicroPython/Devices/EspDevices.py Fri Sep 27 17:27:11 2024 +0200 @@ -311,6 +311,8 @@ self.tr("'esptool read_flash' Output"), self.tr("Backup Firmware"), showProgress=True, + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: @@ -364,6 +366,8 @@ self.tr("'esptool write_flash' Output"), self.tr("Restore Firmware"), showProgress=True, + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: @@ -457,7 +461,10 @@ "chip_id", ] dlg = EricProcessDialog( - self.tr("'esptool chip_id' Output"), self.tr("Show Chip ID") + self.tr("'esptool chip_id' Output"), + self.tr("Show Chip ID"), + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) if res: @@ -477,7 +484,10 @@ "flash_id", ] dlg = EricProcessDialog( - self.tr("'esptool flash_id' Output"), self.tr("Show Flash ID") + self.tr("'esptool flash_id' Output"), + self.tr("Show Flash ID"), + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) if res: @@ -497,7 +507,10 @@ "read_mac", ] dlg = EricProcessDialog( - self.tr("'esptool read_mac' Output"), self.tr("Show MAC Address") + self.tr("'esptool read_mac' Output"), + self.tr("Show MAC Address"), + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) if res: @@ -1761,6 +1774,8 @@ QCoreApplication.translate("EspDevice", "'esptool erase_flash' Output"), QCoreApplication.translate("EspDevice", "Erase Flash"), showProgress=True, + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: @@ -1805,6 +1820,8 @@ QCoreApplication.translate("EspDevice", "'esptool write_flash' Output"), QCoreApplication.translate("EspDevice", "Flash µPy/CPy Firmware"), showProgress=True, + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: @@ -1846,6 +1863,8 @@ QCoreApplication.translate("EspDevice", "'esptool write_flash' Output"), QCoreApplication.translate("EspDevice", "Flash Additional Firmware"), showProgress=True, + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res:
--- a/src/eric7/MicroPython/Devices/PyBoardDevices.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/MicroPython/Devices/PyBoardDevices.py Fri Sep 27 17:27:11 2024 +0200 @@ -387,7 +387,10 @@ "--list", ] dlg = EricProcessDialog( - self.tr("'dfu-util' Output"), self.tr("List DFU capable Devices") + self.tr("'dfu-util' Output"), + self.tr("List DFU capable Devices"), + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(program, args) if res: @@ -427,6 +430,10 @@ dlg = EricProcessDialog( self.tr("'dfu-util' Output"), self.tr("Flash MicroPython Firmware"), + monospacedFont=Preferences.getEditorOtherFonts( + "MonospacedFont" + ), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(program, args) if res:
--- a/src/eric7/MicroPython/Devices/STLinkDevices.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/MicroPython/Devices/STLinkDevices.py Fri Sep 27 17:27:11 2024 +0200 @@ -379,6 +379,10 @@ windowTitle=self.tr("Flash MicroPython Firmware"), showInput=False, combinedOutput=True, + monospacedFont=Preferences.getEditorOtherFonts( + "MonospacedFont" + ), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(program, args) if res: @@ -397,6 +401,8 @@ dlg = EricProcessDialog( self.tr("'st-info' Output"), self.tr("STLink Device Information"), + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), ) res = dlg.startProcess(program, ["--probe"]) if res:
--- a/src/eric7/MicroPython/MicroPythonWidget.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/MicroPython/MicroPythonWidget.py Fri Sep 27 17:27:11 2024 +0200 @@ -1479,7 +1479,12 @@ compileArgs = [ pythonFile, ] - dlg = EricProcessDialog(self.tr("'mpy-cross' Output"), title) + dlg = EricProcessDialog( + self.tr("'mpy-cross' Output"), + title, + monospacedFont=Preferences.getEditorOtherFonts("MonospacedFont"), + encoding=Preferences.getSystem("IOEncoding"), + ) res = dlg.startProcess(program, compileArgs) if res: dlg.exec()
--- a/src/eric7/PdfViewer/PdfViewerWindow.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/PdfViewer/PdfViewerWindow.py Fri Sep 27 17:27:11 2024 +0200 @@ -88,7 +88,11 @@ self.setWindowIcon(EricPixmapCache.getIcon("ericPdf")) if not self.__fromEric: - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.__remotefsInterface = ( ericApp().getObject("EricServer").getServiceInterface("FileSystem")
--- a/src/eric7/PluginManager/PluginInstallDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/PluginManager/PluginInstallDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -683,7 +683,11 @@ self.resize(size) self.setWindowTitle(self.cw.windowTitle()) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.cw.buttonBox.accepted.connect(self.close) self.cw.buttonBox.rejected.connect(self.close)
--- a/src/eric7/PluginManager/PluginRepositoryDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/PluginManager/PluginRepositoryDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -1097,7 +1097,11 @@ self.resize(size) self.setWindowTitle(self.cw.windowTitle()) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.cw.buttonBox.accepted.connect(self.close) self.cw.buttonBox.rejected.connect(self.close)
--- a/src/eric7/PluginManager/PluginUninstallDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/PluginManager/PluginUninstallDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -300,7 +300,11 @@ self.resize(size) self.setWindowTitle(self.cw.windowTitle()) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.cw.buttonBox.accepted.connect(self.close) self.cw.buttonBox.rejected.connect(self.close)
--- a/src/eric7/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -728,7 +728,11 @@ self.resize(size) self.setWindowTitle(self.cw.windowTitle()) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.cw.buttonBox.accepted.connect(self.close) self.cw.buttonBox.rejected.connect(self.close)
--- a/src/eric7/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -895,7 +895,11 @@ self.resize(size) self.setWindowTitle(self.cw.windowTitle()) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.cw.buttonBox.accepted.connect(self.close) self.cw.buttonBox.rejected.connect(self.close)
--- a/src/eric7/Preferences/ConfigurationDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Preferences/ConfigurationDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -1816,7 +1816,11 @@ self.resize(size) self.setWindowTitle(self.cw.windowTitle()) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) # Setting the style sheet above set the button state of the Apply button # to be visible. So we need to hide it again.
--- a/src/eric7/QScintilla/MiniEditor.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/QScintilla/MiniEditor.py Fri Sep 27 17:27:11 2024 +0200 @@ -285,7 +285,11 @@ self.setObjectName(name) self.setWindowIcon(EricPixmapCache.getIcon("editor")) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.__textEdit = MiniScintilla(self) self.__textEdit.clearSearchIndicators = self.clearSearchIndicators
--- a/src/eric7/QScintilla/ShellWindow.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/QScintilla/ShellWindow.py Fri Sep 27 17:27:11 2024 +0200 @@ -61,7 +61,11 @@ self.setWindowIcon(EricPixmapCache.getIcon("shell")) self.setWindowTitle(self.tr("eric Shell")) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.__lastDebuggerId = ""
--- a/src/eric7/SqlBrowser/SqlBrowser.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/SqlBrowser/SqlBrowser.py Fri Sep 27 17:27:11 2024 +0200 @@ -44,7 +44,11 @@ self.setWindowTitle(self.tr("SQL Browser")) self.setWindowIcon(EricPixmapCache.getIcon("eric")) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.__browser = SqlBrowserWidget(self) self.setCentralWidget(self.__browser)
--- a/src/eric7/Testing/TestingWidget.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Testing/TestingWidget.py Fri Sep 27 17:27:11 2024 +0200 @@ -1612,7 +1612,11 @@ self.setCentralWidget(self.__cw) self.resize(size) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.__cw.buttonBox.accepted.connect(self.close) self.__cw.buttonBox.rejected.connect(self.close)
--- a/src/eric7/Toolbox/Startup.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Toolbox/Startup.py Fri Sep 27 17:27:11 2024 +0200 @@ -246,7 +246,9 @@ # generate a graphical error handler from eric7.EricWidgets import EricErrorMessage # __IGNORE_WARNING_I101__ - eMsg = EricErrorMessage.qtHandler() + eMsg = EricErrorMessage.qtHandler( + minSeverity=Preferences.getUI("MinimumMessageTypeSeverity") + ) eMsg.setMinimumSize(600, 400) return app.exec()
--- a/src/eric7/Tools/TRPreviewer.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Tools/TRPreviewer.py Fri Sep 27 17:27:11 2024 +0200 @@ -73,7 +73,11 @@ else: self.setObjectName(name) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.resize(QSize(800, 600).expandedTo(self.minimumSizeHint())) self.statusBar()
--- a/src/eric7/Tools/UIPreviewer.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/Tools/UIPreviewer.py Fri Sep 27 17:27:11 2024 +0200 @@ -64,7 +64,11 @@ else: self.setObjectName(name) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.resize(QSize(600, 480).expandedTo(self.minimumSizeHint())) self.statusBar()
--- a/src/eric7/UI/CompareDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/UI/CompareDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -516,7 +516,11 @@ """ super().__init__(parent) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.cw = CompareDialog(files, self) self.cw.installEventFilter(self)
--- a/src/eric7/UI/DiffDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/UI/DiffDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -327,7 +327,11 @@ """ super().__init__(parent) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.cw = DiffDialog(files=files, parent=self) self.cw.installEventFilter(self)
--- a/src/eric7/UI/FindFileWidget.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/UI/FindFileWidget.py Fri Sep 27 17:27:11 2024 +0200 @@ -642,8 +642,10 @@ files = vm.getOpenFilenames() self.findList.clear() + self.findProgressLabel.setPath("") + self.findProgress.setValue(0) + self.findProgress.setMaximum(len(files)) QApplication.processEvents() - self.findProgress.setMaximum(len(files)) # retrieve the values esc = self.escapeToolButton.isChecked()
--- a/src/eric7/UI/UserInterface.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/UI/UserInterface.py Fri Sep 27 17:27:11 2024 +0200 @@ -210,7 +210,11 @@ self.__restartArgs = restartArguments[:] - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength") self.locale = locale @@ -579,9 +583,10 @@ ) # create the toolbar manager object - self.toolbarManager = EricToolBarManager(self, self) + self.toolbarManager = EricToolBarManager( + ui=self, iconSize=Preferences.getIcons("IconSize"), parent=self + ) self.toolbarManager.setMainWindow(self) - self.preferencesChanged.connect(self.toolbarManager.preferencesChanged) # Initialize the tool groups and list of started tools splash.showMessage(self.tr("Initializing Tools...")) @@ -7389,7 +7394,11 @@ """ from eric7.HexEdit.HexEditMainWindow import HexEditMainWindow - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) if Preferences.getUI("SingleApplicationMode"): if self.SAServer is None: @@ -7411,6 +7420,8 @@ self.rightSidebar.setIconBarColor(Preferences.getUI("IconBarColor")) self.rightSidebar.setIconBarSize(Preferences.getUI("IconBarSize")) + self.toolbarManager.setIconSize(Preferences.getIcons("IconSize")) + self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength") self.captionShowsFilename = Preferences.getUI("CaptionShowsFilename") if not self.captionShowsFilename:
--- a/src/eric7/Utilities/PasswordChecker.py Fri Sep 27 11:00:27 2024 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,693 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2011 - 2024 Detlev Offenbach <detlev@die-offenbachs.de> -# - -""" -Module implementing a checker for password strength. -""" - -import enum -import re - - -class PasswordStrength(enum.IntEnum): - """ - Class defining the password strength. - """ - - VeryWeak = 0 - Weak = 1 - Good = 2 - Strong = 3 - VeryStrong = 4 - - -class PasswordCheckStatus(enum.Enum): - """ - Class defining the status of a password check. - """ - - Failed = 0 - Passed = 1 - Exceeded = 2 - - -class PasswordChecker: - """ - Class implementing a checker for password strength. - """ - - def __init__(self): - """ - Constructor - """ - self.score = {"count": 0, "adjusted": 0, "beforeRedundancy": 0} - - # complexity index - self.complexity = { - "limits": [20, 50, 60, 80, 100], - "value": PasswordStrength.VeryWeak, - } - - # check categories follow - - # length of the password - self.passwordLength = { - "count": 0, - "minimum": 6, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.5, # per character bonus - "bonus": 10, # minimum reached? Get a bonus. - "penalty": -20, # if we stay under minimum, we get punished - } - - # recommended password length - self.recommendedPasswordLength = { - "count": 0, - "minimum": 8, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 1.2, - "bonus": 10, - "penalty": -10, - } - - # Basic requirements are: - # 1) Password Length - # 2) Uppercase letter use - # 3) Lowercase letter use - # 4) Numeric character use - # 5) Symbol use - self.basicRequirements = { - "count": 0, - "minimum": 3, # have to be matched to get the bonus - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 1.0, - "bonus": 10, - "penalty": -10, - } - - # how much redundancy is permitted, if the password is - # long enough. we will skip the redudancy penalty if this - # number is not exceeded (meaning redundancy < this number) - self.redundancy = { - "value": 1, # 1 means, not double characters, - # default to start - "permitted": 2.0, # 2 means, in average every character - # can occur twice - "status": PasswordCheckStatus.Failed, - "rating": 0, - } - - # number of uppercase letters, such as A-Z - self.uppercaseLetters = { - "count": 0, - "minimum": 1, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.0, - "bonus": 10, - "penalty": -10, - } - - # number of lowercase letters, such as a-z - self.lowercaseLetters = { - "count": 0, - "minimum": 1, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.0, - "bonus": 10, - "penalty": -10, - } - - # number of numeric characters - self.numerics = { - "count": 0, - "minimum": 1, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.0, - "bonus": 10, - "penalty": -10, - } - - # number of symbol characters - self.symbols = { - "count": 0, - "minimum": 1, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.0, - "bonus": 10, - "penalty": -10, - } - - # number of dedicated symbols in the middle - self.middleSymbols = { - "count": 0, - "minimum": 1, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.0, - "bonus": 10, - "penalty": -10, - } - - # number of dedicated numbers in the middle - self.middleNumerics = { - "count": 0, - "minimum": 1, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.0, - "bonus": 10, - "penalty": -10, - } - - # how many sequential characters should be checked - # such as "abc" or "MNO" to be not part of the password - self.sequentialLetters = { - "data": "abcdefghijklmnopqrstuvwxyz", - "length": 3, - "count": 0, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": -1.0, - "bonus": 0, - "penalty": -10, - } - - # how many sequential characters should be checked - # such as "123" to be not part of the password - self.sequentialNumerics = { - "data": "0123456789", - "length": 3, - "count": 0, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": -1.0, - "bonus": 0, - "penalty": -10, - } - - # keyboard patterns to check, typical sequences from your - # keyboard - self.keyboardPatterns = { - # German and English keyboard text - "data": [ - "qwertzuiop", - "asdfghjkl", - "yxcvbnm", - '!"§$%&/()=', # de - "1234567890", # de numbers - "qaywsxedcrfvtgbzhnujmik,ol.pö-üä+#", # de up-down - "qwertyuiop", - "asdfghjkl", - "zyxcvbnm", - "!@#$%^&*()_", # en - "1234567890", # en numbers - "qazwsxedcrfvtgbyhnujmik,ol.p;/[']\\", # en up-down - ], - "length": 4, # how long is the pattern to check and blame for? - "count": 0, # how many of these pattern can be found - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": -1.0, # each occurrence is punished with that factor - "bonus": 0, - "penalty": -10, - } - - # check for repeated sequences, like in catcat - self.repeatedSequences = { - "length": 3, - "count": 0, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.0, - "bonus": 0, - "penalty": -10, - } - - # check for repeated mirrored sequences, like in tactac - self.mirroredSequences = { - "length": 3, - "count": 0, - "status": PasswordCheckStatus.Failed, - "rating": 0, - "factor": 0.0, - "bonus": 0, - "penalty": -10, - } - - self.uppercaseRe = re.compile("[A-Z]") - self.lowercaseRe = re.compile("[a-z]") - self.numberRe = re.compile("[0-9]") - self.symbolRe = re.compile("[^a-zA-Z0-9]") - - def __strReverse(self, string): - """ - Private method to reverse a string. - - @param string string to be reversed - @type str - @return reversed string - @rtype str - """ - return "".join(reversed(string)) - - def __determineStatus(self, value): - """ - Private method to determine the status. - - @param value value to check - @type int - @return status - @rtype PasswordCheckStatus - """ - if value == 0: - return PasswordCheckStatus.Passed - elif value > 0: - return PasswordCheckStatus.Exceeded - else: - return PasswordCheckStatus.Failed - - def __determineBinaryStatus(self, value): - """ - Private method to determine a binary status. - - @param value value to check - @type int - @return status - @rtype PasswordCheckStatus - """ - if value == 0: - return PasswordCheckStatus.Passed - else: - return PasswordCheckStatus.Failed - - def checkPassword(self, password): - """ - Public method to check a given password. - - @param password password to be checked - @type str - @return indication for the password strength - @rtype PasswordStrength - """ - # how long is the password? - self.passwordLength["count"] = len(password) - self.recommendedPasswordLength["count"] = len(password) - - # Loop through password to check for Symbol, Numeric, Lowercase - # and Uppercase pattern matches - for index in range(len(password)): - if self.uppercaseRe.match(password[index]): - self.uppercaseLetters["count"] += 1 - elif self.lowercaseRe.match(password[index]): - self.lowercaseLetters["count"] += 1 - elif self.numberRe.match(password[index]): - if index > 0 and index < len(password) - 1: - self.middleNumerics["count"] += 1 - self.numerics["count"] += 1 - elif self.symbolRe.match(password[index]): - if index > 0 and index < len(password) - 1: - self.middleSymbols["count"] += 1 - self.symbols["count"] += 1 - - # check the variance of symbols or better the redundancy - # makes only sense for at least two characters - if len(password) > 1: - uniqueCharacters = [] - for index1 in range(len(password)): - found = False - for index2 in range(index1 + 1, len(password)): - if password[index1] == password[index2]: - found = True - break - if not found: - uniqueCharacters.append(password[index1]) - - # calculate a redundancy number - self.redundancy["value"] = len(password) / len(uniqueCharacters) - - # Check for sequential alpha string patterns (forward and reverse) - # but only, if the string has already a length to check for, does - # not make sense to check the password "ab" for the sequential data - # "abc" - lowercasedPassword = password.lower() - - if self.passwordLength["count"] >= self.sequentialLetters["length"]: - for index in range( - len(self.sequentialLetters["data"]) - - self.sequentialLetters["length"] - + 1 - ): - fwd = self.sequentialLetters["data"][ - index : index + self.sequentialLetters["length"] - ] - rev = self.__strReverse(fwd) - if lowercasedPassword.find(fwd) != -1: - self.sequentialLetters["count"] += 1 - if lowercasedPassword.find(rev) != -1: - self.sequentialLetters["count"] += 1 - - # Check for sequential numeric string patterns (forward and reverse) - if self.passwordLength["count"] >= self.sequentialNumerics["length"]: - for index in range( - len(self.sequentialNumerics["data"]) - - self.sequentialNumerics["length"] - + 1 - ): - fwd = self.sequentialNumerics["data"][ - index : index + self.sequentialNumerics["length"] - ] - rev = self.__strReverse(fwd) - if lowercasedPassword.find(fwd) != -1: - self.sequentialNumerics["count"] += 1 - if lowercasedPassword.find(rev) != -1: - self.sequentialNumerics["count"] += 1 - - # Check common keyboard patterns - patternsMatched = [] - if self.passwordLength["count"] >= self.keyboardPatterns["length"]: - for pattern in self.keyboardPatterns["data"]: - for index in range(len(pattern) - self.keyboardPatterns["length"] + 1): - fwd = pattern[index : index + self.keyboardPatterns["length"]] - rev = self.__strReverse(fwd) - if ( - lowercasedPassword.find(fwd) != -1 - and fwd not in patternsMatched - ): - self.keyboardPatterns["count"] += 1 - patternsMatched.append(fwd) - if ( - lowercasedPassword.find(rev) != -1 - and fwd not in patternsMatched - ): - self.keyboardPatterns["count"] += 1 - patternsMatched.append(rev) - - # Try to find repeated sequences of characters. - if self.passwordLength["count"] >= self.repeatedSequences["length"]: - for index in range( - len(lowercasedPassword) - self.repeatedSequences["length"] + 1 - ): - fwd = lowercasedPassword[ - index : index + self.repeatedSequences["length"] - ] - if ( - lowercasedPassword.find( - fwd, index + self.repeatedSequences["length"] - ) - != -1 - ): - self.repeatedSequences["count"] += 1 - - # Try to find mirrored sequences of characters. - if self.passwordLength["count"] >= self.mirroredSequences["length"]: - for index in range( - len(lowercasedPassword) - self.mirroredSequences["length"] + 1 - ): - fwd = lowercasedPassword[ - index : index + self.mirroredSequences["length"] - ] - rev = self.__strReverse(fwd) - if ( - lowercasedPassword.find( - fwd, index + self.mirroredSequences["length"] - ) - != -1 - ): - self.mirroredSequences["count"] += 1 - - # Initial score based on length - self.score["count"] = ( - self.passwordLength["count"] * self.passwordLength["factor"] - ) - - # passwordLength - # credit additional length or punish "under" length - if self.passwordLength["count"] >= self.passwordLength["minimum"]: - # credit additional characters over minimum - self.passwordLength["rating"] = ( - self.passwordLength["bonus"] - + (self.passwordLength["count"] - self.passwordLength["minimum"]) - * self.passwordLength["factor"] - ) - else: - self.passwordLength["rating"] = self.passwordLength["penalty"] - self.score["count"] += self.passwordLength["rating"] - - # recommendedPasswordLength - # Credit reaching the recommended password length or put a - # penalty on it - if self.passwordLength["count"] >= self.recommendedPasswordLength["minimum"]: - self.recommendedPasswordLength["rating"] = ( - self.recommendedPasswordLength["bonus"] - + ( - self.passwordLength["count"] - - self.recommendedPasswordLength["minimum"] - ) - * self.recommendedPasswordLength["factor"] - ) - else: - self.recommendedPasswordLength["rating"] = self.recommendedPasswordLength[ - "penalty" - ] - self.score["count"] += self.recommendedPasswordLength["rating"] - - # lowercaseLetters - # Honor or punish the lowercase letter use - if self.lowercaseLetters["count"] > 0: - self.lowercaseLetters["rating"] = ( - self.lowercaseLetters["bonus"] - + self.lowercaseLetters["count"] * self.lowercaseLetters["factor"] - ) - else: - self.lowercaseLetters["rating"] = self.lowercaseLetters["penalty"] - self.score["count"] += self.lowercaseLetters["rating"] - - # uppercaseLetters - # Honor or punish the lowercase letter use - if self.uppercaseLetters["count"] > 0: - self.uppercaseLetters["rating"] = ( - self.uppercaseLetters["bonus"] - + self.uppercaseLetters["count"] * self.uppercaseLetters["factor"] - ) - else: - self.uppercaseLetters["rating"] = self.uppercaseLetters["penalty"] - self.score["count"] += self.uppercaseLetters["rating"] - - # numerics - # Honor or punish the numerics use - if self.numerics["count"] > 0: - self.numerics["rating"] = ( - self.numerics["bonus"] - + self.numerics["count"] * self.numerics["factor"] - ) - else: - self.numerics["rating"] = self.numerics["penalty"] - self.score["count"] += self.numerics["rating"] - - # symbols - # Honor or punish the symbols use - if self.symbols["count"] > 0: - self.symbols["rating"] = ( - self.symbols["bonus"] + self.symbols["count"] * self.symbols["factor"] - ) - else: - self.symbols["rating"] = self.symbols["penalty"] - self.score["count"] += self.symbols["rating"] - - # middleSymbols - # Honor or punish the middle symbols use - if self.middleSymbols["count"] > 0: - self.middleSymbols["rating"] = ( - self.middleSymbols["bonus"] - + self.middleSymbols["count"] * self.middleSymbols["factor"] - ) - else: - self.middleSymbols["rating"] = self.middleSymbols["penalty"] - self.score["count"] += self.middleSymbols["rating"] - - # middleNumerics - # Honor or punish the middle numerics use - if self.middleNumerics["count"] > 0: - self.middleNumerics["rating"] = ( - self.middleNumerics["bonus"] - + self.middleNumerics["count"] * self.middleNumerics["factor"] - ) - else: - self.middleNumerics["rating"] = self.middleNumerics["penalty"] - self.score["count"] += self.middleNumerics["rating"] - - # sequentialLetters - # Honor or punish the sequential letter use - if self.sequentialLetters["count"] == 0: - self.sequentialLetters["rating"] = ( - self.sequentialLetters["bonus"] - + self.sequentialLetters["count"] * self.sequentialLetters["factor"] - ) - else: - self.sequentialLetters["rating"] = self.sequentialLetters["penalty"] - self.score["count"] += self.sequentialLetters["rating"] - - # sequentialNumerics - # Honor or punish the sequential numerics use - if self.sequentialNumerics["count"] == 0: - self.sequentialNumerics["rating"] = ( - self.sequentialNumerics["bonus"] - + self.sequentialNumerics["count"] * self.sequentialNumerics["factor"] - ) - else: - self.sequentialNumerics["rating"] = self.sequentialNumerics["penalty"] - self.score["count"] += self.sequentialNumerics["rating"] - - # keyboardPatterns - # Honor or punish the keyboard patterns use - if self.keyboardPatterns["count"] == 0: - self.keyboardPatterns["rating"] = ( - self.keyboardPatterns["bonus"] - + self.keyboardPatterns["count"] * self.keyboardPatterns["factor"] - ) - else: - self.keyboardPatterns["rating"] = self.keyboardPatterns["penalty"] - self.score["count"] += self.keyboardPatterns["rating"] - - # Count our basicRequirements and set the status - self.basicRequirements["count"] = 0 - - # password length - self.passwordLength["status"] = self.__determineStatus( - self.passwordLength["count"] - self.passwordLength["minimum"] - ) - if self.passwordLength["status"] != PasswordCheckStatus.Failed: - # requirement met - self.basicRequirements["count"] += 1 - - # uppercase letters - self.uppercaseLetters["status"] = self.__determineStatus( - self.uppercaseLetters["count"] - self.uppercaseLetters["minimum"] - ) - if self.uppercaseLetters["status"] != PasswordCheckStatus.Failed: - # requirement met - self.basicRequirements["count"] += 1 - - # lowercase letters - self.lowercaseLetters["status"] = self.__determineStatus( - self.lowercaseLetters["count"] - self.lowercaseLetters["minimum"] - ) - if self.lowercaseLetters["status"] != PasswordCheckStatus.Failed: - # requirement met - self.basicRequirements["count"] += 1 - - # numerics - self.numerics["status"] = self.__determineStatus( - self.numerics["count"] - self.numerics["minimum"] - ) - if self.numerics["status"] != PasswordCheckStatus.Failed: - # requirement met - self.basicRequirements["count"] += 1 - - # symbols - self.symbols["status"] = self.__determineStatus( - self.symbols["count"] - self.symbols["minimum"] - ) - if self.symbols["status"] != PasswordCheckStatus.Failed: - # requirement met - self.basicRequirements["count"] += 1 - - # judge the requirement status - self.basicRequirements["status"] = self.__determineStatus( - self.basicRequirements["count"] - self.basicRequirements["minimum"] - ) - if self.basicRequirements["status"] != PasswordCheckStatus.Failed: - self.basicRequirements["rating"] = ( - self.basicRequirements["bonus"] - + self.basicRequirements["factor"] * self.basicRequirements["count"] - ) - else: - self.basicRequirements["rating"] = self.basicRequirements["penalty"] - self.score["count"] += self.basicRequirements["rating"] - - # beyond basic requirements - self.recommendedPasswordLength["status"] = self.__determineStatus( - self.recommendedPasswordLength["count"] - - self.recommendedPasswordLength["minimum"] - ) - self.middleNumerics["status"] = self.__determineStatus( - self.middleNumerics["count"] - self.middleNumerics["minimum"] - ) - self.middleSymbols["status"] = self.__determineStatus( - self.middleSymbols["count"] - self.middleSymbols["minimum"] - ) - self.sequentialLetters["status"] = self.__determineBinaryStatus( - self.sequentialLetters["count"] - ) - self.sequentialNumerics["status"] = self.__determineBinaryStatus( - self.sequentialNumerics["count"] - ) - self.keyboardPatterns["status"] = self.__determineBinaryStatus( - self.keyboardPatterns["count"] - ) - self.repeatedSequences["status"] = self.__determineBinaryStatus( - self.repeatedSequences["count"] - ) - self.mirroredSequences["status"] = self.__determineBinaryStatus( - self.mirroredSequences["count"] - ) - - # we apply them only, if the length is not awesome - if self.recommendedPasswordLength["status"] != PasswordCheckStatus.Exceeded: - # repeatedSequences - # Honor or punish the use of repeated sequences - if self.repeatedSequences["count"] == 0: - self.repeatedSequences["rating"] = self.repeatedSequences["bonus"] - else: - self.repeatedSequences["rating"] = ( - self.repeatedSequences["penalty"] - + self.repeatedSequences["count"] * self.repeatedSequences["factor"] - ) - - # mirroredSequences - # Honor or punish the use of mirrored sequences - if self.mirroredSequences["count"] == 0: - self.mirroredSequences["rating"] = self.mirroredSequences["bonus"] - else: - self.mirroredSequences["rating"] = ( - self.mirroredSequences["penalty"] - + self.mirroredSequences["count"] * self.mirroredSequences["factor"] - ) - - # save value before redundancy - self.score["beforeRedundancy"] = self.score["count"] - - # apply the redundancy - # is the password length requirement fulfilled? - if ( - self.recommendedPasswordLength["status"] != PasswordCheckStatus.Exceeded - and self.score["count"] > 0 - ): - # full penalty, because password is not long enough, only for - # a positive score - self.score["count"] *= 1.0 / self.redundancy["value"] - - # level it out - if self.score["count"] > 100: - self.score["adjusted"] = 100 - elif self.score["count"] < 0: - self.score["adjusted"] = 0 - else: - self.score["adjusted"] = self.score["count"] - - # judge it - for index in range(len(self.complexity["limits"])): - if self.score["adjusted"] <= self.complexity["limits"][index]: - self.complexity["value"] = PasswordStrength(index) - break - - return self.complexity["value"]
--- a/src/eric7/VirtualEnv/VirtualenvAddEditDialog.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/VirtualEnv/VirtualenvAddEditDialog.py Fri Sep 27 17:27:11 2024 +0200 @@ -53,7 +53,9 @@ self.__editMode = bool(self.__venvName) try: self.__serverInterface = ericApp().getObject("EricServer") - self.__fsInterface = self.__serverInterface.getServiceInterface("FileSystem") + self.__fsInterface = self.__serverInterface.getServiceInterface( + "FileSystem" + ) except KeyError: self.__serverInterface = None self.__fsInterface = None
--- a/src/eric7/WebBrowser/WebBrowserWindow.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/WebBrowser/WebBrowserWindow.py Fri Sep 27 17:27:11 2024 +0200 @@ -226,7 +226,11 @@ self.__windowStates = Qt.WindowState.WindowNoState self.__isClosing = False - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) # initialize some SSL stuff initSSL() @@ -3715,7 +3719,11 @@ """ Public slot to handle a change of preferences. """ - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle( + styleName=Preferences.getUI("Style"), + styleSheetFile=Preferences.getUI("StyleSheet"), + itemClickBehavior=Preferences.getUI("ActivateItemOnSingleClick"), + ) self.__initWebEngineSettings()
--- a/src/eric7/eric7_ide.py Fri Sep 27 11:00:27 2024 +0200 +++ b/src/eric7/eric7_ide.py Fri Sep 27 17:27:11 2024 +0200 @@ -403,7 +403,9 @@ # generate a graphical error handler from eric7.EricWidgets import EricErrorMessage # __IGNORE_WARNING_I101__ - eMsg = EricErrorMessage.qtHandler() + eMsg = EricErrorMessage.qtHandler( + minSeverity=Preferences.getUI("MinimumMessageTypeSeverity") + ) eMsg.setMinimumSize(600, 400) # Initialize SSL stuff