Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.1.1, 6.1.2, 6.2.0 Alpha, 6.2.0 Beta1
-
None
Description
Hello
The QTextUndoCommand class itselft is "exposed" in QtGuiPrivate, but it is in its current state not really usable. We can create custom commands, but not access the commands already pushed on the stack and their content.
When creating advanced tools based on QTextDocument, accessing such a content would be very helpful in building features without having to fork the whole QTextDocument stack.
I suggest adding two new QTextDocumentPrivate functions:
// get size of undo stack int undoStackSize() const { return undoStack.size(); } // get undo stack element const QTextUndoCommand & undoCommand(int idx) const { return undoStack.at(idx); }
These two new private functions would allow new usages of QTextDocument, without changing the public API for the advanced users that would benefit from it.