Fix app crash log not saved

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2024-05-13 18:26:34 +08:00
parent 0534f42b3d
commit 9a5d35304f
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -225,6 +225,9 @@ class Application(ApplicationFactory, SingletonApplication):
)
logging.raiseExceptions = False
def log(self):
return self.logViewerWindowApp_.plainText()
def addCustomFont(self):
fontFile = str(DATA_DIR / 'font' / 'CascadiaMono')
fontName = 'Cascadia Mono'
+5
View File
@@ -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 _
@@ -176,6 +178,9 @@ class LogViewerWindow(AppQMainWindow):
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)