10 import os |
10 import os |
11 |
11 |
12 from PyQt6.QtCore import pyqtSlot |
12 from PyQt6.QtCore import pyqtSlot |
13 from PyQt6.QtWidgets import QDialogButtonBox, QAbstractButton |
13 from PyQt6.QtWidgets import QDialogButtonBox, QAbstractButton |
14 |
14 |
15 from eric7 import Utilities |
|
16 from eric7.EricWidgets import EricFileDialog, EricMessageBox |
15 from eric7.EricWidgets import EricFileDialog, EricMessageBox |
17 from eric7.EricWidgets.EricApplication import ericApp |
16 from eric7.EricWidgets.EricApplication import ericApp |
18 from eric7.EricWidgets.EricCompleters import EricFileCompleter |
17 from eric7.EricWidgets.EricCompleters import EricFileCompleter |
|
18 |
|
19 try: |
|
20 from eric7.SystemUtilities.FileSystemUtilities import ( |
|
21 toNativeSeparators |
|
22 ) |
|
23 except ImportError: |
|
24 # imports for eric < 23.1 |
|
25 from eric7.Utilities import toNativeSeparators |
19 |
26 |
20 from .Ui_MoveDialog import Ui_MoveDialog |
27 from .Ui_MoveDialog import Ui_MoveDialog |
21 from .RefactoringDialogBase import RefactoringDialogBase |
28 from .RefactoringDialogBase import RefactoringDialogBase |
22 |
29 |
23 |
30 |
192 # move_module |
199 # move_module |
193 EricFileDialog.getExistingDirectory(self, self.windowTitle(), dest) |
200 EricFileDialog.getExistingDirectory(self, self.windowTitle(), dest) |
194 ) |
201 ) |
195 |
202 |
196 if destination: |
203 if destination: |
197 destination = Utilities.toNativeSeparators(destination) |
204 destination = toNativeSeparators(destination) |
198 if not self.__project.startswithProjectPath(destination): |
205 if not self.__project.startswithProjectPath(destination): |
199 if self.__moveType == "move_global_method": |
206 if self.__moveType == "move_global_method": |
200 errorMessage = self.tr( |
207 errorMessage = self.tr( |
201 """The selected module must be """ """inside the project.""" |
208 """The selected module must be """ """inside the project.""" |
202 ) |
209 ) |