DataViews/PyProfileDialog.py

changeset 3190
a9a94491c4fd
parent 3160
209a07d7e401
child 3438
29717a5e8b97
--- a/DataViews/PyProfileDialog.py	Fri Jan 10 19:30:21 2014 +0100
+++ b/DataViews/PyProfileDialog.py	Sat Jan 11 11:55:33 2014 +0100
@@ -80,15 +80,15 @@
         
         self.__menu = QMenu(self)
         self.filterItm = self.__menu.addAction(
-            self.trUtf8('Exclude Python Library'),
+            self.tr('Exclude Python Library'),
             self.__filter)
         self.__menu.addSeparator()
         self.__menu.addAction(
-            self.trUtf8('Erase Profiling Info'), self.__eraseProfile)
+            self.tr('Erase Profiling Info'), self.__eraseProfile)
         self.__menu.addAction(
-            self.trUtf8('Erase Timing Info'), self.__eraseTiming)
+            self.tr('Erase Timing Info'), self.__eraseTiming)
         self.__menu.addSeparator()
-        self.__menu.addAction(self.trUtf8('Erase All Infos'), self.__eraseAll)
+        self.__menu.addAction(self.tr('Erase All Infos'), self.__eraseAll)
         self.resultList.setContextMenuPolicy(Qt.CustomContextMenu)
         self.resultList.customContextMenuRequested.connect(
             self.__showContextMenu)
@@ -208,12 +208,12 @@
         self.__resortResultList()
         
         # now do the summary stuff
-        self.__createSummaryItem(self.trUtf8("function calls"),
+        self.__createSummaryItem(self.tr("function calls"),
                                  str(total_calls))
         if total_calls != prim_calls:
-            self.__createSummaryItem(self.trUtf8("primitive calls"),
+            self.__createSummaryItem(self.tr("primitive calls"),
                                      str(prim_calls))
-        self.__createSummaryItem(self.trUtf8("CPU seconds"),
+        self.__createSummaryItem(self.tr("CPU seconds"),
                                  "{0:.3f}".format(total_tt))
         
     def start(self, pfn, fn=None):
@@ -229,9 +229,9 @@
         if not os.path.exists(fname):
             E5MessageBox.warning(
                 self,
-                self.trUtf8("Profile Results"),
-                self.trUtf8("""<p>There is no profiling data"""
-                            """ available for <b>{0}</b>.</p>""")
+                self.tr("Profile Results"),
+                self.tr("""<p>There is no profiling data"""
+                        """ available for <b>{0}</b>.</p>""")
                 .format(pfn))
             self.close()
             return
@@ -242,9 +242,9 @@
         except (EnvironmentError, pickle.PickleError, EOFError):
             E5MessageBox.critical(
                 self,
-                self.trUtf8("Loading Profiling Data"),
-                self.trUtf8("""<p>The profiling data could not be"""
-                            """ read from file <b>{0}</b>.</p>""")
+                self.tr("Loading Profiling Data"),
+                self.tr("""<p>The profiling data could not be"""
+                        """ read from file <b>{0}</b>.</p>""")
                 .format(fname))
             self.close()
             return
@@ -327,10 +327,10 @@
         self.__unfinish()
         if self.exclude:
             self.exclude = False
-            self.filterItm.setText(self.trUtf8('Include Python Library'))
+            self.filterItm.setText(self.tr('Include Python Library'))
             self.__populateLists(True)
         else:
             self.exclude = True
-            self.filterItm.setText(self.trUtf8('Exclude Python Library'))
+            self.filterItm.setText(self.tr('Exclude Python Library'))
             self.__populateLists(False)
         self.__finish()

eric ide

mercurial