19 from eric7.EricGui import EricPixmapCache |
19 from eric7.EricGui import EricPixmapCache |
20 from eric7.EricGui.EricAction import EricAction, createActionGroup |
20 from eric7.EricGui.EricAction import EricAction, createActionGroup |
21 from eric7.EricGui.EricOverrideCursor import EricOverrideCursor |
21 from eric7.EricGui.EricOverrideCursor import EricOverrideCursor |
22 from eric7.EricWidgets import EricFileDialog, EricMessageBox, EricPathPickerDialog |
22 from eric7.EricWidgets import EricFileDialog, EricMessageBox, EricPathPickerDialog |
23 from eric7.EricWidgets.EricPathPickerDialog import EricPathPickerModes |
23 from eric7.EricWidgets.EricPathPickerDialog import EricPathPickerModes |
|
24 from eric7.EricXML.MultiProjectReader import MultiProjectReader |
24 from eric7.Globals import recentNameMultiProject |
25 from eric7.Globals import recentNameMultiProject |
25 from eric7.UI import Config |
26 from eric7.UI import Config |
26 |
27 |
27 from .MultiProjectFile import MultiProjectFile |
28 from .MultiProjectFile import MultiProjectFile |
28 |
29 |
227 else: |
228 else: |
228 # old XML based format |
229 # old XML based format |
229 f = QFile(fn) |
230 f = QFile(fn) |
230 if f.open(QIODevice.OpenModeFlag.ReadOnly): |
231 if f.open(QIODevice.OpenModeFlag.ReadOnly): |
231 with EricOverrideCursor(): |
232 with EricOverrideCursor(): |
232 from eric7.EricXML.MultiProjectReader import MultiProjectReader |
|
233 |
|
234 reader = MultiProjectReader(f, self) |
233 reader = MultiProjectReader(f, self) |
235 reader.readXML() |
234 reader.readXML() |
236 f.close() |
235 f.close() |
237 res = not reader.hasError() |
236 res = not reader.hasError() |
238 else: |
237 else: |
485 Private slot to build a new multi project. |
484 Private slot to build a new multi project. |
486 |
485 |
487 This method displays the new multi project dialog and initializes |
486 This method displays the new multi project dialog and initializes |
488 the multi project object with the data entered. |
487 the multi project object with the data entered. |
489 """ |
488 """ |
|
489 from .PropertiesDialog import PropertiesDialog |
|
490 |
490 if not self.checkDirty(): |
491 if not self.checkDirty(): |
491 return |
492 return |
492 |
|
493 from .PropertiesDialog import PropertiesDialog |
|
494 |
493 |
495 dlg = PropertiesDialog(self, True) |
494 dlg = PropertiesDialog(self, True) |
496 if dlg.exec() == QDialog.DialogCode.Accepted: |
495 if dlg.exec() == QDialog.DialogCode.Accepted: |
497 self.closeMultiProject() |
496 self.closeMultiProject() |
498 dlg.storeData() |
497 dlg.storeData() |