From eee843173b5f1f3d7e7d7fc1a822f0e735378d38 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 6 Dec 2017 09:28:30 -0500 Subject: Add better handling of read-only files in LTE. --- src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h') diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h index ec6c6bf7..b0a6cbc7 100644 --- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h +++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h @@ -33,6 +33,7 @@ public: QString currentFile(); bool hasChange(); + bool readOnlyFile(); //Functions for managing the line number widget (internal - do not need to run directly) int LNWWidth(); //replacing the LNW size hint detection @@ -55,8 +56,9 @@ private: void clearMatchData(); void highlightMatch(QChar ch, bool forward, int fromPos, QChar startch); - //Flags to keep track of changes - bool hasChanges; + //Flags to keep track of changes/status + bool hasChanges, readonly; + private slots: //Functions for managing the line number widget void LNW_updateWidth(); // Tied to the QPlainTextEdit::blockCountChanged() signal @@ -68,7 +70,7 @@ private slots: void textChanged(); void cursorMoved(); //Function for prompting the user if the file changed externally - void fileChanged(); + void fileChanged(); protected: void resizeEvent(QResizeEvent *ev); -- cgit