From 271865e13df5673a07e09be0e0dde1ecc2e14eba Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 7 Jan 2019 17:03:38 -0300 Subject: [PATCH] Remove unused Command::clone() member function --- src/app/commands/cmd_about.cpp | 1 - src/app/commands/cmd_advanced_mode.cpp | 1 - src/app/commands/cmd_background_from_layer.cpp | 1 - src/app/commands/cmd_cancel.cpp | 1 - src/app/commands/cmd_canvas_size.cpp | 1 - src/app/commands/cmd_cel_properties.cpp | 1 - src/app/commands/cmd_change_pixel_format.cpp | 1 - src/app/commands/cmd_clear.cpp | 1 - src/app/commands/cmd_clear_cel.cpp | 1 - src/app/commands/cmd_close_file.cpp | 4 ---- src/app/commands/cmd_color_quantization.cpp | 1 - src/app/commands/cmd_contiguous_fill.cpp | 1 - src/app/commands/cmd_copy.cpp | 1 - src/app/commands/cmd_copy_cel.cpp | 1 - src/app/commands/cmd_copy_merged.cpp | 1 - src/app/commands/cmd_crop.cpp | 2 -- src/app/commands/cmd_cut.cpp | 1 - src/app/commands/cmd_deselect_mask.cpp | 1 - src/app/commands/cmd_discard_brush.cpp | 1 - src/app/commands/cmd_duplicate_layer.cpp | 1 - src/app/commands/cmd_duplicate_sprite.cpp | 1 - src/app/commands/cmd_duplicate_view.cpp | 1 - src/app/commands/cmd_exit.cpp | 1 - src/app/commands/cmd_export_sprite_sheet.cpp | 1 - src/app/commands/cmd_eyedropper.h | 1 - src/app/commands/cmd_fill_and_stroke.cpp | 1 - src/app/commands/cmd_fit_screen.cpp | 1 - src/app/commands/cmd_flatten_layers.cpp | 1 - src/app/commands/cmd_flip.h | 1 - src/app/commands/cmd_frame_properties.cpp | 1 - src/app/commands/cmd_frame_tag_properties.cpp | 1 - src/app/commands/cmd_fullscreen_preview.cpp | 1 - src/app/commands/cmd_goto_frame.cpp | 9 --------- src/app/commands/cmd_goto_layer.cpp | 6 ------ src/app/commands/cmd_goto_tab.cpp | 2 -- src/app/commands/cmd_grid.cpp | 5 ----- src/app/commands/cmd_import_sprite_sheet.cpp | 1 - src/app/commands/cmd_invert_mask.cpp | 1 - src/app/commands/cmd_keyboard_shortcuts.cpp | 1 - src/app/commands/cmd_launch.cpp | 1 - src/app/commands/cmd_layer_from_background.cpp | 1 - src/app/commands/cmd_layer_lock.cpp | 1 - src/app/commands/cmd_layer_properties.cpp | 1 - src/app/commands/cmd_layer_visibility.cpp | 1 - src/app/commands/cmd_link_cels.cpp | 1 - src/app/commands/cmd_load_mask.cpp | 1 - src/app/commands/cmd_load_palette.cpp | 1 - src/app/commands/cmd_mask_all.cpp | 1 - src/app/commands/cmd_mask_by_color.cpp | 1 - src/app/commands/cmd_mask_content.cpp | 1 - src/app/commands/cmd_merge_down_layer.cpp | 1 - src/app/commands/cmd_modify_selection.cpp | 1 - src/app/commands/cmd_move_cel.cpp | 1 - src/app/commands/cmd_move_mask.h | 1 - src/app/commands/cmd_new_brush.cpp | 1 - src/app/commands/cmd_new_file.cpp | 1 - src/app/commands/cmd_new_frame.cpp | 1 - src/app/commands/cmd_new_frame_tag.cpp | 1 - src/app/commands/cmd_new_layer.cpp | 1 - .../commands/cmd_new_sprite_from_selection.cpp | 1 - src/app/commands/cmd_onionskin.cpp | 2 -- src/app/commands/cmd_open_browser.cpp | 1 - src/app/commands/cmd_open_file.h | 1 - src/app/commands/cmd_open_group.cpp | 1 - src/app/commands/cmd_open_in_folder.cpp | 1 - src/app/commands/cmd_open_with_app.cpp | 1 - src/app/commands/cmd_options.cpp | 1 - src/app/commands/cmd_palette_editor.cpp | 1 - src/app/commands/cmd_palette_size.cpp | 1 - src/app/commands/cmd_paste.cpp | 1 - src/app/commands/cmd_paste_text.cpp | 1 - src/app/commands/cmd_pixel_perfect_mode.cpp | 1 - src/app/commands/cmd_play_animation.cpp | 2 -- src/app/commands/cmd_refresh.cpp | 1 - src/app/commands/cmd_remove_frame.cpp | 1 - src/app/commands/cmd_remove_frame_tag.cpp | 1 - src/app/commands/cmd_remove_layer.cpp | 1 - src/app/commands/cmd_remove_slice.cpp | 1 - src/app/commands/cmd_repeat_last_export.cpp | 1 - src/app/commands/cmd_reselect_mask.cpp | 1 - src/app/commands/cmd_reverse_frames.cpp | 1 - src/app/commands/cmd_rotate.h | 1 - src/app/commands/cmd_run_script.cpp | 1 - src/app/commands/cmd_save_file.cpp | 3 --- src/app/commands/cmd_save_mask.cpp | 1 - src/app/commands/cmd_save_palette.cpp | 1 - src/app/commands/cmd_scroll.cpp | 1 - src/app/commands/cmd_scroll_center.cpp | 1 - src/app/commands/cmd_select_tile.cpp | 1 - src/app/commands/cmd_set_color_selector.cpp | 1 - src/app/commands/cmd_set_ink_type.cpp | 1 - src/app/commands/cmd_set_loop_section.cpp | 1 - src/app/commands/cmd_set_palette.h | 1 - src/app/commands/cmd_set_palette_entry_size.cpp | 1 - src/app/commands/cmd_set_same_ink.cpp | 1 - src/app/commands/cmd_show.cpp | 16 ---------------- src/app/commands/cmd_slice_properties.cpp | 1 - src/app/commands/cmd_sprite_properties.cpp | 1 - src/app/commands/cmd_sprite_size.cpp | 5 ----- src/app/commands/cmd_sprite_size.h | 1 - src/app/commands/cmd_symmetry_mode.cpp | 1 - src/app/commands/cmd_tiled_mode.cpp | 1 - src/app/commands/cmd_timeline.cpp | 1 - src/app/commands/cmd_toggle_preview.cpp | 1 - .../commands/cmd_toggle_timeline_thumbnails.cpp | 2 -- src/app/commands/cmd_undo.cpp | 1 - src/app/commands/cmd_undo_history.cpp | 1 - src/app/commands/cmd_unlink_cel.cpp | 1 - src/app/commands/cmd_zoom.cpp | 1 - src/app/commands/command.h | 2 -- .../commands/filters/cmd_brightness_contrast.cpp | 1 - src/app/commands/filters/cmd_color_curve.cpp | 1 - .../commands/filters/cmd_convolution_matrix.cpp | 1 - src/app/commands/filters/cmd_despeckle.cpp | 1 - src/app/commands/filters/cmd_hue_saturation.cpp | 1 - src/app/commands/filters/cmd_invert_color.cpp | 1 - src/app/commands/filters/cmd_replace_color.cpp | 1 - src/app/commands/quick_command.cpp | 5 ----- src/app/commands/quick_command.h | 2 -- 119 files changed, 171 deletions(-) diff --git a/src/app/commands/cmd_about.cpp b/src/app/commands/cmd_about.cpp index 349f7fa17..ce9c715b0 100644 --- a/src/app/commands/cmd_about.cpp +++ b/src/app/commands/cmd_about.cpp @@ -23,7 +23,6 @@ using namespace ui; class AboutCommand : public Command { public: AboutCommand(); - Command* clone() const override { return new AboutCommand(*this); } protected: void onExecute(Context* context) override; diff --git a/src/app/commands/cmd_advanced_mode.cpp b/src/app/commands/cmd_advanced_mode.cpp index 156d01a88..f4d3a432a 100644 --- a/src/app/commands/cmd_advanced_mode.cpp +++ b/src/app/commands/cmd_advanced_mode.cpp @@ -26,7 +26,6 @@ using namespace ui; class AdvancedModeCommand : public Command { public: AdvancedModeCommand(); - Command* clone() const override { return new AdvancedModeCommand(*this); } protected: void onExecute(Context* context) override; diff --git a/src/app/commands/cmd_background_from_layer.cpp b/src/app/commands/cmd_background_from_layer.cpp index fa1923fec..68e3867e9 100644 --- a/src/app/commands/cmd_background_from_layer.cpp +++ b/src/app/commands/cmd_background_from_layer.cpp @@ -22,7 +22,6 @@ namespace app { class BackgroundFromLayerCommand : public Command { public: BackgroundFromLayerCommand(); - Command* clone() const override { return new BackgroundFromLayerCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_cancel.cpp b/src/app/commands/cmd_cancel.cpp index 347655b0b..8991a555e 100644 --- a/src/app/commands/cmd_cancel.cpp +++ b/src/app/commands/cmd_cancel.cpp @@ -26,7 +26,6 @@ public: }; CancelCommand(); - Command* clone() const override { return new CancelCommand(*this); } protected: bool onNeedsParams() const override { return true; } diff --git a/src/app/commands/cmd_canvas_size.cpp b/src/app/commands/cmd_canvas_size.cpp index 660e2f722..0d864eeb4 100644 --- a/src/app/commands/cmd_canvas_size.cpp +++ b/src/app/commands/cmd_canvas_size.cpp @@ -271,7 +271,6 @@ private: class CanvasSizeCommand : public Command { public: CanvasSizeCommand(); - Command* clone() const override { return new CanvasSizeCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_cel_properties.cpp b/src/app/commands/cmd_cel_properties.cpp index 455b8afcd..36b8c6044 100644 --- a/src/app/commands/cmd_cel_properties.cpp +++ b/src/app/commands/cmd_cel_properties.cpp @@ -273,7 +273,6 @@ private: class CelPropertiesCommand : public Command { public: CelPropertiesCommand(); - Command* clone() const override { return new CelPropertiesCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_change_pixel_format.cpp b/src/app/commands/cmd_change_pixel_format.cpp index f21c9c258..23cb8a824 100644 --- a/src/app/commands/cmd_change_pixel_format.cpp +++ b/src/app/commands/cmd_change_pixel_format.cpp @@ -335,7 +335,6 @@ private: class ChangePixelFormatCommand : public Command { public: ChangePixelFormatCommand(); - Command* clone() const override { return new ChangePixelFormatCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_clear.cpp b/src/app/commands/cmd_clear.cpp index e8c167f7c..0c6367da8 100644 --- a/src/app/commands/cmd_clear.cpp +++ b/src/app/commands/cmd_clear.cpp @@ -17,7 +17,6 @@ namespace app { class ClearCommand : public Command { public: ClearCommand(); - Command* clone() const override { return new ClearCommand(*this); } protected: bool onEnabled(Context* ctx) override; diff --git a/src/app/commands/cmd_clear_cel.cpp b/src/app/commands/cmd_clear_cel.cpp index b3968cd7f..002a746a7 100644 --- a/src/app/commands/cmd_clear_cel.cpp +++ b/src/app/commands/cmd_clear_cel.cpp @@ -24,7 +24,6 @@ namespace app { class ClearCelCommand : public Command { public: ClearCelCommand(); - Command* clone() const override { return new ClearCelCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_close_file.cpp b/src/app/commands/cmd_close_file.cpp index c12db9dc7..217e41373 100644 --- a/src/app/commands/cmd_close_file.cpp +++ b/src/app/commands/cmd_close_file.cpp @@ -32,8 +32,6 @@ public: : Command(CommandId::CloseFile(), CmdUIOnlyFlag) { } - Command* clone() const override { return new CloseFileCommand(*this); } - protected: bool onEnabled(Context* context) override { @@ -57,8 +55,6 @@ public: m_quitting = false; } - Command* clone() const override { return new CloseAllFilesCommand(*this); } - protected: void onLoadParams(const Params& params) override { diff --git a/src/app/commands/cmd_color_quantization.cpp b/src/app/commands/cmd_color_quantization.cpp index b10bb5b43..87159a14f 100644 --- a/src/app/commands/cmd_color_quantization.cpp +++ b/src/app/commands/cmd_color_quantization.cpp @@ -33,7 +33,6 @@ namespace app { class ColorQuantizationCommand : public Command { public: ColorQuantizationCommand(); - Command* clone() const override { return new ColorQuantizationCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_contiguous_fill.cpp b/src/app/commands/cmd_contiguous_fill.cpp index 50820e8ba..010fe6426 100644 --- a/src/app/commands/cmd_contiguous_fill.cpp +++ b/src/app/commands/cmd_contiguous_fill.cpp @@ -18,7 +18,6 @@ namespace app { class ContiguousFillCommand : public Command { public: ContiguousFillCommand(); - Command* clone() const override { return new ContiguousFillCommand(*this); } protected: bool onChecked(Context* context) override; diff --git a/src/app/commands/cmd_copy.cpp b/src/app/commands/cmd_copy.cpp index e37eb6ab0..d522314ca 100644 --- a/src/app/commands/cmd_copy.cpp +++ b/src/app/commands/cmd_copy.cpp @@ -17,7 +17,6 @@ namespace app { class CopyCommand : public Command { public: CopyCommand(); - Command* clone() const override { return new CopyCommand(*this); } protected: bool onEnabled(Context* ctx) override; diff --git a/src/app/commands/cmd_copy_cel.cpp b/src/app/commands/cmd_copy_cel.cpp index 5c601ab7f..9758061a1 100644 --- a/src/app/commands/cmd_copy_cel.cpp +++ b/src/app/commands/cmd_copy_cel.cpp @@ -19,7 +19,6 @@ namespace app { class CopyCelCommand : public Command { public: CopyCelCommand(); - Command* clone() const override { return new CopyCelCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_copy_merged.cpp b/src/app/commands/cmd_copy_merged.cpp index 3e5f07025..cb909981b 100644 --- a/src/app/commands/cmd_copy_merged.cpp +++ b/src/app/commands/cmd_copy_merged.cpp @@ -17,7 +17,6 @@ namespace app { class CopyMergedCommand : public Command { public: CopyMergedCommand(); - Command* clone() const override { return new CopyMergedCommand(*this); } protected: bool onEnabled(Context* ctx) override; diff --git a/src/app/commands/cmd_crop.cpp b/src/app/commands/cmd_crop.cpp index 976d85597..ae423ffeb 100644 --- a/src/app/commands/cmd_crop.cpp +++ b/src/app/commands/cmd_crop.cpp @@ -25,7 +25,6 @@ namespace app { class CropSpriteCommand : public Command { public: CropSpriteCommand(); - Command* clone() const override { return new CropSpriteCommand(*this); } protected: void onLoadParams(const Params& params) override; @@ -86,7 +85,6 @@ void CropSpriteCommand::onExecute(Context* context) class AutocropSpriteCommand : public Command { public: AutocropSpriteCommand(); - Command* clone() const override { return new AutocropSpriteCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_cut.cpp b/src/app/commands/cmd_cut.cpp index 576b671bf..9ecfcaea4 100644 --- a/src/app/commands/cmd_cut.cpp +++ b/src/app/commands/cmd_cut.cpp @@ -17,7 +17,6 @@ namespace app { class CutCommand : public Command { public: CutCommand(); - Command* clone() const override { return new CutCommand(*this); } protected: bool onEnabled(Context* ctx) override; diff --git a/src/app/commands/cmd_deselect_mask.cpp b/src/app/commands/cmd_deselect_mask.cpp index 685b1e933..55301114e 100644 --- a/src/app/commands/cmd_deselect_mask.cpp +++ b/src/app/commands/cmd_deselect_mask.cpp @@ -21,7 +21,6 @@ namespace app { class DeselectMaskCommand : public Command { public: DeselectMaskCommand(); - Command* clone() const override { return new DeselectMaskCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_discard_brush.cpp b/src/app/commands/cmd_discard_brush.cpp index 3aeb144a6..416116e1a 100644 --- a/src/app/commands/cmd_discard_brush.cpp +++ b/src/app/commands/cmd_discard_brush.cpp @@ -22,7 +22,6 @@ namespace app { class DiscardBrushCommand : public Command { public: DiscardBrushCommand(); - Command* clone() const override { return new DiscardBrushCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_duplicate_layer.cpp b/src/app/commands/cmd_duplicate_layer.cpp index 683185f4e..024ed8d3f 100644 --- a/src/app/commands/cmd_duplicate_layer.cpp +++ b/src/app/commands/cmd_duplicate_layer.cpp @@ -27,7 +27,6 @@ namespace app { class DuplicateLayerCommand : public Command { public: DuplicateLayerCommand(); - Command* clone() const override { return new DuplicateLayerCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_duplicate_sprite.cpp b/src/app/commands/cmd_duplicate_sprite.cpp index 8c95f3a0e..3b8dabec8 100644 --- a/src/app/commands/cmd_duplicate_sprite.cpp +++ b/src/app/commands/cmd_duplicate_sprite.cpp @@ -29,7 +29,6 @@ using namespace ui; class DuplicateSpriteCommand : public Command { public: DuplicateSpriteCommand(); - Command* clone() const override { return new DuplicateSpriteCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_duplicate_view.cpp b/src/app/commands/cmd_duplicate_view.cpp index a8a6873d1..fbadd5971 100644 --- a/src/app/commands/cmd_duplicate_view.cpp +++ b/src/app/commands/cmd_duplicate_view.cpp @@ -21,7 +21,6 @@ namespace app { class DuplicateViewCommand : public Command { public: DuplicateViewCommand(); - Command* clone() const override { return new DuplicateViewCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_exit.cpp b/src/app/commands/cmd_exit.cpp index 94ff39621..4c6369abc 100644 --- a/src/app/commands/cmd_exit.cpp +++ b/src/app/commands/cmd_exit.cpp @@ -22,7 +22,6 @@ namespace app { class ExitCommand : public Command { public: ExitCommand(); - Command* clone() const override { return new ExitCommand(*this); } protected: void onExecute(Context* context) override; diff --git a/src/app/commands/cmd_export_sprite_sheet.cpp b/src/app/commands/cmd_export_sprite_sheet.cpp index 3da00f4ea..e3158212c 100644 --- a/src/app/commands/cmd_export_sprite_sheet.cpp +++ b/src/app/commands/cmd_export_sprite_sheet.cpp @@ -590,7 +590,6 @@ struct ExportSpriteSheetParams : public NewParams { class ExportSpriteSheetCommand : public CommandWithNewParams { public: ExportSpriteSheetCommand(); - Command* clone() const override { return new ExportSpriteSheetCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_eyedropper.h b/src/app/commands/cmd_eyedropper.h index f8a05e91f..d25201671 100644 --- a/src/app/commands/cmd_eyedropper.h +++ b/src/app/commands/cmd_eyedropper.h @@ -23,7 +23,6 @@ namespace app { class EyedropperCommand : public Command { public: EyedropperCommand(); - Command* clone() const override { return new EyedropperCommand(*this); } // Returns the color in the given sprite pos. void pickSample(const Site& site, diff --git a/src/app/commands/cmd_fill_and_stroke.cpp b/src/app/commands/cmd_fill_and_stroke.cpp index c10892858..a0e8f972d 100644 --- a/src/app/commands/cmd_fill_and_stroke.cpp +++ b/src/app/commands/cmd_fill_and_stroke.cpp @@ -29,7 +29,6 @@ class FillCommand : public Command { public: enum Type { Fill, Stroke }; FillCommand(Type type); - Command* clone() const override { return new FillCommand(*this); } protected: bool onEnabled(Context* ctx) override; void onExecute(Context* ctx) override; diff --git a/src/app/commands/cmd_fit_screen.cpp b/src/app/commands/cmd_fit_screen.cpp index 91dbc4d05..d5bde600e 100644 --- a/src/app/commands/cmd_fit_screen.cpp +++ b/src/app/commands/cmd_fit_screen.cpp @@ -19,7 +19,6 @@ namespace app { class FitScreenCommand : public Command { public: FitScreenCommand(); - Command* clone() const override { return new FitScreenCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_flatten_layers.cpp b/src/app/commands/cmd_flatten_layers.cpp index b7a660853..7b3bd27a5 100644 --- a/src/app/commands/cmd_flatten_layers.cpp +++ b/src/app/commands/cmd_flatten_layers.cpp @@ -25,7 +25,6 @@ namespace app { class FlattenLayersCommand : public Command { public: FlattenLayersCommand(); - Command* clone() const override { return new FlattenLayersCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_flip.h b/src/app/commands/cmd_flip.h index 3a71c800d..c4dc6a1ed 100644 --- a/src/app/commands/cmd_flip.h +++ b/src/app/commands/cmd_flip.h @@ -16,7 +16,6 @@ namespace app { class FlipCommand : public Command { public: FlipCommand(); - Command* clone() const override { return new FlipCommand(*this); } doc::algorithm::FlipType getFlipType() const { return m_flipType; } diff --git a/src/app/commands/cmd_frame_properties.cpp b/src/app/commands/cmd_frame_properties.cpp index f0c1ae743..215f379ad 100644 --- a/src/app/commands/cmd_frame_properties.cpp +++ b/src/app/commands/cmd_frame_properties.cpp @@ -29,7 +29,6 @@ using namespace ui; class FramePropertiesCommand : public Command { public: FramePropertiesCommand(); - Command* clone() const override { return new FramePropertiesCommand(*this); } protected: bool onNeedsParams() const override { return true; } diff --git a/src/app/commands/cmd_frame_tag_properties.cpp b/src/app/commands/cmd_frame_tag_properties.cpp index 838071a71..dbfbc97ec 100644 --- a/src/app/commands/cmd_frame_tag_properties.cpp +++ b/src/app/commands/cmd_frame_tag_properties.cpp @@ -31,7 +31,6 @@ using namespace ui; class FrameTagPropertiesCommand : public Command { public: FrameTagPropertiesCommand(); - Command* clone() const override { return new FrameTagPropertiesCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_fullscreen_preview.cpp b/src/app/commands/cmd_fullscreen_preview.cpp index 28365eec8..845697ed8 100644 --- a/src/app/commands/cmd_fullscreen_preview.cpp +++ b/src/app/commands/cmd_fullscreen_preview.cpp @@ -256,7 +256,6 @@ private: class FullscreenPreviewCommand : public Command { public: FullscreenPreviewCommand(); - Command* clone() const override { return new FullscreenPreviewCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_goto_frame.cpp b/src/app/commands/cmd_goto_frame.cpp index 0e2aa1c0f..b9c8e1f59 100644 --- a/src/app/commands/cmd_goto_frame.cpp +++ b/src/app/commands/cmd_goto_frame.cpp @@ -51,7 +51,6 @@ class GotoFirstFrameCommand : public GotoCommand { public: GotoFirstFrameCommand() : GotoCommand(CommandId::GotoFirstFrame()) { } - Command* clone() const override { return new GotoFirstFrameCommand(*this); } protected: frame_t onGetFrame(Editor* editor) override { @@ -63,7 +62,6 @@ class GotoFirstFrameInTagCommand : public GotoCommand { public: GotoFirstFrameInTagCommand() : GotoCommand(CommandId::GotoFirstFrameInTag()) { } - Command* clone() const override { return new GotoFirstFrameInTagCommand(*this); } protected: frame_t onGetFrame(Editor* editor) override { @@ -80,7 +78,6 @@ class GotoPreviousFrameCommand : public GotoCommand { public: GotoPreviousFrameCommand() : GotoCommand(CommandId::GotoPreviousFrame()) { } - Command* clone() const override { return new GotoPreviousFrameCommand(*this); } protected: frame_t onGetFrame(Editor* editor) override { @@ -94,7 +91,6 @@ protected: class GotoNextFrameCommand : public GotoCommand { public: GotoNextFrameCommand() : GotoCommand(CommandId::GotoNextFrame()) { } - Command* clone() const override { return new GotoNextFrameCommand(*this); } protected: frame_t onGetFrame(Editor* editor) override { @@ -108,7 +104,6 @@ protected: class GotoNextFrameWithSameTagCommand : public GotoCommand { public: GotoNextFrameWithSameTagCommand() : GotoCommand(CommandId::GotoNextFrameWithSameTag()) { } - Command* clone() const override { return new GotoNextFrameWithSameTagCommand(*this); } protected: frame_t onGetFrame(Editor* editor) override { @@ -127,7 +122,6 @@ protected: class GotoPreviousFrameWithSameTagCommand : public GotoCommand { public: GotoPreviousFrameWithSameTagCommand() : GotoCommand(CommandId::GotoPreviousFrameWithSameTag()) { } - Command* clone() const override { return new GotoPreviousFrameWithSameTagCommand(*this); } protected: frame_t onGetFrame(Editor* editor) override { @@ -146,7 +140,6 @@ protected: class GotoLastFrameCommand : public GotoCommand { public: GotoLastFrameCommand() : GotoCommand(CommandId::GotoLastFrame()) { } - Command* clone() const override { return new GotoLastFrameCommand(*this); } protected: frame_t onGetFrame(Editor* editor) override { @@ -158,7 +151,6 @@ class GotoLastFrameInTagCommand : public GotoCommand { public: GotoLastFrameInTagCommand() : GotoCommand(CommandId::GotoLastFrameInTag()) { } - Command* clone() const override { return new GotoLastFrameInTagCommand(*this); } protected: frame_t onGetFrame(Editor* editor) override { @@ -175,7 +167,6 @@ class GotoFrameCommand : public GotoCommand { public: GotoFrameCommand() : GotoCommand(CommandId::GotoFrame()) , m_showUI(true) { } - Command* clone() const override { return new GotoFrameCommand(*this); } private: diff --git a/src/app/commands/cmd_goto_layer.cpp b/src/app/commands/cmd_goto_layer.cpp index 488d19c8a..2de92661c 100644 --- a/src/app/commands/cmd_goto_layer.cpp +++ b/src/app/commands/cmd_goto_layer.cpp @@ -88,9 +88,6 @@ public: : GotoLayerCommand(-1, "GotoPreviousLayer", CmdUIOnlyFlag) { } - Command* clone() const override { - return new GotoPreviousLayerCommand(*this); - } }; class GotoNextLayerCommand : public GotoLayerCommand { @@ -99,9 +96,6 @@ public: : GotoLayerCommand(+1, "GotoNextLayer", CmdUIOnlyFlag) { } - Command* clone() const override { - return new GotoNextLayerCommand(*this); - } }; Command* CommandFactory::createGotoPreviousLayerCommand() diff --git a/src/app/commands/cmd_goto_tab.cpp b/src/app/commands/cmd_goto_tab.cpp index ff9a9c0a2..41fce37c5 100644 --- a/src/app/commands/cmd_goto_tab.cpp +++ b/src/app/commands/cmd_goto_tab.cpp @@ -17,7 +17,6 @@ namespace app { class GotoNextTabCommand : public Command { public: GotoNextTabCommand(); - Command* clone() const override { return new GotoNextTabCommand(*this); } protected: bool onEnabled(Context* context) override; @@ -42,7 +41,6 @@ void GotoNextTabCommand::onExecute(Context* context) class GotoPreviousTabCommand : public Command { public: GotoPreviousTabCommand(); - Command* clone() const override { return new GotoPreviousTabCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_grid.cpp b/src/app/commands/cmd_grid.cpp index 5700e92fd..8a2fd17b2 100644 --- a/src/app/commands/cmd_grid.cpp +++ b/src/app/commands/cmd_grid.cpp @@ -36,8 +36,6 @@ public: : Command(CommandId::SnapToGrid(), CmdUIOnlyFlag) { } - Command* clone() const override { return new SnapToGridCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); @@ -59,8 +57,6 @@ public: : Command(CommandId::SelectionAsGrid(), CmdUIOnlyFlag) { } - Command* clone() const override { return new SelectionAsGridCommand(*this); } - protected: bool onEnabled(Context* ctx) override { return (ctx->activeDocument() && @@ -85,7 +81,6 @@ protected: class GridSettingsCommand : public Command { public: GridSettingsCommand(); - Command* clone() const override { return new GridSettingsCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_import_sprite_sheet.cpp b/src/app/commands/cmd_import_sprite_sheet.cpp index 06d837de2..4062a9236 100644 --- a/src/app/commands/cmd_import_sprite_sheet.cpp +++ b/src/app/commands/cmd_import_sprite_sheet.cpp @@ -290,7 +290,6 @@ private: class ImportSpriteSheetCommand : public Command { public: ImportSpriteSheetCommand(); - Command* clone() const override { return new ImportSpriteSheetCommand(*this); } protected: virtual void onExecute(Context* context) override; diff --git a/src/app/commands/cmd_invert_mask.cpp b/src/app/commands/cmd_invert_mask.cpp index f8799f6a3..268d98a1c 100644 --- a/src/app/commands/cmd_invert_mask.cpp +++ b/src/app/commands/cmd_invert_mask.cpp @@ -24,7 +24,6 @@ namespace app { class InvertMaskCommand : public Command { public: InvertMaskCommand(); - Command* clone() const override { return new InvertMaskCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_keyboard_shortcuts.cpp b/src/app/commands/cmd_keyboard_shortcuts.cpp index 284ccb05f..d00efdd87 100644 --- a/src/app/commands/cmd_keyboard_shortcuts.cpp +++ b/src/app/commands/cmd_keyboard_shortcuts.cpp @@ -841,7 +841,6 @@ private: class KeyboardShortcutsCommand : public Command { public: KeyboardShortcutsCommand(); - Command* clone() const override { return new KeyboardShortcutsCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_launch.cpp b/src/app/commands/cmd_launch.cpp index 4d87aa436..5401c49e5 100644 --- a/src/app/commands/cmd_launch.cpp +++ b/src/app/commands/cmd_launch.cpp @@ -18,7 +18,6 @@ namespace app { class LaunchCommand : public Command { public: LaunchCommand(); - Command* clone() const override { return new LaunchCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_layer_from_background.cpp b/src/app/commands/cmd_layer_from_background.cpp index 22f9411f0..d7ddec9ba 100644 --- a/src/app/commands/cmd_layer_from_background.cpp +++ b/src/app/commands/cmd_layer_from_background.cpp @@ -22,7 +22,6 @@ namespace app { class LayerFromBackgroundCommand : public Command { public: LayerFromBackgroundCommand(); - Command* clone() const override { return new LayerFromBackgroundCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_layer_lock.cpp b/src/app/commands/cmd_layer_lock.cpp index 441f81dcc..0911ed237 100644 --- a/src/app/commands/cmd_layer_lock.cpp +++ b/src/app/commands/cmd_layer_lock.cpp @@ -23,7 +23,6 @@ using namespace ui; class LayerLockCommand : public Command { public: LayerLockCommand(); - Command* clone() const override { return new LayerLockCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_layer_properties.cpp b/src/app/commands/cmd_layer_properties.cpp index 590eda648..5b7009fd7 100644 --- a/src/app/commands/cmd_layer_properties.cpp +++ b/src/app/commands/cmd_layer_properties.cpp @@ -41,7 +41,6 @@ using namespace ui; class LayerPropertiesCommand : public Command { public: LayerPropertiesCommand(); - Command* clone() const override { return new LayerPropertiesCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_layer_visibility.cpp b/src/app/commands/cmd_layer_visibility.cpp index c9b2c79eb..aa95920ff 100644 --- a/src/app/commands/cmd_layer_visibility.cpp +++ b/src/app/commands/cmd_layer_visibility.cpp @@ -23,7 +23,6 @@ using namespace ui; class LayerVisibilityCommand : public Command { public: LayerVisibilityCommand(); - Command* clone() const override { return new LayerVisibilityCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_link_cels.cpp b/src/app/commands/cmd_link_cels.cpp index 7c27f6e39..48c5700b6 100644 --- a/src/app/commands/cmd_link_cels.cpp +++ b/src/app/commands/cmd_link_cels.cpp @@ -24,7 +24,6 @@ namespace app { class LinkCelsCommand : public Command { public: LinkCelsCommand(); - Command* clone() const override { return new LinkCelsCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_load_mask.cpp b/src/app/commands/cmd_load_mask.cpp index 55a6d2f98..90a74d5bf 100644 --- a/src/app/commands/cmd_load_mask.cpp +++ b/src/app/commands/cmd_load_mask.cpp @@ -29,7 +29,6 @@ class LoadMaskCommand : public Command { public: LoadMaskCommand(); - Command* clone() const override { return new LoadMaskCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_load_palette.cpp b/src/app/commands/cmd_load_palette.cpp index b34e81524..7d136d721 100644 --- a/src/app/commands/cmd_load_palette.cpp +++ b/src/app/commands/cmd_load_palette.cpp @@ -28,7 +28,6 @@ using namespace ui; class LoadPaletteCommand : public Command { public: LoadPaletteCommand(); - Command* clone() const override { return new LoadPaletteCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_mask_all.cpp b/src/app/commands/cmd_mask_all.cpp index bbf457c2e..713208537 100644 --- a/src/app/commands/cmd_mask_all.cpp +++ b/src/app/commands/cmd_mask_all.cpp @@ -22,7 +22,6 @@ namespace app { class MaskAllCommand : public Command { public: MaskAllCommand(); - Command* clone() const override { return new MaskAllCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_mask_by_color.cpp b/src/app/commands/cmd_mask_by_color.cpp index 3a0716e61..e2ebd25b0 100644 --- a/src/app/commands/cmd_mask_by_color.cpp +++ b/src/app/commands/cmd_mask_by_color.cpp @@ -48,7 +48,6 @@ using namespace ui; class MaskByColorCommand : public Command { public: MaskByColorCommand(); - Command* clone() const override { return new MaskByColorCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_mask_content.cpp b/src/app/commands/cmd_mask_content.cpp index 34caae197..b03235e56 100644 --- a/src/app/commands/cmd_mask_content.cpp +++ b/src/app/commands/cmd_mask_content.cpp @@ -32,7 +32,6 @@ namespace app { class MaskContentCommand : public Command { public: MaskContentCommand(); - Command* clone() const override { return new MaskContentCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_merge_down_layer.cpp b/src/app/commands/cmd_merge_down_layer.cpp index 24f6601e1..e705ad04a 100644 --- a/src/app/commands/cmd_merge_down_layer.cpp +++ b/src/app/commands/cmd_merge_down_layer.cpp @@ -33,7 +33,6 @@ namespace app { class MergeDownLayerCommand : public Command { public: MergeDownLayerCommand(); - Command* clone() const override { return new MergeDownLayerCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_modify_selection.cpp b/src/app/commands/cmd_modify_selection.cpp index edba17b6b..30380926f 100644 --- a/src/app/commands/cmd_modify_selection.cpp +++ b/src/app/commands/cmd_modify_selection.cpp @@ -39,7 +39,6 @@ class ModifySelectionWindow : public app::gen::ModifySelection { class ModifySelectionCommand : public Command { public: ModifySelectionCommand(); - Command* clone() const override { return new ModifySelectionCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_move_cel.cpp b/src/app/commands/cmd_move_cel.cpp index dd550d550..fc67ebaea 100644 --- a/src/app/commands/cmd_move_cel.cpp +++ b/src/app/commands/cmd_move_cel.cpp @@ -19,7 +19,6 @@ namespace app { class MoveCelCommand : public Command { public: MoveCelCommand(); - Command* clone() const override { return new MoveCelCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_move_mask.h b/src/app/commands/cmd_move_mask.h index 4bdaa8a34..8b0d5c96d 100644 --- a/src/app/commands/cmd_move_mask.h +++ b/src/app/commands/cmd_move_mask.h @@ -18,7 +18,6 @@ namespace app { enum Target { Boundaries, Content }; MoveMaskCommand(); - Command* clone() const override { return new MoveMaskCommand(*this); } Target getTarget() const { return m_target; } gfx::Point getDelta(Context* context) const; diff --git a/src/app/commands/cmd_new_brush.cpp b/src/app/commands/cmd_new_brush.cpp index 126dfd5eb..da75bea92 100644 --- a/src/app/commands/cmd_new_brush.cpp +++ b/src/app/commands/cmd_new_brush.cpp @@ -35,7 +35,6 @@ class NewBrushCommand : public Command , public SelectBoxDelegate { public: NewBrushCommand(); - Command* clone() const override { return new NewBrushCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_new_file.cpp b/src/app/commands/cmd_new_file.cpp index 3b2fb909a..6e64523cc 100644 --- a/src/app/commands/cmd_new_file.cpp +++ b/src/app/commands/cmd_new_file.cpp @@ -43,7 +43,6 @@ namespace app { class NewFileCommand : public Command { public: NewFileCommand(); - Command* clone() const override { return new NewFileCommand(*this); } protected: void onExecute(Context* context) override; diff --git a/src/app/commands/cmd_new_frame.cpp b/src/app/commands/cmd_new_frame.cpp index b1d350f53..36a9db769 100644 --- a/src/app/commands/cmd_new_frame.cpp +++ b/src/app/commands/cmd_new_frame.cpp @@ -46,7 +46,6 @@ public: }; NewFrameCommand(); - Command* clone() const override { return new NewFrameCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_new_frame_tag.cpp b/src/app/commands/cmd_new_frame_tag.cpp index efded840d..31f264cec 100644 --- a/src/app/commands/cmd_new_frame_tag.cpp +++ b/src/app/commands/cmd_new_frame_tag.cpp @@ -27,7 +27,6 @@ using namespace doc; class NewFrameTagCommand : public Command { public: NewFrameTagCommand(); - Command* clone() const override { return new NewFrameTagCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_new_layer.cpp b/src/app/commands/cmd_new_layer.cpp index 6214fdc03..8328c203b 100644 --- a/src/app/commands/cmd_new_layer.cpp +++ b/src/app/commands/cmd_new_layer.cpp @@ -46,7 +46,6 @@ public: enum class Place { AfterActiveLayer, BeforeActiveLayer, Top }; NewLayerCommand(); - Command* clone() const override { return new NewLayerCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_new_sprite_from_selection.cpp b/src/app/commands/cmd_new_sprite_from_selection.cpp index 36d0a3fd9..84d944a3a 100644 --- a/src/app/commands/cmd_new_sprite_from_selection.cpp +++ b/src/app/commands/cmd_new_sprite_from_selection.cpp @@ -31,7 +31,6 @@ using namespace doc; class NewSpriteFromSelectionCommand : public Command { public: NewSpriteFromSelectionCommand(); - Command* clone() const override { return new NewSpriteFromSelectionCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_onionskin.cpp b/src/app/commands/cmd_onionskin.cpp index 49190e114..c7b846bbd 100644 --- a/src/app/commands/cmd_onionskin.cpp +++ b/src/app/commands/cmd_onionskin.cpp @@ -25,8 +25,6 @@ public: { } - Command* clone() const override { return new ShowOnionSkinCommand(*this); } - protected: bool onChecked(Context* context) override { DocumentPreferences& docPref = Preferences::instance().document(context->activeDocument()); diff --git a/src/app/commands/cmd_open_browser.cpp b/src/app/commands/cmd_open_browser.cpp index 541dc68d3..106de4d55 100644 --- a/src/app/commands/cmd_open_browser.cpp +++ b/src/app/commands/cmd_open_browser.cpp @@ -19,7 +19,6 @@ namespace app { class OpenBrowserCommand : public Command { public: OpenBrowserCommand(); - Command* clone() const override { return new OpenBrowserCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_open_file.h b/src/app/commands/cmd_open_file.h index 774011fc4..dc71d348d 100644 --- a/src/app/commands/cmd_open_file.h +++ b/src/app/commands/cmd_open_file.h @@ -22,7 +22,6 @@ namespace app { }; OpenFileCommand(); - Command* clone() const override { return new OpenFileCommand(*this); } const base::paths& usedFiles() const { return m_usedFiles; diff --git a/src/app/commands/cmd_open_group.cpp b/src/app/commands/cmd_open_group.cpp index a73f90484..c410833ac 100644 --- a/src/app/commands/cmd_open_group.cpp +++ b/src/app/commands/cmd_open_group.cpp @@ -20,7 +20,6 @@ using namespace ui; class OpenGroupCommand : public Command { public: OpenGroupCommand(); - Command* clone() const override { return new OpenGroupCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_open_in_folder.cpp b/src/app/commands/cmd_open_in_folder.cpp index a174d516d..c5408bb3b 100644 --- a/src/app/commands/cmd_open_in_folder.cpp +++ b/src/app/commands/cmd_open_in_folder.cpp @@ -19,7 +19,6 @@ namespace app { class OpenInFolderCommand : public Command { public: OpenInFolderCommand(); - Command* clone() const override { return new OpenInFolderCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_open_with_app.cpp b/src/app/commands/cmd_open_with_app.cpp index d7f541ea1..473d8fb57 100644 --- a/src/app/commands/cmd_open_with_app.cpp +++ b/src/app/commands/cmd_open_with_app.cpp @@ -19,7 +19,6 @@ namespace app { class OpenWithAppCommand : public Command { public: OpenWithAppCommand(); - Command* clone() const override { return new OpenWithAppCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_options.cpp b/src/app/commands/cmd_options.cpp index 5db1a9913..56fb3436a 100644 --- a/src/app/commands/cmd_options.cpp +++ b/src/app/commands/cmd_options.cpp @@ -1278,7 +1278,6 @@ private: class OptionsCommand : public Command { public: OptionsCommand(); - Command* clone() const override { return new OptionsCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_palette_editor.cpp b/src/app/commands/cmd_palette_editor.cpp index 6009b723c..dc3523798 100644 --- a/src/app/commands/cmd_palette_editor.cpp +++ b/src/app/commands/cmd_palette_editor.cpp @@ -19,7 +19,6 @@ namespace app { class PaletteEditorCommand : public Command { public: PaletteEditorCommand(); - Command* clone() const override { return new PaletteEditorCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_palette_size.cpp b/src/app/commands/cmd_palette_size.cpp index 7d39b375b..3884e2429 100644 --- a/src/app/commands/cmd_palette_size.cpp +++ b/src/app/commands/cmd_palette_size.cpp @@ -28,7 +28,6 @@ namespace app { class PaletteSizeCommand : public Command { public: PaletteSizeCommand(); - Command* clone() const override { return new PaletteSizeCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_paste.cpp b/src/app/commands/cmd_paste.cpp index b8ede9b2d..1f7939b34 100644 --- a/src/app/commands/cmd_paste.cpp +++ b/src/app/commands/cmd_paste.cpp @@ -17,7 +17,6 @@ namespace app { class PasteCommand : public Command { public: PasteCommand(); - Command* clone() const override { return new PasteCommand(*this); } protected: bool onEnabled(Context* ctx) override; diff --git a/src/app/commands/cmd_paste_text.cpp b/src/app/commands/cmd_paste_text.cpp index 0c94f00bc..55b85e11a 100644 --- a/src/app/commands/cmd_paste_text.cpp +++ b/src/app/commands/cmd_paste_text.cpp @@ -37,7 +37,6 @@ static std::string last_text_used; class PasteTextCommand : public Command { public: PasteTextCommand(); - Command* clone() const override { return new PasteTextCommand(*this); } protected: bool onEnabled(Context* ctx) override; diff --git a/src/app/commands/cmd_pixel_perfect_mode.cpp b/src/app/commands/cmd_pixel_perfect_mode.cpp index e614dbcf3..62564f52c 100644 --- a/src/app/commands/cmd_pixel_perfect_mode.cpp +++ b/src/app/commands/cmd_pixel_perfect_mode.cpp @@ -21,7 +21,6 @@ namespace app { class PixelPerfectModeCommand : public Command { public: PixelPerfectModeCommand(); - Command* clone() const override { return new PixelPerfectModeCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_play_animation.cpp b/src/app/commands/cmd_play_animation.cpp index 86640dea8..e3b59fb8d 100644 --- a/src/app/commands/cmd_play_animation.cpp +++ b/src/app/commands/cmd_play_animation.cpp @@ -27,7 +27,6 @@ using namespace ui; class PlayAnimationCommand : public Command { public: PlayAnimationCommand(); - Command* clone() const override { return new PlayAnimationCommand(*this); } protected: bool onEnabled(Context* context) override; @@ -71,7 +70,6 @@ void PlayAnimationCommand::onExecute(Context* context) class PlayPreviewAnimationCommand : public Command { public: PlayPreviewAnimationCommand(); - Command* clone() const override { return new PlayPreviewAnimationCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_refresh.cpp b/src/app/commands/cmd_refresh.cpp index 15660e45e..906758210 100644 --- a/src/app/commands/cmd_refresh.cpp +++ b/src/app/commands/cmd_refresh.cpp @@ -26,7 +26,6 @@ namespace app { class RefreshCommand : public Command { public: RefreshCommand(); - Command* clone() const override { return new RefreshCommand(*this); } protected: void onExecute(Context* context) override; diff --git a/src/app/commands/cmd_remove_frame.cpp b/src/app/commands/cmd_remove_frame.cpp index cb56cf30e..b188a70c6 100644 --- a/src/app/commands/cmd_remove_frame.cpp +++ b/src/app/commands/cmd_remove_frame.cpp @@ -22,7 +22,6 @@ namespace app { class RemoveFrameCommand : public Command { public: RemoveFrameCommand(); - Command* clone() const override { return new RemoveFrameCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_remove_frame_tag.cpp b/src/app/commands/cmd_remove_frame_tag.cpp index d07219c6d..47cd13c9b 100644 --- a/src/app/commands/cmd_remove_frame_tag.cpp +++ b/src/app/commands/cmd_remove_frame_tag.cpp @@ -25,7 +25,6 @@ namespace app { class RemoveFrameTagCommand : public Command { public: RemoveFrameTagCommand(); - Command* clone() const override { return new RemoveFrameTagCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_remove_layer.cpp b/src/app/commands/cmd_remove_layer.cpp index 3ffea2961..b3cae3786 100644 --- a/src/app/commands/cmd_remove_layer.cpp +++ b/src/app/commands/cmd_remove_layer.cpp @@ -26,7 +26,6 @@ namespace app { class RemoveLayerCommand : public Command { public: RemoveLayerCommand(); - Command* clone() const override { return new RemoveLayerCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_remove_slice.cpp b/src/app/commands/cmd_remove_slice.cpp index 370e31b20..f63ec2ea5 100644 --- a/src/app/commands/cmd_remove_slice.cpp +++ b/src/app/commands/cmd_remove_slice.cpp @@ -27,7 +27,6 @@ namespace app { class RemoveSliceCommand : public Command { public: RemoveSliceCommand(); - Command* clone() const override { return new RemoveSliceCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_repeat_last_export.cpp b/src/app/commands/cmd_repeat_last_export.cpp index 066b57630..9b70538df 100644 --- a/src/app/commands/cmd_repeat_last_export.cpp +++ b/src/app/commands/cmd_repeat_last_export.cpp @@ -21,7 +21,6 @@ namespace app { class RepeatLastExportCommand : public Command { public: RepeatLastExportCommand(); - Command* clone() const override { return new RepeatLastExportCommand(*this); } protected: virtual bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_reselect_mask.cpp b/src/app/commands/cmd_reselect_mask.cpp index 931e83ce8..b5330bf46 100644 --- a/src/app/commands/cmd_reselect_mask.cpp +++ b/src/app/commands/cmd_reselect_mask.cpp @@ -21,7 +21,6 @@ namespace app { class ReselectMaskCommand : public Command { public: ReselectMaskCommand(); - Command* clone() const override { return new ReselectMaskCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_reverse_frames.cpp b/src/app/commands/cmd_reverse_frames.cpp index 36bbe3348..243cb00c2 100644 --- a/src/app/commands/cmd_reverse_frames.cpp +++ b/src/app/commands/cmd_reverse_frames.cpp @@ -20,7 +20,6 @@ namespace app { class ReverseFramesCommand : public Command { public: ReverseFramesCommand(); - Command* clone() const override { return new ReverseFramesCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_rotate.h b/src/app/commands/cmd_rotate.h index 4dae38bd2..49fe91f51 100644 --- a/src/app/commands/cmd_rotate.h +++ b/src/app/commands/cmd_rotate.h @@ -15,7 +15,6 @@ namespace app { class RotateCommand : public Command { public: RotateCommand(); - Command* clone() const override { return new RotateCommand(*this); } bool flipMask() const { return m_flipMask; } int angle() const { return m_angle; } diff --git a/src/app/commands/cmd_run_script.cpp b/src/app/commands/cmd_run_script.cpp index cdf0b43d1..3409ff230 100644 --- a/src/app/commands/cmd_run_script.cpp +++ b/src/app/commands/cmd_run_script.cpp @@ -34,7 +34,6 @@ namespace app { class RunScriptCommand : public Command { public: RunScriptCommand(); - Command* clone() const override { return new RunScriptCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_save_file.cpp b/src/app/commands/cmd_save_file.cpp index e9144841d..e8bf16ea8 100644 --- a/src/app/commands/cmd_save_file.cpp +++ b/src/app/commands/cmd_save_file.cpp @@ -238,7 +238,6 @@ void SaveFileBaseCommand::saveDocumentInBackground( class SaveFileCommand : public SaveFileBaseCommand { public: SaveFileCommand(); - Command* clone() const override { return new SaveFileCommand(*this); } protected: void onExecute(Context* context) override; @@ -277,7 +276,6 @@ void SaveFileCommand::onExecute(Context* context) class SaveFileAsCommand : public SaveFileBaseCommand { public: SaveFileAsCommand(); - Command* clone() const override { return new SaveFileAsCommand(*this); } protected: void onExecute(Context* context) override; @@ -298,7 +296,6 @@ void SaveFileAsCommand::onExecute(Context* context) class SaveFileCopyAsCommand : public SaveFileBaseCommand { public: SaveFileCopyAsCommand(); - Command* clone() const override { return new SaveFileCopyAsCommand(*this); } protected: void onExecute(Context* context) override; diff --git a/src/app/commands/cmd_save_mask.cpp b/src/app/commands/cmd_save_mask.cpp index 391023d4d..68de89149 100644 --- a/src/app/commands/cmd_save_mask.cpp +++ b/src/app/commands/cmd_save_mask.cpp @@ -24,7 +24,6 @@ namespace app { class SaveMaskCommand : public Command { public: SaveMaskCommand(); - Command* clone() const override { return new SaveMaskCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_save_palette.cpp b/src/app/commands/cmd_save_palette.cpp index 2349712e5..429599162 100644 --- a/src/app/commands/cmd_save_palette.cpp +++ b/src/app/commands/cmd_save_palette.cpp @@ -28,7 +28,6 @@ using namespace ui; class SavePaletteCommand : public Command { public: SavePaletteCommand(); - Command* clone() const override { return new SavePaletteCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_scroll.cpp b/src/app/commands/cmd_scroll.cpp index 687bbe621..5c2f60a91 100644 --- a/src/app/commands/cmd_scroll.cpp +++ b/src/app/commands/cmd_scroll.cpp @@ -25,7 +25,6 @@ namespace app { class ScrollCommand : public Command { public: ScrollCommand(); - Command* clone() const override { return new ScrollCommand(*this); } protected: bool onNeedsParams() const override { return true; } diff --git a/src/app/commands/cmd_scroll_center.cpp b/src/app/commands/cmd_scroll_center.cpp index b42ad35db..11d5556c8 100644 --- a/src/app/commands/cmd_scroll_center.cpp +++ b/src/app/commands/cmd_scroll_center.cpp @@ -19,7 +19,6 @@ namespace app { class ScrollCenterCommand : public Command { public: ScrollCenterCommand(); - Command* clone() const override { return new ScrollCenterCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_select_tile.cpp b/src/app/commands/cmd_select_tile.cpp index f49d3f30e..3100240bb 100644 --- a/src/app/commands/cmd_select_tile.cpp +++ b/src/app/commands/cmd_select_tile.cpp @@ -31,7 +31,6 @@ using namespace doc; class SelectTileCommand : public Command { public: SelectTileCommand(); - Command* clone() const override { return new SelectTileCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_set_color_selector.cpp b/src/app/commands/cmd_set_color_selector.cpp index 56d5d9ec7..a506d77b4 100644 --- a/src/app/commands/cmd_set_color_selector.cpp +++ b/src/app/commands/cmd_set_color_selector.cpp @@ -20,7 +20,6 @@ namespace app { class SetColorSelectorCommand : public Command { public: SetColorSelectorCommand(); - Command* clone() const override { return new SetColorSelectorCommand(*this); } protected: bool onNeedsParams() const override { return true; } diff --git a/src/app/commands/cmd_set_ink_type.cpp b/src/app/commands/cmd_set_ink_type.cpp index 866a84567..824cfd2ef 100644 --- a/src/app/commands/cmd_set_ink_type.cpp +++ b/src/app/commands/cmd_set_ink_type.cpp @@ -22,7 +22,6 @@ namespace app { class SetInkTypeCommand : public Command { public: SetInkTypeCommand(); - Command* clone() const override { return new SetInkTypeCommand(*this); } protected: bool onNeedsParams() const override { return true; } diff --git a/src/app/commands/cmd_set_loop_section.cpp b/src/app/commands/cmd_set_loop_section.cpp index eba3b1b12..3fdbfe124 100644 --- a/src/app/commands/cmd_set_loop_section.cpp +++ b/src/app/commands/cmd_set_loop_section.cpp @@ -28,7 +28,6 @@ public: enum class Action { Auto, On, Off }; SetLoopSectionCommand(); - Command* clone() const override { return new SetLoopSectionCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_set_palette.h b/src/app/commands/cmd_set_palette.h index 6d8a99892..6743996b7 100644 --- a/src/app/commands/cmd_set_palette.h +++ b/src/app/commands/cmd_set_palette.h @@ -21,7 +21,6 @@ namespace app { enum class Target { Document, App }; SetPaletteCommand(); - Command* clone() const override { return new SetPaletteCommand(*this); } void setPalette(const doc::Palette* palette) { m_palette = palette; } diff --git a/src/app/commands/cmd_set_palette_entry_size.cpp b/src/app/commands/cmd_set_palette_entry_size.cpp index 540840cd4..e62b546fd 100644 --- a/src/app/commands/cmd_set_palette_entry_size.cpp +++ b/src/app/commands/cmd_set_palette_entry_size.cpp @@ -18,7 +18,6 @@ namespace app { class SetPaletteEntrySizeCommand : public Command { public: SetPaletteEntrySizeCommand(); - Command* clone() const override { return new SetPaletteEntrySizeCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_set_same_ink.cpp b/src/app/commands/cmd_set_same_ink.cpp index 0dc0d4dd1..bb395c4cb 100644 --- a/src/app/commands/cmd_set_same_ink.cpp +++ b/src/app/commands/cmd_set_same_ink.cpp @@ -21,7 +21,6 @@ namespace app { class SetSameInkCommand : public Command { public: SetSameInkCommand(); - Command* clone() const override { return new SetSameInkCommand(*this); } protected: bool onChecked(Context* context) override; diff --git a/src/app/commands/cmd_show.cpp b/src/app/commands/cmd_show.cpp index 6e2343648..758d05d45 100644 --- a/src/app/commands/cmd_show.cpp +++ b/src/app/commands/cmd_show.cpp @@ -21,8 +21,6 @@ public: : Command(CommandId::ShowExtras(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ShowExtrasCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); @@ -60,8 +58,6 @@ public: : Command(CommandId::ShowLayerEdges(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ShowLayerEdgesCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); @@ -80,8 +76,6 @@ public: : Command(CommandId::ShowGrid(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ShowGridCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); @@ -100,8 +94,6 @@ public: : Command(CommandId::ShowPixelGrid(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ShowPixelGridCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); @@ -120,8 +112,6 @@ public: : Command(CommandId::ShowSelectionEdges(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ShowSelectionEdgesCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); @@ -140,8 +130,6 @@ public: : Command(CommandId::ShowBrushPreview(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ShowBrushPreviewCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); @@ -165,8 +153,6 @@ public: : Command(CommandId::ShowAutoGuides(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ShowAutoGuidesCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); @@ -185,8 +171,6 @@ public: : Command(CommandId::ShowSlices(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ShowSlicesCommand(*this); } - protected: bool onChecked(Context* ctx) override { DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument()); diff --git a/src/app/commands/cmd_slice_properties.cpp b/src/app/commands/cmd_slice_properties.cpp index c32f7bf2a..a591ecad2 100644 --- a/src/app/commands/cmd_slice_properties.cpp +++ b/src/app/commands/cmd_slice_properties.cpp @@ -26,7 +26,6 @@ using namespace ui; class SlicePropertiesCommand : public Command { public: SlicePropertiesCommand(); - Command* clone() const override { return new SlicePropertiesCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_sprite_properties.cpp b/src/app/commands/cmd_sprite_properties.cpp index dbb5b94bc..97c147255 100644 --- a/src/app/commands/cmd_sprite_properties.cpp +++ b/src/app/commands/cmd_sprite_properties.cpp @@ -41,7 +41,6 @@ using namespace ui; class SpritePropertiesCommand : public Command { public: SpritePropertiesCommand(); - Command* clone() const override { return new SpritePropertiesCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_sprite_size.cpp b/src/app/commands/cmd_sprite_size.cpp index 5d7bb0b8f..66800a7f9 100644 --- a/src/app/commands/cmd_sprite_size.cpp +++ b/src/app/commands/cmd_sprite_size.cpp @@ -279,11 +279,6 @@ SpriteSizeCommand::SpriteSizeCommand() m_resizeMethod = doc::algorithm::RESIZE_METHOD_NEAREST_NEIGHBOR; } -Command* SpriteSizeCommand::clone() const -{ - return new SpriteSizeCommand(*this); -} - void SpriteSizeCommand::onLoadParams(const Params& params) { std::string useUI = params.get("use-ui"); diff --git a/src/app/commands/cmd_sprite_size.h b/src/app/commands/cmd_sprite_size.h index 006603e9e..c8a135711 100644 --- a/src/app/commands/cmd_sprite_size.h +++ b/src/app/commands/cmd_sprite_size.h @@ -23,7 +23,6 @@ namespace app { class SpriteSizeCommand : public Command { public: SpriteSizeCommand(); - Command* clone() const override; void setScale(double x, double y) { m_scaleX = x; diff --git a/src/app/commands/cmd_symmetry_mode.cpp b/src/app/commands/cmd_symmetry_mode.cpp index 08be67496..479399221 100644 --- a/src/app/commands/cmd_symmetry_mode.cpp +++ b/src/app/commands/cmd_symmetry_mode.cpp @@ -25,7 +25,6 @@ namespace app { class SymmetryModeCommand : public Command { public: SymmetryModeCommand(); - Command* clone() const override { return new SymmetryModeCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_tiled_mode.cpp b/src/app/commands/cmd_tiled_mode.cpp index 2bab0df1e..92a8656ce 100644 --- a/src/app/commands/cmd_tiled_mode.cpp +++ b/src/app/commands/cmd_tiled_mode.cpp @@ -20,7 +20,6 @@ namespace app { class TiledModeCommand : public Command { public: TiledModeCommand(); - Command* clone() const override { return new TiledModeCommand(*this); } protected: void onLoadParams(const Params& params) override; diff --git a/src/app/commands/cmd_timeline.cpp b/src/app/commands/cmd_timeline.cpp index 10fddf520..0eb9ac2fe 100644 --- a/src/app/commands/cmd_timeline.cpp +++ b/src/app/commands/cmd_timeline.cpp @@ -22,7 +22,6 @@ namespace app { class TimelineCommand : public Command { public: TimelineCommand(); - Command* clone() const override { return new TimelineCommand(*this); } protected: bool onNeedsParams() const override { return true; } diff --git a/src/app/commands/cmd_toggle_preview.cpp b/src/app/commands/cmd_toggle_preview.cpp index 41340bcc1..8740e398e 100644 --- a/src/app/commands/cmd_toggle_preview.cpp +++ b/src/app/commands/cmd_toggle_preview.cpp @@ -19,7 +19,6 @@ namespace app { class TogglePreviewCommand : public Command { public: TogglePreviewCommand(); - Command* clone() const override { return new TogglePreviewCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_toggle_timeline_thumbnails.cpp b/src/app/commands/cmd_toggle_timeline_thumbnails.cpp index c7275d320..b47b5ea82 100644 --- a/src/app/commands/cmd_toggle_timeline_thumbnails.cpp +++ b/src/app/commands/cmd_toggle_timeline_thumbnails.cpp @@ -25,8 +25,6 @@ public: : Command(CommandId::ToggleTimelineThumbnails(), CmdUIOnlyFlag) { } - Command* clone() const override { return new ToggleTimelineThumbnailsCommand(*this); } - protected: bool onChecked(Context* context) override { DocumentPreferences& docPref = Preferences::instance().document(context->activeDocument()); diff --git a/src/app/commands/cmd_undo.cpp b/src/app/commands/cmd_undo.cpp index 612239d16..f3d975300 100644 --- a/src/app/commands/cmd_undo.cpp +++ b/src/app/commands/cmd_undo.cpp @@ -35,7 +35,6 @@ public: enum Type { Undo, Redo }; UndoCommand(Type type); - Command* clone() const override { return new UndoCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_undo_history.cpp b/src/app/commands/cmd_undo_history.cpp index 8ba3e9c51..eeab08423 100644 --- a/src/app/commands/cmd_undo_history.cpp +++ b/src/app/commands/cmd_undo_history.cpp @@ -252,7 +252,6 @@ private: class UndoHistoryCommand : public Command { public: UndoHistoryCommand(); - Command* clone() const override { return new UndoHistoryCommand(*this); } protected: void onExecute(Context* ctx) override; diff --git a/src/app/commands/cmd_unlink_cel.cpp b/src/app/commands/cmd_unlink_cel.cpp index 2298cf12b..a57b6b135 100644 --- a/src/app/commands/cmd_unlink_cel.cpp +++ b/src/app/commands/cmd_unlink_cel.cpp @@ -24,7 +24,6 @@ namespace app { class UnlinkCelCommand : public Command { public: UnlinkCelCommand(); - Command* clone() const override { return new UnlinkCelCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/cmd_zoom.cpp b/src/app/commands/cmd_zoom.cpp index 9c86bf654..3366de07b 100644 --- a/src/app/commands/cmd_zoom.cpp +++ b/src/app/commands/cmd_zoom.cpp @@ -29,7 +29,6 @@ public: enum class Focus { Default, Mouse, Center }; ZoomCommand(); - Command* clone() const override { return new ZoomCommand(*this); } protected: bool onNeedsParams() const override { return true; } diff --git a/src/app/commands/command.h b/src/app/commands/command.h index 0f00f8310..02eb47353 100644 --- a/src/app/commands/command.h +++ b/src/app/commands/command.h @@ -28,8 +28,6 @@ namespace app { Command(const char* id, CommandFlags flags); virtual ~Command(); - virtual Command* clone() const { return new Command(*this); } - const std::string& id() const { return m_id; } std::string friendlyName() const; diff --git a/src/app/commands/filters/cmd_brightness_contrast.cpp b/src/app/commands/filters/cmd_brightness_contrast.cpp index 9b59577aa..eafb15b69 100644 --- a/src/app/commands/filters/cmd_brightness_contrast.cpp +++ b/src/app/commands/filters/cmd_brightness_contrast.cpp @@ -67,7 +67,6 @@ private: class BrightnessContrastCommand : public Command { public: BrightnessContrastCommand(); - Command* clone() const override { return new BrightnessContrastCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/filters/cmd_color_curve.cpp b/src/app/commands/filters/cmd_color_curve.cpp index a57cd1996..f155ea86a 100644 --- a/src/app/commands/filters/cmd_color_curve.cpp +++ b/src/app/commands/filters/cmd_color_curve.cpp @@ -70,7 +70,6 @@ private: class ColorCurveCommand : public Command { public: ColorCurveCommand(); - Command* clone() const override { return new ColorCurveCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/filters/cmd_convolution_matrix.cpp b/src/app/commands/filters/cmd_convolution_matrix.cpp index 01e9bd965..131a55801 100644 --- a/src/app/commands/filters/cmd_convolution_matrix.cpp +++ b/src/app/commands/filters/cmd_convolution_matrix.cpp @@ -143,7 +143,6 @@ private: class ConvolutionMatrixCommand : public Command { public: ConvolutionMatrixCommand(); - Command* clone() const override { return new ConvolutionMatrixCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/filters/cmd_despeckle.cpp b/src/app/commands/filters/cmd_despeckle.cpp index 97627d41e..8b10f2d33 100644 --- a/src/app/commands/filters/cmd_despeckle.cpp +++ b/src/app/commands/filters/cmd_despeckle.cpp @@ -90,7 +90,6 @@ class DespeckleCommand : public Command { public: DespeckleCommand(); - Command* clone() const override { return new DespeckleCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/filters/cmd_hue_saturation.cpp b/src/app/commands/filters/cmd_hue_saturation.cpp index d05daa38f..56ae0fa1a 100644 --- a/src/app/commands/filters/cmd_hue_saturation.cpp +++ b/src/app/commands/filters/cmd_hue_saturation.cpp @@ -120,7 +120,6 @@ private: class HueSaturationCommand : public Command { public: HueSaturationCommand(); - Command* clone() const override { return new HueSaturationCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/filters/cmd_invert_color.cpp b/src/app/commands/filters/cmd_invert_color.cpp index 16d3bae1d..652e7f131 100644 --- a/src/app/commands/filters/cmd_invert_color.cpp +++ b/src/app/commands/filters/cmd_invert_color.cpp @@ -44,7 +44,6 @@ public: class InvertColorCommand : public Command { public: InvertColorCommand(); - Command* clone() const override { return new InvertColorCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/filters/cmd_replace_color.cpp b/src/app/commands/filters/cmd_replace_color.cpp index eff1781b8..cd9fa6d0e 100644 --- a/src/app/commands/filters/cmd_replace_color.cpp +++ b/src/app/commands/filters/cmd_replace_color.cpp @@ -130,7 +130,6 @@ private: class ReplaceColorCommand : public Command { public: ReplaceColorCommand(); - Command* clone() const override { return new ReplaceColorCommand(*this); } protected: bool onEnabled(Context* context) override; diff --git a/src/app/commands/quick_command.cpp b/src/app/commands/quick_command.cpp index a32885af5..dfbfb30e5 100644 --- a/src/app/commands/quick_command.cpp +++ b/src/app/commands/quick_command.cpp @@ -22,11 +22,6 @@ QuickCommand::~QuickCommand() { } -QuickCommand* QuickCommand::clone() const -{ - return new QuickCommand(*this); -} - void QuickCommand::onExecute(Context* context) { m_execute(); diff --git a/src/app/commands/quick_command.h b/src/app/commands/quick_command.h index 60853954b..ff554fabc 100644 --- a/src/app/commands/quick_command.h +++ b/src/app/commands/quick_command.h @@ -19,8 +19,6 @@ namespace app { QuickCommand(const char* id, std::function execute); ~QuickCommand(); - QuickCommand* clone() const override; - protected: void onExecute(Context* context) override;