From e8ccbd693d121d8c7492d988f26de0b16031d2f4 Mon Sep 17 00:00:00 2001 From: AngryFender Date: Wed, 27 Mar 2024 23:42:42 +0000 Subject: [PATCH] Github Issue #29: First step to implement faster and dynamic way to save the file --- mktextdocument.cpp | 5 +++++ mktextdocument.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/mktextdocument.cpp b/mktextdocument.cpp index c9f9ccb..ea33206 100644 --- a/mktextdocument.cpp +++ b/mktextdocument.cpp @@ -85,6 +85,11 @@ QString MkTextDocument::getFileName() const return this->fileName; } +QTextDocument *MkTextDocument::getRawDocument() +{ + return &rawDocument; +} + void MkTextDocument::cursorPosChangedHandle( bool hasSelection, int blockNumber,QRect rect, SelectRange * range) { if(range){ diff --git a/mktextdocument.h b/mktextdocument.h index c2a9cf8..5832353 100644 --- a/mktextdocument.h +++ b/mktextdocument.h @@ -99,6 +99,7 @@ class MkTextDocument : public QTextDocument int getCharacterNo()const; QString getFilePath() const; QString getFileName() const; + QTextDocument* getRawDocument(); public slots: void cursorPosChangedHandle(bool hasSelection, int blockNumber,QRect rect, SelectRange * range); @@ -142,6 +143,7 @@ public slots: QTextDocument originalTexts; QTextDocument formattedTexts; + QTextDocument rawDocument; QString filePath; QString fileName;