diff options
Diffstat (limited to 'src/gui/text/qtextdocument_p.h')
-rw-r--r-- | src/gui/text/qtextdocument_p.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index b7bc1f4..fb35239 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -139,7 +139,7 @@ public: MoveCursor = 1 }; quint16 command; - quint8 block; ///< All undo commands that have this set to zero/false are combined with the preceding command on undo/redo. + quint8 block; ///< All undo commands that have this set to true are combined with the preceding command on undo/redo. quint8 operation; int format; quint32 strPos; @@ -202,6 +202,8 @@ public: inline void beginEditBlock() { editBlock++; } void joinPreviousEditBlock(); void endEditBlock(); + inline void beginEdit() { inEdit = true; } + void finishEdit(); inline bool isInEditBlock() const { return editBlock; } void enableUndoRedo(bool enable); inline bool isUndoRedoEnabled() const { return undoEnabled; } @@ -334,8 +336,9 @@ public: QCss::StyleSheet parsedDefaultStyleSheet; #endif int maximumBlockCount; - bool needsEnsureMaximumBlockCount; - bool inContentsChange; + uint needsEnsureMaximumBlockCount : 1; + uint inContentsChange : 1; + uint inEdit : 1; // between beginEdit() and finishEdit() QSizeF pageSize; QString title; QString url; |