2779 what to do with it. |
2779 what to do with it. |
2780 """ |
2780 """ |
2781 if Preferences.getUI("CheckErrorLog"): |
2781 if Preferences.getUI("CheckErrorLog"): |
2782 logFile = os.path.join(Utilities.getConfigDir(), "eric5_error.log") |
2782 logFile = os.path.join(Utilities.getConfigDir(), "eric5_error.log") |
2783 if os.path.exists(logFile): |
2783 if os.path.exists(logFile): |
2784 dlg = QMessageBox(QMessageBox.Question, self.trUtf8("Error log found"), |
2784 dlg = QMessageBox(QMessageBox.Question, |
|
2785 self.trUtf8("Error log found"), |
2785 self.trUtf8("An error log file was found. " |
2786 self.trUtf8("An error log file was found. " |
2786 "What should be done with it?")) |
2787 "What should be done with it?")) |
|
2788 dlg.setParent(self) |
|
2789 dlg.setWindowModality(Qt.WindowModal) |
2787 try: |
2790 try: |
2788 f = open(logFile, "r", encoding = "utf-8") |
2791 f = open(logFile, "r", encoding = "utf-8") |
2789 txt = f.read() |
2792 txt = f.read() |
2790 f.close() |
2793 f.close() |
2791 dlg.setDetailedText(txt) |
2794 dlg.setDetailedText(txt) |