mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 03:56:16 +00:00
LibGUI: Add a default virtual destructor to virtual classes
Affected classes are children of TextDocumentUndoCommand: - InsertTextCommand - RemoveTextCommand - ReplaceAllTextCommand
This commit is contained in:
parent
cb4844bf64
commit
a85223e13b
Notes:
sideshowbarker
2024-07-17 11:30:05 +09:00
Author: https://github.com/LucasChollet
Commit: a85223e13b
Pull-request: https://github.com/SerenityOS/serenity/pull/14221
Issue: https://github.com/SerenityOS/serenity/issues/8071
Reviewed-by: https://github.com/linusg
1 changed files with 3 additions and 0 deletions
|
@ -215,6 +215,7 @@ protected:
|
||||||
class InsertTextCommand : public TextDocumentUndoCommand {
|
class InsertTextCommand : public TextDocumentUndoCommand {
|
||||||
public:
|
public:
|
||||||
InsertTextCommand(TextDocument&, String const&, TextPosition const&);
|
InsertTextCommand(TextDocument&, String const&, TextPosition const&);
|
||||||
|
virtual ~InsertTextCommand() = default;
|
||||||
virtual void perform_formatting(TextDocument::Client const&) override;
|
virtual void perform_formatting(TextDocument::Client const&) override;
|
||||||
virtual void undo() override;
|
virtual void undo() override;
|
||||||
virtual void redo() override;
|
virtual void redo() override;
|
||||||
|
@ -231,6 +232,7 @@ private:
|
||||||
class RemoveTextCommand : public TextDocumentUndoCommand {
|
class RemoveTextCommand : public TextDocumentUndoCommand {
|
||||||
public:
|
public:
|
||||||
RemoveTextCommand(TextDocument&, String const&, TextRange const&);
|
RemoveTextCommand(TextDocument&, String const&, TextRange const&);
|
||||||
|
virtual ~RemoveTextCommand() = default;
|
||||||
virtual void undo() override;
|
virtual void undo() override;
|
||||||
virtual void redo() override;
|
virtual void redo() override;
|
||||||
TextRange const& range() const { return m_range; }
|
TextRange const& range() const { return m_range; }
|
||||||
|
@ -246,6 +248,7 @@ class ReplaceAllTextCommand final : public GUI::TextDocumentUndoCommand {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ReplaceAllTextCommand(GUI::TextDocument& document, String const& text, GUI::TextRange const& range, String const& action_text);
|
ReplaceAllTextCommand(GUI::TextDocument& document, String const& text, GUI::TextRange const& range, String const& action_text);
|
||||||
|
virtual ~ReplaceAllTextCommand() = default;
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool merge_with(GUI::Command const&) override;
|
bool merge_with(GUI::Command const&) override;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue