eric6/Project/ProjectResourcesBrowser.py

changeset 8143
2c730d5fd177
parent 7959
44e15eda6506
child 8176
31965986ecd1
child 8220
006ee31b4835
--- a/eric6/Project/ProjectResourcesBrowser.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Project/ProjectResourcesBrowser.py	Tue Mar 02 17:17:09 2021 +0100
@@ -544,7 +544,7 @@
                 " 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)
@@ -560,7 +560,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(),
@@ -577,7 +577,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.rccCompiler + ': '
             error = str(self.compileProc.readLine(),
@@ -595,7 +595,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():
@@ -754,7 +758,7 @@
                     break
                 proc = self.__compileQRC(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()
@@ -792,7 +796,7 @@
                 if not fn.endswith('.ui.h'):
                     proc = self.__compileQRC(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()
@@ -898,7 +902,7 @@
                         break
                     proc = self.__compileQRC(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()
@@ -923,7 +927,7 @@
         params = self.project.pdata["RCCPARAMS"]
         
         dlg = RccCompilerOptionsDialog(params)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             threshold, compression, noCompression, root = dlg.getData()
             if threshold != params["CompressionThreshold"]:
                 params["CompressionThreshold"] = threshold

eric ide

mercurial