Skip to content

Commit

Permalink
Fix app crash log not saved
Browse files Browse the repository at this point in the history
Signed-off-by: Loren Eteval <[email protected]>
  • Loading branch information
LorenEteval committed May 13, 2024
1 parent 0534f42 commit 9a5d353
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Furious/Widget/Application.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ def configureLogging(self):
)
logging.raiseExceptions = False

def log(self):
return self.logViewerWindowApp_.plainText()

def addCustomFont(self):
fontFile = str(DATA_DIR / 'font' / 'CascadiaMono')
fontName = 'Cascadia Mono'
Expand Down
5 changes: 5 additions & 0 deletions Furious/Window/LogViewerWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

from __future__ import annotations

from Furious.QtFramework import *
from Furious.QtFramework import gettext as _

Expand Down Expand Up @@ -176,6 +178,9 @@ def __init__(self, *args, **kwargs):
self.menuBar().addMenu(self._editMenu)
self.menuBar().addMenu(self._viewMenu)

def plainText(self) -> str:
return self.textBrowser.toPlainText()

def appendLine(self, line: str):
self.textBrowser.appendLine(line)

Expand Down

0 comments on commit 9a5d353

Please sign in to comment.