summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-08 15:52:37 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-08 22:17:50 +0200
commit244665d99c3acb43081e44f6a88523388761e37e (patch)
treeea3c33bfa0fd76c1b938eef573b2e95b06d1b110 /Userland/Libraries
parentaaa96e909bf31d59eac32794a2cbe1d886961865 (diff)
downloadserenity-244665d99c3acb43081e44f6a88523388761e37e.zip
LibGUI: Some tweaks for TextEditor's will-execute-command virtual
Renamed the virtual from "on_edit_action" to "will_execute" so it doesn't clash with our convention for Function hook names. Also tighten the parameter type to GUI::TextDocumentUndoCommand since that's the only kind of command it will receive.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.h b/Userland/Libraries/LibGUI/TextEditor.h
index 7c6f4b8978..7a4d14eba3 100644
--- a/Userland/Libraries/LibGUI/TextEditor.h
+++ b/Userland/Libraries/LibGUI/TextEditor.h
@@ -285,12 +285,12 @@ private:
{
auto command = make<T>(*m_document, forward<Args>(args)...);
command->perform_formatting(*this);
- on_edit_action(*command);
+ will_execute(*command);
command->execute_from(*this);
m_document->add_to_undo_stack(move(command));
}
- virtual void on_edit_action(const Command&) { }
+ virtual void will_execute(TextDocumentUndoCommand const&) { }
Type m_type { MultiLine };
Mode m_mode { Editable };