TextEditor: Allow overwriting undo handling

In preparation for CompilerExplorer undo / redo handling.

Change-Id: Iefad5cc497c8e439f626e375fe8862526b52a36e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2023-08-31 08:50:11 +02:00
parent 37022ff0df
commit 705232c737
3 changed files with 43 additions and 5 deletions

View File

@@ -50,6 +50,12 @@ public:
~TextEditorActionHandler();
void updateCurrentEditor();
void updateActions();
using Predicate = std::function<bool(Core::IEditor *editor)>;
void setCanUndoCallback(const Predicate &callback);
void setCanRedoCallback(const Predicate &callback);
private:
Internal::TextEditorActionHandlerPrivate *d;