8242:aa713ac50c0d | 8243:cc717c2ae956 |
---|---|
7 Module implementing the view manager base class. | 7 Module implementing the view manager base class. |
8 """ | 8 """ |
9 | 9 |
10 import re | 10 import re |
11 import os | 11 import os |
12 import contextlib | |
12 | 13 |
13 from PyQt5.QtCore import ( | 14 from PyQt5.QtCore import ( |
14 pyqtSignal, pyqtSlot, Qt, QSignalMapper, QTimer, QFileInfo, QPoint, | 15 pyqtSignal, pyqtSlot, Qt, QSignalMapper, QTimer, QFileInfo, QPoint, |
15 QCoreApplication | 16 QCoreApplication |
16 ) | 17 ) |
6283 | 6284 |
6284 If it cannot close all editor windows, it aborts the shutdown process. | 6285 If it cannot close all editor windows, it aborts the shutdown process. |
6285 | 6286 |
6286 @return flag indicating success (boolean) | 6287 @return flag indicating success (boolean) |
6287 """ | 6288 """ |
6288 try: | 6289 with contextlib.suppress(TypeError): |
6289 e5App().focusChanged.disconnect(self.appFocusChanged) | 6290 e5App().focusChanged.disconnect(self.appFocusChanged) |
6290 except TypeError: | |
6291 pass | |
6292 | 6291 |
6293 self.closeAllWindows() | 6292 self.closeAllWindows() |
6294 self.currentEditor = None | 6293 self.currentEditor = None |
6295 | 6294 |
6296 # save the list of recently opened projects | 6295 # save the list of recently opened projects |