RefactoringRope/ProgressHandle.py

branch
eric5
changeset 88
e71619898d0f
parent 86
3339c75dc777
--- a/RefactoringRope/ProgressHandle.py	Sun Jul 06 14:17:24 2014 +0200
+++ b/RefactoringRope/ProgressHandle.py	Sun Jul 06 14:27:51 2014 +0200
@@ -9,8 +9,7 @@
 
 from __future__ import unicode_literals
 
-from PyQt5.QtCore import QCoreApplication
-from PyQt5.QtWidgets import QApplication, QLabel
+from PyQt4.QtGui import QApplication, QLabel
 
 import rope.base.taskhandle
 
@@ -30,17 +29,16 @@
         """
         rope.base.taskhandle.TaskHandle.__init__(self, title, interruptable)
         if interruptable:
-            cancelLabel = QCoreApplication.translate(
-                "ProgressHandle", "Interrupt")
+            cancelLabel = QApplication.translate("ProgressHandle", "Interrupt")
         else:
             cancelLabel = ""
-        barFormat = QCoreApplication.translate("ProgressHandle", "%v/%m files")
+        barFormat = QApplication.translate("ProgressHandle", "%v/%m files")
         try:
             from E5Gui.E5ProgressDialog import E5ProgressDialog
             self.__progress = E5ProgressDialog("", cancelLabel, 0, 1,
                                                barFormat, parent)
         except ImportError:
-            from PyQt5.QtWidgets import QProgressDialog, QProgressBar
+            from PyQt4.QtGui import QProgressDialog, QProgressBar
             self.__progress = QProgressDialog("", cancelLabel, 0, 1, parent)
             bar = QProgressBar(self.__progress)
             bar.setFormat(barFormat)
@@ -49,8 +47,8 @@
         label.setWordWrap(True)
         self.__progress.setLabel(label)
         self.__progress.setWindowTitle(
-            QCoreApplication.translate("ProgressHandle", "eric6 - {0}")
-            .format(title))
+            QApplication.translate("ProgressHandle", "eric5 - {0}")
+                .format(title))
         self.add_observer(self.__updateProgress)
     
     def __updateProgress(self):

eric ide

mercurial