diff -r 866adc8c315b -r 0acf98cd089a eric6/Project/ProjectResourcesBrowser.py --- a/eric6/Project/ProjectResourcesBrowser.py Sun Jan 17 13:53:08 2021 +0100 +++ b/eric6/Project/ProjectResourcesBrowser.py Mon Feb 01 10:38:16 2021 +0100 @@ -23,6 +23,7 @@ from .ProjectBaseBrowser import ProjectBaseBrowser import UI.PixmapCache +from UI.NotificationWidget import NotificationTypes import Preferences import Utilities @@ -78,7 +79,8 @@ self.menu = QMenu(self) if self.project.getProjectType() in [ - "PyQt5", "PyQt5C", "E6Plugin", "PySide2", "PySide2C" + "PyQt5", "PyQt5C", "E6Plugin", + "PySide2", "PySide2C", "PySide6", "PySide6C" ]: self.menu.addAction( self.tr('Compile resource'), @@ -120,7 +122,8 @@ self.menuActions.append(act) self.menu.addSeparator() if self.project.getProjectType() in [ - "PyQt5", "PyQt5C", "E6Plugin", "PySide2", "PySide2C" + "PyQt5", "PyQt5C", "E6Plugin", + "PySide2", "PySide2C", "PySide6", "PySide6C" ]: self.menu.addAction( self.tr('New resource...'), self.__newResource) @@ -148,7 +151,8 @@ self.backMenu = QMenu(self) if self.project.getProjectType() in [ - "PyQt5", "PyQt5C", "E6Plugin", "PySide2", "PySide2C" + "PyQt5", "PyQt5C", "E6Plugin", + "PySide2", "PySide2C", "PySide6", "PySide6C" ]: self.backMenu.addAction( self.tr('Compile all resources'), @@ -190,7 +194,8 @@ # create the menu for multiple selected files self.multiMenu = QMenu(self) if self.project.getProjectType() in [ - "PyQt5", "PyQt5C", "E6Plugin", "PySide2", "PySide2C" + "PyQt5", "PyQt5C", "E6Plugin", + "PySide2", "PySide2C", "PySide6", "PySide6C" ]: act = self.multiMenu.addAction( self.tr('Compile resources'), @@ -226,7 +231,8 @@ self.dirMenu = QMenu(self) if self.project.getProjectType() in [ - "PyQt5", "PyQt5C", "E6Plugin", "PySide2", "PySide2C" + "PyQt5", "PyQt5C", "E6Plugin", + "PySide2", "PySide2C", "PySide6", "PySide6C" ]: self.dirMenu.addAction( self.tr('Compile all resources'), @@ -271,7 +277,8 @@ self.dirMultiMenu = QMenu(self) if self.project.getProjectType() in [ - "PyQt5", "PyQt5C", "E6Plugin", "PySide2", "PySide2C" + "PyQt5", "PyQt5C", "E6Plugin", + "PySide2", "PySide2C", "PySide6", "PySide6C" ]: self.dirMultiMenu.addAction( self.tr('Compile all resources'), @@ -549,7 +556,7 @@ def __readStdout(self): """ Private slot to handle the readyReadStandardOutput signal of the - pyrcc5/pyside2-rcc process. + pyrcc5/pyside2-rcc/pyside6-rcc process. """ if self.compileProc is None: return @@ -563,7 +570,7 @@ def __readStderr(self): """ Private slot to handle the readyReadStandardError signal of the - pyrcc5/pyside2-rcc/ process. + pyrcc5/pyside2-rcc/pyside6-rcc process. """ if self.compileProc is None: return @@ -600,18 +607,11 @@ f.write(line + "\n") if self.compiledFile not in self.project.pdata["SOURCES"]: self.project.appendFile(ofn) - if not self.noDialog and not ui.notificationsEnabled(): - E5MessageBox.information( - self, - self.tr("Resource Compilation"), - self.tr("The compilation of the resource file" - " was successful.")) - else: - ui.showNotification( - UI.PixmapCache.getPixmap("resourcesCompiler48"), - self.tr("Resource Compilation"), - self.tr("The compilation of the resource file" - " was successful.")) + ui.showNotification( + UI.PixmapCache.getPixmap("resourcesCompiler48"), + self.tr("Resource Compilation"), + self.tr("The compilation of the resource file" + " was successful.")) except OSError as msg: if not self.noDialog: E5MessageBox.information( @@ -621,18 +621,13 @@ "<p>The compilation of the resource file" " failed.</p><p>Reason: {0}</p>").format(str(msg))) else: - if not self.noDialog: - E5MessageBox.information( - self, - self.tr("Resource Compilation"), - self.tr( - "The compilation of the resource file failed.")) - else: - ui.showNotification( - UI.PixmapCache.getPixmap("resourcesCompiler48"), - self.tr("Resource Compilation"), - self.tr( - "The compilation of the resource file failed.")) + ui.showNotification( + UI.PixmapCache.getPixmap("resourcesCompiler48"), + self.tr("Resource Compilation"), + self.tr( + "The compilation of the resource file failed."), + kind=NotificationTypes.Critical, + timeout=0) self.compileProc = None def __compileQRC(self, fn, noDialog=False, progress=None): @@ -655,7 +650,10 @@ self.rccCompiler = Utilities.generatePyQtToolPath('pyrcc5') elif self.project.getProjectType() in ["PySide2", "PySide2C"]: self.rccCompiler = Utilities.generatePySideToolPath( - 'pyside2-rcc') + 'pyside2-rcc', variant=2) + elif self.project.getProjectType() in ["PySide6", "PySide6C"]: + self.rccCompiler = Utilities.generatePySideToolPath( + 'pyside6-rcc', variant=6) else: return None defaultParameters = self.project.getDefaultRccCompilerParameters()