Project/ProjectFormsBrowser.py

branch
maintenance
changeset 5730
6422afc7adc4
parent 5726
e1dbd217214a
child 5878
74d02cd37185
--- a/Project/ProjectFormsBrowser.py	Sun Apr 09 16:52:55 2017 +0200
+++ b/Project/ProjectFormsBrowser.py	Sat May 06 13:43:21 2017 +0200
@@ -43,12 +43,7 @@
     
     @signal appendStderr(str) emitted after something was received from
         a QProcess on stderr
-    @signal sourceFile(str) emitted to open a forms file in an editor
     @signal uipreview(str) emitted to preview a forms file
-    @signal trpreview(list of str) emitted to preview form files in the
-        translations previewer
-    @signal closeSourceWindow(str) emitted after a file has been
-        removed/deleted from the project
     @signal showMenu(str, QMenu) emitted when a menu is about to be shown. The
         name of the menu and a reference to the menu are given.
     @signal menusAboutToBeCreated() emitted when the context menus are about to
@@ -642,7 +637,7 @@
     def __readStdout(self):
         """
         Private slot to handle the readyReadStandardOutput signal of the
-        pyuic/rbuic process.
+        pyuic4/pyuic5/pyside-uic/rbuic4 process.
         """
         if self.compileProc is None:
             return
@@ -655,7 +650,7 @@
     def __readStderr(self):
         """
         Private slot to handle the readyReadStandardError signal of the
-        pyuic/rbuic process.
+        pyuic4/pyuic5/pyside-uic/rbuic4 process.
         """
         if self.compileProc is None:
             return
@@ -750,38 +745,25 @@
         if self.project.getProjectLanguage() in \
                 ["Python", "Python2", "Python3"]:
             if self.project.getProjectType() in ["Qt4", ]:
-                self.uicompiler = 'pyuic4'
-                if Utilities.isWindowsPlatform():
-                    uic = Utilities.getWindowsExecutablePath(self.uicompiler)
-                else:
-                    uic = self.uicompiler
+                self.uicompiler = Utilities.generatePyQtToolPath('pyuic4')
             elif self.project.getProjectType() in ["PyQt5"]:
-                self.uicompiler = 'pyuic5'
-                if Utilities.isWindowsPlatform():
-                    uic = Utilities.getWindowsExecutablePath(self.uicompiler)
-                else:
-                    uic = self.uicompiler
+                self.uicompiler = Utilities.generatePyQtToolPath('pyuic5')
             elif self.project.getProjectType() in ["E6Plugin"]:
                 if PYQT_VERSION < 0x050000:
-                    self.uicompiler = 'pyuic4'
+                    self.uicompiler = Utilities.generatePyQtToolPath('pyuic4')
                 else:
-                    self.uicompiler = 'pyuic5'
-                if Utilities.isWindowsPlatform():
-                    uic = Utilities.getWindowsExecutablePath(self.uicompiler)
-                else:
-                    uic = self.uicompiler
+                    self.uicompiler = Utilities.generatePyQtToolPath('pyuic5')
             elif self.project.getProjectType() == "PySide":
-                self.uicompiler = 'pyside-uic'
-                uic = Utilities.generatePySideToolPath(self.uicompiler)
+                self.uicompiler = \
+                    Utilities.generatePySideToolPath('pyside-uic')
             else:
                 return None
         elif self.project.getProjectLanguage() == "Ruby":
             if self.project.getProjectType() == "Qt4":
                 self.uicompiler = 'rbuic4'
                 if Utilities.isWindowsPlatform():
-                    uic = Utilities.getWindowsExecutablePath(self.uicompiler)
-                else:
-                    uic = self.uicompiler
+                    self.uicompiler = \
+                        Utilities.getWindowsExecutablePath(self.uicompiler)
             else:
                 return None
         else:
@@ -810,7 +792,7 @@
         self.compileProc.readyReadStandardError.connect(self.__readStderr)
         
         self.noDialog = noDialog
-        self.compileProc.start(uic, args)
+        self.compileProc.start(self.uicompiler, args)
         procStarted = self.compileProc.waitForStarted(5000)
         if procStarted:
             self.compileRunning = True

eric ide

mercurial