4777 user, what to do with it. |
4777 user, what to do with it. |
4778 """ |
4778 """ |
4779 from .ErrorLogDialog import ErrorLogDialog |
4779 from .ErrorLogDialog import ErrorLogDialog |
4780 |
4780 |
4781 if Preferences.getUI("CheckErrorLog"): |
4781 if Preferences.getUI("CheckErrorLog"): |
4782 logFile = os.path.join(Globals.getConfigDir(), self.ErrorLogFileName) |
4782 logFile = os.path.join(EricUtilities.getConfigDir(), self.ErrorLogFileName) |
4783 if os.path.exists(logFile): |
4783 if os.path.exists(logFile): |
4784 dlg = ErrorLogDialog(logFile, False, self) |
4784 dlg = ErrorLogDialog(logFile, False, self) |
4785 dlg.exec() |
4785 dlg.exec() |
4786 |
4786 |
4787 def __hasErrorLog(self): |
4787 def __hasErrorLog(self): |
4789 Private method to check, if an error log file exists. |
4789 Private method to check, if an error log file exists. |
4790 |
4790 |
4791 @return flag indicating the existence of an error log file |
4791 @return flag indicating the existence of an error log file |
4792 @rtype bool |
4792 @rtype bool |
4793 """ |
4793 """ |
4794 logFile = os.path.join(Globals.getConfigDir(), self.ErrorLogFileName) |
4794 logFile = os.path.join(EricUtilities.getConfigDir(), self.ErrorLogFileName) |
4795 return os.path.exists(logFile) |
4795 return os.path.exists(logFile) |
4796 |
4796 |
4797 def __showErrorLog(self): |
4797 def __showErrorLog(self): |
4798 """ |
4798 """ |
4799 Private slot to show the most recent error log message. |
4799 Private slot to show the most recent error log message. |
4800 """ |
4800 """ |
4801 from .ErrorLogDialog import ErrorLogDialog |
4801 from .ErrorLogDialog import ErrorLogDialog |
4802 |
4802 |
4803 logFile = os.path.join(Globals.getConfigDir(), self.ErrorLogFileName) |
4803 logFile = os.path.join(EricUtilities.getConfigDir(), self.ErrorLogFileName) |
4804 if os.path.exists(logFile): |
4804 if os.path.exists(logFile): |
4805 dlg = ErrorLogDialog(logFile, True, self) |
4805 dlg = ErrorLogDialog(logFile, True, self) |
4806 dlg.show() |
4806 dlg.show() |
4807 |
4807 |
4808 def __showInstallInfo(self): |
4808 def __showInstallInfo(self): |
7748 |
7748 |
7749 def __writeTasks(self): |
7749 def __writeTasks(self): |
7750 """ |
7750 """ |
7751 Private slot to write the tasks data to a JSON file (.etj). |
7751 Private slot to write the tasks data to a JSON file (.etj). |
7752 """ |
7752 """ |
7753 fn = os.path.join(Globals.getConfigDir(), "eric7tasks.etj") |
7753 fn = os.path.join(EricUtilities.getConfigDir(), "eric7tasks.etj") |
7754 self.__tasksFile.writeFile(fn) |
7754 self.__tasksFile.writeFile(fn) |
7755 |
7755 |
7756 def __readTasks(self): |
7756 def __readTasks(self): |
7757 """ |
7757 """ |
7758 Private slot to read in the tasks file (.etj). |
7758 Private slot to read in the tasks file (.etj). |
7759 """ |
7759 """ |
7760 fn = os.path.join(Globals.getConfigDir(), "eric7tasks.etj") |
7760 fn = os.path.join(EricUtilities.getConfigDir(), "eric7tasks.etj") |
7761 if os.path.exists(fn): |
7761 if os.path.exists(fn): |
7762 self.__tasksFile.readFile(fn) |
7762 self.__tasksFile.readFile(fn) |
7763 |
7763 |
7764 @pyqtSlot() |
7764 @pyqtSlot() |
7765 def __showSessionsMenu(self): |
7765 def __showSessionsMenu(self): |
7879 @type bool (optional) |
7879 @type bool (optional) |
7880 @return crash session file path |
7880 @return crash session file path |
7881 @rtype str |
7881 @rtype str |
7882 """ |
7882 """ |
7883 if globPattern: |
7883 if globPattern: |
7884 return os.path.join(Globals.getConfigDir(), "eric7_crash_session_*.esj") |
7884 return os.path.join( |
|
7885 EricUtilities.getConfigDir(), "eric7_crash_session_*.esj" |
|
7886 ) |
7885 else: |
7887 else: |
7886 return os.path.join( |
7888 return os.path.join( |
7887 Globals.getConfigDir(), f"eric7_crash_session_{os.getpid()}.esj" |
7889 EricUtilities.getConfigDir(), f"eric7_crash_session_{os.getpid()}.esj" |
7888 ) |
7890 ) |
7889 |
7891 |
7890 def __getCrashedSessions(self): |
7892 def __getCrashedSessions(self): |
7891 """ |
7893 """ |
7892 Private method to get a list of crash session file paths of crashed sessions. |
7894 Private method to get a list of crash session file paths of crashed sessions. |