eric6/Project/ProjectFormsBrowser.py

changeset 8240
93b8a353c4bf
parent 8235
78e6d29eb773
child 8243
cc717c2ae956
equal deleted inserted replaced
8239:59a9a658618c 8240:93b8a353c4bf
8 """ 8 """
9 9
10 import os 10 import os
11 import sys 11 import sys
12 import shutil 12 import shutil
13 import contextlib
13 14
14 from PyQt5.QtCore import QThread, QFileInfo, pyqtSignal, QProcess 15 from PyQt5.QtCore import QThread, QFileInfo, pyqtSignal, QProcess
15 from PyQt5.QtWidgets import QDialog, QInputDialog, QApplication, QMenu 16 from PyQt5.QtWidgets import QDialog, QInputDialog, QApplication, QMenu
16 17
17 from E5Gui.E5Application import e5App 18 from E5Gui.E5Application import e5App
499 """ 500 """
500 Private slot to handle the Open menu action. 501 Private slot to handle the Open menu action.
501 """ 502 """
502 itmList = self.getSelectedItems() 503 itmList = self.getSelectedItems()
503 for itm in itmList[:]: 504 for itm in itmList[:]:
504 try: 505 with contextlib.suppress(Exception):
505 if isinstance(itm, ProjectBrowserFileItem): 506 if isinstance(itm, ProjectBrowserFileItem):
506 # hook support 507 # hook support
507 if self.hooks["open"] is not None: 508 if self.hooks["open"] is not None:
508 self.hooks["open"](itm.fileName()) 509 self.hooks["open"](itm.fileName())
509 else: 510 else:
510 self.designerFile.emit(itm.fileName()) 511 self.designerFile.emit(itm.fileName())
511 except Exception: # secok
512 pass
513 512
514 def __openFileInEditor(self): 513 def __openFileInEditor(self):
515 """ 514 """
516 Private slot to handle the Open in Editor menu action. 515 Private slot to handle the Open in Editor menu action.
517 """ 516 """

eric ide

mercurial