eric6/Project/ProjectFormsBrowser.py

changeset 8143
2c730d5fd177
parent 7959
44e15eda6506
child 8176
31965986ecd1
child 8220
006ee31b4835
--- a/eric6/Project/ProjectFormsBrowser.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Project/ProjectFormsBrowser.py	Tue Mar 02 17:17:09 2021 +0100
@@ -662,7 +662,7 @@
                 "Do you really want to delete these forms from the project?"),
             files)
         
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             for fn2, fn in zip(fullNames, files):
                 self.closeSourceWindow.emit(fn2)
                 self.project.deleteFile(fn)
@@ -719,7 +719,7 @@
         """
         if self.compileProc is None:
             return
-        self.compileProc.setReadChannel(QProcess.StandardOutput)
+        self.compileProc.setReadChannel(QProcess.ProcessChannel.StandardOutput)
         
         while self.compileProc and self.compileProc.canReadLine():
             self.buf += str(self.compileProc.readLine(),
@@ -735,7 +735,7 @@
         
         ioEncoding = Preferences.getSystem("IOEncoding")
         
-        self.compileProc.setReadChannel(QProcess.StandardError)
+        self.compileProc.setReadChannel(QProcess.ProcessChannel.StandardError)
         while self.compileProc and self.compileProc.canReadLine():
             s = self.__uicompiler + ': '
             error = str(self.compileProc.readLine(),
@@ -753,7 +753,11 @@
         self.compileRunning = False
         e5App().getObject("ViewManager").enableEditorsCheckFocusIn(True)
         ui = e5App().getObject("UserInterface")
-        if exitStatus == QProcess.NormalExit and exitCode == 0 and self.buf:
+        if (
+            exitStatus == QProcess.ExitStatus.NormalExit and
+            exitCode == 0 and
+            self.buf
+        ):
             ofn = os.path.join(self.project.ppath, self.compiledFile)
             try:
                 if self.project.useSystemEol():
@@ -937,7 +941,7 @@
                 
                 proc = self.__compileUI(fn, True, progress)
                 if proc is not None:
-                    while proc.state() == QProcess.Running:
+                    while proc.state() == QProcess.ProcessState.Running:
                         QApplication.processEvents()
                         QThread.msleep(300)
                         QApplication.processEvents()
@@ -975,7 +979,7 @@
                 
                 proc = self.__compileUI(fn, True, progress)
                 if proc is not None:
-                    while proc.state() == QProcess.Running:
+                    while proc.state() == QProcess.ProcessState.Running:
                         QApplication.processEvents()
                         QThread.msleep(300)
                         QApplication.processEvents()
@@ -1041,7 +1045,7 @@
                     
                     proc = self.__compileUI(fn, True, progress)
                     if proc is not None:
-                        while proc.state() == QProcess.Running:
+                        while proc.state() == QProcess.ProcessState.Running:
                             QApplication.processEvents()
                             QThread.msleep(300)
                             QApplication.processEvents()
@@ -1069,7 +1073,7 @@
         
         if self.project.getProjectType() in ["PyQt5", "PyQt6", "E6Plugin"]:
             dlg = UicCompilerOptionsDialog(params, self.getUiCompiler())
-            if dlg.exec() == QDialog.Accepted:
+            if dlg.exec() == QDialog.DialogCode.Accepted:
                 package, suffix, root = dlg.getData()
                 if package != params["Package"]:
                     params["Package"] = package

eric ide

mercurial