eric6/Project/ProjectTranslationsBrowser.py

changeset 8143
2c730d5fd177
parent 8001
3b33b7d493ff
child 8176
31965986ecd1
child 8217
385f60c94548
--- a/eric6/Project/ProjectTranslationsBrowser.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Project/ProjectTranslationsBrowser.py	Tue Mar 02 17:17:09 2021 +0100
@@ -691,7 +691,7 @@
                     " from the project?"),
             translationFiles)
         
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             for fn in translationFiles:
                 self.closeSourceWindow.emit(fn)
                 self.project.deleteLanguageFile(fn)
@@ -870,7 +870,7 @@
         """
         ioEncoding = Preferences.getSystem("IOEncoding")
         
-        proc.setReadChannel(QProcess.StandardOutput)
+        proc.setReadChannel(QProcess.ProcessChannel.StandardOutput)
         while proc and proc.canReadLine():
             s = ps
             output = str(proc.readLine(), ioEncoding, 'replace')
@@ -906,7 +906,7 @@
         """
         ioEncoding = Preferences.getSystem("IOEncoding")
         
-        proc.setReadChannel(QProcess.StandardError)
+        proc.setReadChannel(QProcess.ProcessChannel.StandardError)
         while proc and proc.canReadLine():
             s = ps
             error = str(proc.readLine(), ioEncoding, 'replace')
@@ -936,7 +936,7 @@
         @type QProcess.ExitStatus
         """
         ui = e5App().getObject("UserInterface")
-        if exitStatus == QProcess.NormalExit and exitCode == 0:
+        if exitStatus == QProcess.ExitStatus.NormalExit and exitCode == 0:
             ui.showNotification(
                 UI.PixmapCache.getPixmap("linguist48"),
                 self.tr("Translation file generation"),
@@ -944,7 +944,7 @@
                     "The generation of the translation files (*.ts)"
                     " was successful."))
         else:
-            if exitStatus == QProcess.CrashExit:
+            if exitStatus == QProcess.ExitStatus.CrashExit:
                 info = self.tr(" The process has crashed.")
             else:
                 info = ""
@@ -1189,7 +1189,7 @@
         @type QProcess.ExitStatus
         """
         ui = e5App().getObject("UserInterface")
-        if exitStatus == QProcess.NormalExit and exitCode == 0:
+        if exitStatus == QProcess.ExitStatus.NormalExit and exitCode == 0:
             ui.showNotification(
                 UI.PixmapCache.getPixmap("linguist48"),
                 self.tr("Translation file release"),

eric ide

mercurial