Project/ProjectFormsBrowser.py

changeset 6291
94e0e688dcad
parent 6048
82ad8ec9548c
child 6292
e08a94e1ecdd
--- a/Project/ProjectFormsBrowser.py	Tue May 15 18:25:26 2018 +0200
+++ b/Project/ProjectFormsBrowser.py	Tue May 15 19:39:46 2018 +0200
@@ -126,7 +126,7 @@
         
         self.menu = QMenu(self)
         if self.project.getProjectType() in \
-                ["Qt4", "PyQt5", "E6Plugin", "PySide"]:
+                ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"]:
             self.menu.addAction(
                 self.tr('Compile form'), self.__compileForm)
             self.menu.addAction(
@@ -181,7 +181,7 @@
         self.menuActions.append(act)
         self.menu.addSeparator()
         if self.project.getProjectType() in \
-                ["Qt4", "PyQt5", "E6Plugin", "PySide"]:
+                ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"]:
             self.menu.addAction(self.tr('New form...'), self.__newForm)
         else:
             if self.hooks["newForm"] is not None:
@@ -204,7 +204,7 @@
 
         self.backMenu = QMenu(self)
         if self.project.getProjectType() in \
-                ["Qt4", "PyQt5", "E6Plugin", "PySide"] or \
+                ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"] or \
                 self.hooks["compileAllForms"] is not None:
             self.backMenu.addAction(
                 self.tr('Compile all forms'), self.__compileAllForms)
@@ -231,7 +231,7 @@
         # create the menu for multiple selected files
         self.multiMenu = QMenu(self)
         if self.project.getProjectType() in \
-                ["Qt4", "PyQt5", "E6Plugin", "PySide"]:
+                ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"]:
             act = self.multiMenu.addAction(
                 self.tr('Compile forms'), self.__compileSelectedForms)
             self.multiMenu.addSeparator()
@@ -273,7 +273,7 @@
 
         self.dirMenu = QMenu(self)
         if self.project.getProjectType() in \
-                ["Qt4", "PyQt5", "E6Plugin", "PySide"]:
+                ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"]:
             self.dirMenu.addAction(
                 self.tr('Compile all forms'), self.__compileAllForms)
             self.dirMenu.addSeparator()
@@ -293,7 +293,7 @@
         self.dirMenuActions.append(act)
         self.dirMenu.addSeparator()
         if self.project.getProjectType() in \
-                ["Qt4", "PyQt5", "E6Plugin", "PySide"]:
+                ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"]:
             self.dirMenu.addAction(self.tr('New form...'), self.__newForm)
         else:
             if self.hooks["newForm"] is not None:
@@ -318,7 +318,7 @@
         
         self.dirMultiMenu = QMenu(self)
         if self.project.getProjectType() in \
-                ["Qt4", "PyQt5", "E6Plugin", "PySide"]:
+                ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"]:
             self.dirMultiMenu.addAction(
                 self.tr('Compile all forms'), self.__compileAllForms)
             self.dirMultiMenu.addSeparator()
@@ -536,7 +536,7 @@
             self.hooks["newForm"](path)
         else:
             if self.project.getProjectType() in \
-                    ["Qt4", "PyQt5", "E6Plugin", "PySide"]:
+                    ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"]:
                 self.__newUiForm(path)
         
     def __newUiForm(self, path):
@@ -637,7 +637,7 @@
     def __readStdout(self):
         """
         Private slot to handle the readyReadStandardOutput signal of the
-        pyuic4/pyuic5/pyside-uic/rbuic4 process.
+        pyuic4/pyuic5/pyside-uic/pyside2-uic/rbuic4 process.
         """
         if self.compileProc is None:
             return
@@ -650,7 +650,7 @@
     def __readStderr(self):
         """
         Private slot to handle the readyReadStandardError signal of the
-        pyuic4/pyuic5/pyside-uic/rbuic4 process.
+        pyuic4/pyuic5/pyside-uic/pyside2-uic/rbuic4 process.
         """
         if self.compileProc is None:
             return
@@ -759,7 +759,8 @@
                         'pyuic5', ["py3uic5", "py2uic5"])
             elif self.project.getProjectType() == "PySide":
                 self.uicompiler = \
-                    Utilities.generatePySideToolPath('pyside-uic')
+                    Utilities.generatePySideToolPath('pyside-uic', "1")
+            # TODO: add entry for PySide2
             else:
                 return None
         elif self.project.getProjectLanguage() == "Ruby":
@@ -932,7 +933,7 @@
             self.hooks["compileChangedForms"](self.project.pdata["FORMS"])
         else:
             if self.project.getProjectType() not in \
-               ["Qt4", "PyQt5", "E6Plugin", "PySide"]:
+               ["Qt4", "PyQt5", "E6Plugin", "PySide", "PySide2"]:
                 # ignore the request for non Qt GUI projects
                 return
             

eric ide

mercurial