RefactoringRope/RenameDialog.py

branch
eric7
changeset 365
f740b50380df
parent 347
b5048b5ff454
child 374
958f34e97952
diff -r a92b3272f4c1 -r f740b50380df RefactoringRope/RenameDialog.py
--- a/RefactoringRope/RenameDialog.py	Wed May 26 17:53:08 2021 +0200
+++ b/RefactoringRope/RenameDialog.py	Wed May 26 19:07:42 2021 +0200
@@ -7,11 +7,11 @@
 Module implementing the Rename dialog.
 """
 
-from PyQt5.QtCore import pyqtSlot
-from PyQt5.QtWidgets import QDialogButtonBox, QAbstractButton
+from PyQt6.QtCore import pyqtSlot
+from PyQt6.QtWidgets import QDialogButtonBox, QAbstractButton
 
-from E5Gui.E5Application import e5App
-from E5Gui import E5MessageBox
+from EricWidgets.EricApplication import ericApp
+from EricWidgets import EricMessageBox
 
 from .Ui_RenameDialog import Ui_RenameDialog
 from .RefactoringDialogBase import RefactoringDialogBase
@@ -51,10 +51,11 @@
         self.__offset = offset
         self.__local = isLocal
         
-        self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok)
+        self.__okButton = self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Ok)
         self.__okButton.setEnabled(False)
         self.__previewButton = self.buttonBox.addButton(
-            self.tr("Preview"), QDialogButtonBox.ActionRole)
+            self.tr("Preview"), QDialogButtonBox.ButtonRole.ActionRole)
         self.__previewButton.setDefault(True)
         self.__previewButton.setEnabled(False)
         
@@ -104,7 +105,7 @@
             start = data["StartOffset"]
             end = data["EndOffset"]
             
-            vm = e5App().getObject("ViewManager")
+            vm = ericApp().getObject("ViewManager")
             
             # display the file and select the match
             vm.openSourceFile(filename)
@@ -116,7 +117,7 @@
             aw.gotoLine(sline)
             aw.setSelection(sline, sindex, eline, eindex)
             
-            answer = E5MessageBox.yesNo(
+            answer = EricMessageBox.yesNo(
                 self._ui,
                 self.tr("Rename"),
                 self.tr("""<p>Is the highlighted code a match?</p>"""),

eric ide

mercurial