Sat, 30 Oct 2021 10:41:14 +0200
Merged with 'default' branch to prepare a new release.
--- a/docs/changelog Sat Sep 04 11:35:19 2021 +0200 +++ b/docs/changelog Sat Oct 30 10:41:14 2021 +0200 @@ -1,5 +1,8 @@ Change Log ---------- +Version 21.11: +- bug fixes + Version 21.9: - bug fixes - MicroPython
--- a/eric6/APIs/Python3/eric6.api Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/APIs/Python3/eric6.api Sat Oct 30 10:41:14 2021 +0200 @@ -9017,6 +9017,7 @@ eric6.Tasks.TaskViewer.TaskViewer.clearFileTasks?4(filename, conditionally=False) eric6.Tasks.TaskViewer.TaskViewer.clearProjectTasks?4(fileOnly=False) eric6.Tasks.TaskViewer.TaskViewer.clearTasks?4() +eric6.Tasks.TaskViewer.TaskViewer.containsTask?4(taskToTest) eric6.Tasks.TaskViewer.TaskViewer.displayFile?7 eric6.Tasks.TaskViewer.TaskViewer.findParentTask?4(parentUid) eric6.Tasks.TaskViewer.TaskViewer.getGlobalTasks?4() @@ -12230,6 +12231,7 @@ eric6.eric6_pluginuninstall.main?4() eric6.eric6_post_install.copyDesktopFile?4(src, dst, scriptsdir) eric6.eric6_post_install.copyLinuxMetaData?4() +eric6.eric6_post_install.copyMetaFile?4(srcname, dstpath, dstname) eric6.eric6_post_install.copyMetaFilesTree?4(src, dst) eric6.eric6_post_install.createWindowsLinks?4() eric6.eric6_post_install.createWindowsShortcut?4(linkPath, targetPath, iconPath)
--- a/eric6/Documentation/Help/source.qhp Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/Documentation/Help/source.qhp Sat Oct 30 10:41:14 2021 +0200 @@ -15123,6 +15123,7 @@ <keyword name="TaskViewer.clearFileTasks" id="TaskViewer.clearFileTasks" ref="eric6.Tasks.TaskViewer.html#TaskViewer.clearFileTasks" /> <keyword name="TaskViewer.clearProjectTasks" id="TaskViewer.clearProjectTasks" ref="eric6.Tasks.TaskViewer.html#TaskViewer.clearProjectTasks" /> <keyword name="TaskViewer.clearTasks" id="TaskViewer.clearTasks" ref="eric6.Tasks.TaskViewer.html#TaskViewer.clearTasks" /> + <keyword name="TaskViewer.containsTask" id="TaskViewer.containsTask" ref="eric6.Tasks.TaskViewer.html#TaskViewer.containsTask" /> <keyword name="TaskViewer.findParentTask" id="TaskViewer.findParentTask" ref="eric6.Tasks.TaskViewer.html#TaskViewer.findParentTask" /> <keyword name="TaskViewer.getGlobalTasks" id="TaskViewer.getGlobalTasks" ref="eric6.Tasks.TaskViewer.html#TaskViewer.getGlobalTasks" /> <keyword name="TaskViewer.getProjectTasks" id="TaskViewer.getProjectTasks" ref="eric6.Tasks.TaskViewer.html#TaskViewer.getProjectTasks" /> @@ -17700,6 +17701,7 @@ <keyword name="copyDesktopFile" id="copyDesktopFile" ref="eric6.eric6_post_install.html#copyDesktopFile" /> <keyword name="copyDesktopFile" id="copyDesktopFile" ref="install.html#copyDesktopFile" /> <keyword name="copyLinuxMetaData" id="copyLinuxMetaData" ref="eric6.eric6_post_install.html#copyLinuxMetaData" /> + <keyword name="copyMetaFile" id="copyMetaFile" ref="eric6.eric6_post_install.html#copyMetaFile" /> <keyword name="copyMetaFilesTree" id="copyMetaFilesTree" ref="eric6.eric6_post_install.html#copyMetaFilesTree" /> <keyword name="copyToFile" id="copyToFile" ref="install.html#copyToFile" /> <keyword name="copyTree" id="copyTree" ref="install-debugclients.html#copyTree" />
--- a/eric6/Documentation/Source/eric6.Tasks.TaskViewer.html Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/Documentation/Source/eric6.Tasks.TaskViewer.html Sat Oct 30 10:41:14 2021 +0200 @@ -302,6 +302,10 @@ <td>Public slot to clear all tasks from display.</td> </tr> <tr> +<td><a href="#TaskViewer.containsTask">containsTask</a></td> +<td>Public method to test, if a task is already in the tasks list.</td> +</tr> +<tr> <td><a href="#TaskViewer.findParentTask">findParentTask</a></td> <td>Public method to find a parent task by its ID.</td> </tr> @@ -698,6 +702,32 @@ <p> Public slot to clear all tasks from display. </p> +<a NAME="TaskViewer.containsTask" ID="TaskViewer.containsTask"></a> +<h4>TaskViewer.containsTask</h4> +<b>containsTask</b>(<i>taskToTest</i>) + +<p> + Public method to test, if a task is already in the tasks list. +</p> +<dl> + +<dt><i>taskToTest</i> (Task)</dt> +<dd> +task to look for +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +flag indicating the existence of the task +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> <a NAME="TaskViewer.findParentTask" ID="TaskViewer.findParentTask"></a> <h4>TaskViewer.findParentTask</h4> <b>findParentTask</b>(<i>parentUid</i>)
--- a/eric6/Documentation/Source/eric6.eric6_post_install.html Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/Documentation/Source/eric6.eric6_post_install.html Sat Oct 30 10:41:14 2021 +0200 @@ -48,6 +48,10 @@ <td>Function to copy the meta data files.</td> </tr> <tr> +<td><a href="#copyMetaFile">copyMetaFile</a></td> +<td>Function to copy a file to its destination.</td> +</tr> +<tr> <td><a href="#copyMetaFilesTree">copyMetaFilesTree</a></td> <td>Function to copy the files of a directory tree.</td> </tr> @@ -113,6 +117,31 @@ <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> +<a NAME="copyMetaFile" ID="copyMetaFile"></a> +<h2>copyMetaFile</h2> +<b>copyMetaFile</b>(<i>srcname, dstpath, dstname</i>) + +<p> + Function to copy a file to its destination. +</p> +<dl> + +<dt><i>srcname</i> (str)</dt> +<dd> +name of the source file +</dd> +<dt><i>dstpath</i> (str)</dt> +<dd> +name of the destination path +</dd> +<dt><i>dstname</i> (str)</dt> +<dd> +name of the destination file (without path) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> <a NAME="copyMetaFilesTree" ID="copyMetaFilesTree"></a> <h2>copyMetaFilesTree</h2> <b>copyMetaFilesTree</b>(<i>src, dst</i>)
--- a/eric6/E5XML/TasksReader.py Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/E5XML/TasksReader.py Sat Oct 30 10:41:14 2021 +0200 @@ -122,7 +122,8 @@ isProjectTask=self.forProject, taskType=task["type"], description=task["description"], uid=task["uid"], parentTask=parentTask) - self.tasks.append((addedTask, expanded)) + if addedTask: + self.tasks.append((addedTask, expanded)) break if self.isStartElement():
--- a/eric6/Preferences/ShortcutsDialog.py Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/Preferences/ShortcutsDialog.py Sat Oct 30 10:41:14 2021 +0200 @@ -471,11 +471,13 @@ for index in range(topItem.childCount()): itm = topItem.child(index) if ( - (self.actionButton.isChecked() and - rx.search(itm.text(0)) is not None) or - (self.shortcutButton.isChecked() and - txt.lower() not in itm.text(1).lower() and - txt.lower() not in itm.text(2).lower()) + txt and ( + (self.actionButton.isChecked() and + rx.search(itm.text(0)) is None) or + (self.shortcutButton.isChecked() and + txt.lower() not in itm.text(1).lower() and + txt.lower() not in itm.text(2).lower()) + ) ): itm.setHidden(True) childHiddenCount += 1
--- a/eric6/Project/ProjectSourcesBrowser.py Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/Project/ProjectSourcesBrowser.py Sat Oct 30 10:41:14 2021 +0200 @@ -106,6 +106,9 @@ self.__createRubyPopupMenus() elif self.project.isJavaScriptProject(): self.__createJavaScriptPopupMenus() + else: + # assign generic source menu + self.mainMenu = self.sourceMenu def __createPythonPopupMenus(self): """
--- a/eric6/Tasks/TaskViewer.py Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/Tasks/TaskViewer.py Sat Oct 30 10:41:14 2021 +0200 @@ -229,6 +229,26 @@ return parentTask + def containsTask(self, taskToTest): + """ + Public method to test, if a task is already in the tasks list. + + @param taskToTest task to look for + @type Task + @return flag indicating the existence of the task + @rtype bool + """ + if taskToTest is None: + # play it safe + return False + + return any( + (task.summary == taskToTest.summary) and + (task.filename == taskToTest.filename) and + (task.lineno == taskToTest.lineno) + for task in self.tasks + ) + def __refreshDisplay(self): """ Private method to refresh the display. @@ -369,24 +389,27 @@ task = Task(summary, priority, filename, lineno, completed, _time, isProjectTask, taskType, self.project, description, uid, parentUid) - self.tasks.append(task) - if parentTask: - parentTask.addChild(task) - parentTask.setExpanded(True) - elif filename: - self.__extractedItem.addChild(task) + if not self.containsTask(task): + self.tasks.append(task) + if parentTask: + parentTask.addChild(task) + parentTask.setExpanded(True) + elif filename: + self.__extractedItem.addChild(task) + else: + self.__manualItem.addChild(task) + task.setHidden(not self.taskFilter.showTask(task)) + + self.__checkTopLevelItems() + self.__resort() + self.__resizeColumns() + + if isProjectTask: + self.__projectTasksSaveTimer.changeOccurred() + + return task else: - self.__manualItem.addChild(task) - task.setHidden(not self.taskFilter.showTask(task)) - - self.__checkTopLevelItems() - self.__resort() - self.__resizeColumns() - - if isProjectTask: - self.__projectTasksSaveTimer.changeOccurred() - - return task + return None def addFileTask(self, summary, filename, lineno, taskType=TaskType.TODO, description=""):
--- a/eric6/Tasks/TasksFile.py Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/Tasks/TasksFile.py Sat Oct 30 10:41:14 2021 +0200 @@ -144,7 +144,8 @@ taskType=TaskType(task["type"]), description=task["description"], uid=task["uid"], parentTask=task["parent_uid"]) - addedTasks.append((addedTask, task["expanded"])) + if addedTask: + addedTasks.append((addedTask, task["expanded"])) for task, expanded in addedTasks: task.setExpanded(expanded)
--- a/eric6/Toolbox/Startup.py Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/Toolbox/Startup.py Sat Oct 30 10:41:14 2021 +0200 @@ -160,16 +160,20 @@ def setLibraryPaths(): """ - Module function to set the Qt library paths correctly for windows systems. + Module function to set the Qt library paths correctly. """ - if Globals.isWindowsPlatform(): - libPath = os.path.join(Globals.getPyQt5ModulesDirectory(), "plugins") + libPaths = ( + os.path.join(Globals.getPyQt5ModulesDirectory(), "plugins"), + os.path.join(Globals.getPyQt5ModulesDirectory(), "Qt5", "plugins"), + ) + + libraryPaths = QApplication.libraryPaths() + for libPath in libPaths: if os.path.exists(libPath): libPath = QDir.fromNativeSeparators(libPath) - libraryPaths = QApplication.libraryPaths() if libPath not in libraryPaths: libraryPaths.insert(0, libPath) - QApplication.setLibraryPaths(libraryPaths) + QApplication.setLibraryPaths(libraryPaths) # the translator must not be deleted, therefore we save them here loaded_translators = {}
--- a/eric6/eric6_post_install.py Sat Sep 04 11:35:19 2021 +0200 +++ b/eric6/eric6_post_install.py Sat Oct 30 10:41:14 2021 +0200 @@ -157,6 +157,13 @@ copyMetaFilesTree(os.path.join(srcDir, metaDir), os.path.join(dstDir, metaDir)) + copyMetaFile(os.path.join(srcDir, "icons", "eric48_icon.png"), + os.path.join(dstDir, "icons", "hicolor", "48x48", "apps"), + "eric.png") + copyMetaFile(os.path.join(srcDir, "icons", "ericWeb48_icon.png"), + os.path.join(dstDir, "icons", "hicolor", "48x48", "apps"), + "ericWeb.png") + for desktop in ["eric6.desktop", "eric6_browser.desktop"]: copyDesktopFile( os.path.join(srcDir, "applications", desktop), @@ -190,6 +197,24 @@ copyMetaFilesTree(srcname, dstname) +def copyMetaFile(srcname, dstpath, dstname): + """ + Function to copy a file to its destination. + + @param srcname name of the source file + @type str + @param dstpath name of the destination path + @type str + @param dstname name of the destination file (without path) + @type str + """ + if not os.path.isdir(dstpath): + os.makedirs(dstpath) + dstname = os.path.join(dstpath, dstname) + shutil.copy2(srcname, dstname) + os.chmod(dstname, 0o644) + + def copyDesktopFile(src, dst, scriptsdir): """ Modify a desktop file and write it to its destination.
--- a/scripts/install.py Sat Sep 04 11:35:19 2021 +0200 +++ b/scripts/install.py Sat Oct 30 10:41:14 2021 +0200 @@ -939,6 +939,18 @@ shutilCopy( os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), os.path.join(dst, "ericWeb.png")) + + dst = os.path.normpath( + os.path.join(distDir, "usr/share/icons/hicolor/48x48/apps")) + if not os.path.exists(dst): + os.makedirs(dst) + shutilCopy( + os.path.join(eric6SourceDir, "pixmaps", "eric48_icon.png"), + os.path.join(dst, "eric.png")) + shutilCopy( + os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), + os.path.join(dst, "ericWeb.png")) + dst = os.path.normpath( os.path.join(distDir, "usr/share/applications")) if not os.path.exists(dst): @@ -948,6 +960,7 @@ copyDesktopFile( os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), os.path.join(dst, "eric6_browser.desktop")) + dst = os.path.normpath( os.path.join(distDir, "usr/share/metainfo")) if not os.path.exists(dst): @@ -959,6 +972,9 @@ shutilCopy( os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), "/usr/share/icons/eric.png") + shutilCopy( + os.path.join(eric6SourceDir, "pixmaps", "eric48_icon.png"), + "/usr/share/icons/hicolor/48x48/apps/eric.png") copyDesktopFile( os.path.join(sourceDir, "linux", "eric6.desktop.in"), "/usr/share/applications/eric6.desktop") @@ -973,6 +989,9 @@ shutilCopy( os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), "/usr/share/icons/ericWeb.png") + shutilCopy( + os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), + "/usr/share/icons/hicolor/48x48/apps/ericWeb.png") copyDesktopFile( os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), "/usr/share/applications/eric6_browser.desktop") @@ -982,14 +1001,17 @@ ".local", "share") # create directories first for directory in [os.path.join(localPath, name) - for name in ("icons", "applications", - "metainfo", "appdata")]: + for name in ("icons", "icons/hicolor/48x48/apps", + "applications", "metainfo", "appdata")]: if not os.path.isdir(directory): os.makedirs(directory) # now copy the files shutilCopy( os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), os.path.join(localPath, "icons", "eric.png")) + shutilCopy( + os.path.join(eric6SourceDir, "pixmaps", "eric48_icon.png"), + os.path.join(localPath, "icons/hicolor/48x48/apps", "eric.png")) copyDesktopFile( os.path.join(sourceDir, "linux", "eric6.desktop.in"), os.path.join(localPath, "applications", "eric6.desktop")) @@ -1002,6 +1024,9 @@ shutilCopy( os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), os.path.join(localPath, "icons", "ericWeb.png")) + shutilCopy( + os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), + os.path.join(localPath, "icons/hicolor/48x48/apps", "ericWeb.png")) copyDesktopFile( os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), os.path.join(localPath, "applications", "eric6_browser.desktop"))
--- a/setup.py Sat Sep 04 11:35:19 2021 +0200 +++ b/setup.py Sat Oct 30 10:41:14 2021 +0200 @@ -85,6 +85,8 @@ ('share/icons', [ 'eric6/icons/breeze-dark/eric.svg', 'eric6/icons/breeze-dark/ericWeb48.svg' + 'eric6/pixmaps/eric48_icon.png', + 'eric6/pixmaps/ericWeb48_icon.png' ]), ('share/appdata', ['linux/eric6.appdata.xml']), ('share/metainfo', ['linux/eric6.appdata.xml']), @@ -336,9 +338,9 @@ install_requires=[ "pip>=19.0", "wheel", - "PyQt5>=5.12.1,<5.15.2", - "PyQtChart>=5.12.1,<5.15.2", - "PyQtWebEngine>=5.12.1,<5.15.2", + "PyQt5>=5.12.1", + "PyQtChart>=5.12.1", + "PyQtWebEngine>=5.12.1", "QScintilla>=2.11.1", "docutils", "Markdown",