diff --git a/src/app/cmd/move_layer.h b/src/app/cmd/move_layer.h index 8cae76f2d..6f73fc903 100644 --- a/src/app/cmd/move_layer.h +++ b/src/app/cmd/move_layer.h @@ -24,7 +24,7 @@ namespace cmd { void onExecute() override; void onUndo() override; void onFireNotifications() override; - size_t onMemSize() const { + size_t onMemSize() const override { return sizeof(*this); } diff --git a/src/app/cmd/set_cel_frame.h b/src/app/cmd/set_cel_frame.h index 6424e4603..a294f47c2 100644 --- a/src/app/cmd/set_cel_frame.h +++ b/src/app/cmd/set_cel_frame.h @@ -25,7 +25,7 @@ namespace cmd { void onExecute() override; void onUndo() override; void onFireNotifications() override; - size_t onMemSize() const { + size_t onMemSize() const override { return sizeof(*this); } diff --git a/src/app/cmd/set_transparent_color.h b/src/app/cmd/set_transparent_color.h index aaf7886b9..684739240 100644 --- a/src/app/cmd/set_transparent_color.h +++ b/src/app/cmd/set_transparent_color.h @@ -25,7 +25,7 @@ namespace cmd { protected: void onExecute() override; void onUndo() override; - void onFireNotifications(); + void onFireNotifications() override; size_t onMemSize() const override { return sizeof(*this); } diff --git a/src/app/commands/cmd_about.cpp b/src/app/commands/cmd_about.cpp index e97a4337f..fc66933f3 100644 --- a/src/app/commands/cmd_about.cpp +++ b/src/app/commands/cmd_about.cpp @@ -24,7 +24,7 @@ public: Command* clone() const override { return new AboutCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; AboutCommand::AboutCommand() diff --git a/src/app/commands/cmd_advanced_mode.cpp b/src/app/commands/cmd_advanced_mode.cpp index 9d19cd0fa..9114cf3ba 100644 --- a/src/app/commands/cmd_advanced_mode.cpp +++ b/src/app/commands/cmd_advanced_mode.cpp @@ -30,7 +30,7 @@ public: Command* clone() const override { return new AdvancedModeCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; AdvancedModeCommand::AdvancedModeCommand() diff --git a/src/app/commands/cmd_background_from_layer.cpp b/src/app/commands/cmd_background_from_layer.cpp index cab35a82b..f78c9c6f9 100644 --- a/src/app/commands/cmd_background_from_layer.cpp +++ b/src/app/commands/cmd_background_from_layer.cpp @@ -26,8 +26,8 @@ public: Command* clone() const override { return new BackgroundFromLayerCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; BackgroundFromLayerCommand::BackgroundFromLayerCommand() diff --git a/src/app/commands/cmd_canvas_size.cpp b/src/app/commands/cmd_canvas_size.cpp index f4055c1fb..ad3307e9b 100644 --- a/src/app/commands/cmd_canvas_size.cpp +++ b/src/app/commands/cmd_canvas_size.cpp @@ -274,8 +274,8 @@ public: Command* clone() const override { return new CanvasSizeCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; CanvasSizeCommand::CanvasSizeCommand() diff --git a/src/app/commands/cmd_clear_cel.cpp b/src/app/commands/cmd_clear_cel.cpp index aac85336f..21a84258b 100644 --- a/src/app/commands/cmd_clear_cel.cpp +++ b/src/app/commands/cmd_clear_cel.cpp @@ -30,8 +30,8 @@ public: Command* clone() const override { return new ClearCelCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; ClearCelCommand::ClearCelCommand() diff --git a/src/app/commands/cmd_copy_cel.cpp b/src/app/commands/cmd_copy_cel.cpp index 7f661322d..a6f6366ec 100644 --- a/src/app/commands/cmd_copy_cel.cpp +++ b/src/app/commands/cmd_copy_cel.cpp @@ -24,8 +24,8 @@ public: Command* clone() const override { return new CopyCelCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; CopyCelCommand::CopyCelCommand() diff --git a/src/app/commands/cmd_crop.cpp b/src/app/commands/cmd_crop.cpp index a9e97ce0e..83904f7d4 100644 --- a/src/app/commands/cmd_crop.cpp +++ b/src/app/commands/cmd_crop.cpp @@ -88,8 +88,8 @@ public: Command* clone() const override { return new AutocropSpriteCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; AutocropSpriteCommand::AutocropSpriteCommand() diff --git a/src/app/commands/cmd_deselect_mask.cpp b/src/app/commands/cmd_deselect_mask.cpp index b6b0a5ad7..62e229c79 100644 --- a/src/app/commands/cmd_deselect_mask.cpp +++ b/src/app/commands/cmd_deselect_mask.cpp @@ -25,8 +25,8 @@ public: Command* clone() const override { return new DeselectMaskCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; DeselectMaskCommand::DeselectMaskCommand() diff --git a/src/app/commands/cmd_duplicate_layer.cpp b/src/app/commands/cmd_duplicate_layer.cpp index 56344ca19..a2cf34193 100644 --- a/src/app/commands/cmd_duplicate_layer.cpp +++ b/src/app/commands/cmd_duplicate_layer.cpp @@ -31,8 +31,8 @@ public: Command* clone() const override { return new DuplicateLayerCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; DuplicateLayerCommand::DuplicateLayerCommand() diff --git a/src/app/commands/cmd_duplicate_sprite.cpp b/src/app/commands/cmd_duplicate_sprite.cpp index 8c47c8369..c88ed4097 100644 --- a/src/app/commands/cmd_duplicate_sprite.cpp +++ b/src/app/commands/cmd_duplicate_sprite.cpp @@ -33,8 +33,8 @@ public: Command* clone() const override { return new DuplicateSpriteCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; DuplicateSpriteCommand::DuplicateSpriteCommand() diff --git a/src/app/commands/cmd_exit.cpp b/src/app/commands/cmd_exit.cpp index 174cfc8e5..fb8c3c9f8 100644 --- a/src/app/commands/cmd_exit.cpp +++ b/src/app/commands/cmd_exit.cpp @@ -24,7 +24,7 @@ public: Command* clone() const override { return new ExitCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; ExitCommand::ExitCommand() diff --git a/src/app/commands/cmd_flatten_layers.cpp b/src/app/commands/cmd_flatten_layers.cpp index 36a2bf1aa..02aa6f49f 100644 --- a/src/app/commands/cmd_flatten_layers.cpp +++ b/src/app/commands/cmd_flatten_layers.cpp @@ -25,8 +25,8 @@ public: Command* clone() const override { return new FlattenLayersCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; FlattenLayersCommand::FlattenLayersCommand() diff --git a/src/app/commands/cmd_fullscreen_preview.cpp b/src/app/commands/cmd_fullscreen_preview.cpp index 8903f4f1b..3eac79ee7 100644 --- a/src/app/commands/cmd_fullscreen_preview.cpp +++ b/src/app/commands/cmd_fullscreen_preview.cpp @@ -257,8 +257,8 @@ public: Command* clone() const override { return new FullscreenPreviewCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; FullscreenPreviewCommand::FullscreenPreviewCommand() diff --git a/src/app/commands/cmd_goto_layer.cpp b/src/app/commands/cmd_goto_layer.cpp index 8909be088..bd27f7725 100644 --- a/src/app/commands/cmd_goto_layer.cpp +++ b/src/app/commands/cmd_goto_layer.cpp @@ -42,8 +42,8 @@ public: Command* clone() const override { return new GotoPreviousLayerCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; GotoPreviousLayerCommand::GotoPreviousLayerCommand() @@ -81,8 +81,8 @@ public: Command* clone() const override { return new GotoNextLayerCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; GotoNextLayerCommand::GotoNextLayerCommand() diff --git a/src/app/commands/cmd_invert_mask.cpp b/src/app/commands/cmd_invert_mask.cpp index f904ed8e4..0d8377eaa 100644 --- a/src/app/commands/cmd_invert_mask.cpp +++ b/src/app/commands/cmd_invert_mask.cpp @@ -29,8 +29,8 @@ public: Command* clone() const override { return new InvertMaskCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; InvertMaskCommand::InvertMaskCommand() diff --git a/src/app/commands/cmd_keyboard_shortcuts.cpp b/src/app/commands/cmd_keyboard_shortcuts.cpp index 3cb578e47..a62c6fee0 100644 --- a/src/app/commands/cmd_keyboard_shortcuts.cpp +++ b/src/app/commands/cmd_keyboard_shortcuts.cpp @@ -446,7 +446,7 @@ public: Command* clone() const override { return new KeyboardShortcutsCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; KeyboardShortcutsCommand::KeyboardShortcutsCommand() diff --git a/src/app/commands/cmd_layer_from_background.cpp b/src/app/commands/cmd_layer_from_background.cpp index 19ff482fb..af7dcd713 100644 --- a/src/app/commands/cmd_layer_from_background.cpp +++ b/src/app/commands/cmd_layer_from_background.cpp @@ -26,8 +26,8 @@ public: Command* clone() const override { return new LayerFromBackgroundCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; LayerFromBackgroundCommand::LayerFromBackgroundCommand() diff --git a/src/app/commands/cmd_mask_all.cpp b/src/app/commands/cmd_mask_all.cpp index 76dad7850..e5776ceaa 100644 --- a/src/app/commands/cmd_mask_all.cpp +++ b/src/app/commands/cmd_mask_all.cpp @@ -25,8 +25,8 @@ public: Command* clone() const override { return new MaskAllCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; MaskAllCommand::MaskAllCommand() diff --git a/src/app/commands/cmd_mask_by_color.cpp b/src/app/commands/cmd_mask_by_color.cpp index 39994a137..e981371ac 100644 --- a/src/app/commands/cmd_mask_by_color.cpp +++ b/src/app/commands/cmd_mask_by_color.cpp @@ -50,8 +50,8 @@ public: Command* clone() const override { return new MaskByColorCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; private: Mask* generateMask(const Sprite* sprite, const Image* image, int xpos, int ypos); diff --git a/src/app/commands/cmd_mask_content.cpp b/src/app/commands/cmd_mask_content.cpp index f9916bbcb..db652372d 100644 --- a/src/app/commands/cmd_mask_content.cpp +++ b/src/app/commands/cmd_mask_content.cpp @@ -34,8 +34,8 @@ public: Command* clone() const override { return new MaskContentCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; MaskContentCommand::MaskContentCommand() diff --git a/src/app/commands/cmd_merge_down_layer.cpp b/src/app/commands/cmd_merge_down_layer.cpp index 1269790aa..d97bd2dbc 100644 --- a/src/app/commands/cmd_merge_down_layer.cpp +++ b/src/app/commands/cmd_merge_down_layer.cpp @@ -38,8 +38,8 @@ public: Command* clone() const override { return new MergeDownLayerCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; MergeDownLayerCommand::MergeDownLayerCommand() diff --git a/src/app/commands/cmd_move_cel.cpp b/src/app/commands/cmd_move_cel.cpp index 81bf2ae1b..ba212a69f 100644 --- a/src/app/commands/cmd_move_cel.cpp +++ b/src/app/commands/cmd_move_cel.cpp @@ -24,8 +24,8 @@ public: Command* clone() const override { return new MoveCelCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; MoveCelCommand::MoveCelCommand() diff --git a/src/app/commands/cmd_new_file.cpp b/src/app/commands/cmd_new_file.cpp index a1991f91a..6d8499e96 100644 --- a/src/app/commands/cmd_new_file.cpp +++ b/src/app/commands/cmd_new_file.cpp @@ -43,7 +43,7 @@ public: Command* clone() const override { return new NewFileCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; static int _sprite_counter = 0; diff --git a/src/app/commands/cmd_new_layer_set.cpp b/src/app/commands/cmd_new_layer_set.cpp index 9218a5624..7c4637203 100644 --- a/src/app/commands/cmd_new_layer_set.cpp +++ b/src/app/commands/cmd_new_layer_set.cpp @@ -33,8 +33,8 @@ public: Command* clone() const override { return new NewLayerSetCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; NewLayerSetCommand::NewLayerSetCommand() diff --git a/src/app/commands/cmd_onionskin.cpp b/src/app/commands/cmd_onionskin.cpp index 4362800b1..9612499e5 100644 --- a/src/app/commands/cmd_onionskin.cpp +++ b/src/app/commands/cmd_onionskin.cpp @@ -31,14 +31,12 @@ public: Command* clone() const override { return new ShowOnionSkinCommand(*this); } protected: - bool onChecked(Context* context) - { + bool onChecked(Context* context) override { DocumentPreferences& docPref = Preferences::instance().document(context->activeDocument()); return docPref.onionskin.active(); } - void onExecute(Context* context) - { + void onExecute(Context* context) override { DocumentPreferences& docPref = Preferences::instance().document(context->activeDocument()); docPref.onionskin.active(!docPref.onionskin.active()); } diff --git a/src/app/commands/cmd_options.cpp b/src/app/commands/cmd_options.cpp index 792715deb..b13be395e 100644 --- a/src/app/commands/cmd_options.cpp +++ b/src/app/commands/cmd_options.cpp @@ -390,7 +390,7 @@ public: Command* clone() const override { return new OptionsCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; OptionsCommand::OptionsCommand() diff --git a/src/app/commands/cmd_play_animation.cpp b/src/app/commands/cmd_play_animation.cpp index 7a18fcd15..b5178cde1 100644 --- a/src/app/commands/cmd_play_animation.cpp +++ b/src/app/commands/cmd_play_animation.cpp @@ -25,8 +25,8 @@ public: Command* clone() const override { return new PlayAnimationCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; PlayAnimationCommand::PlayAnimationCommand() diff --git a/src/app/commands/cmd_refresh.cpp b/src/app/commands/cmd_refresh.cpp index b8c3e1e32..5d43ddacc 100644 --- a/src/app/commands/cmd_refresh.cpp +++ b/src/app/commands/cmd_refresh.cpp @@ -29,7 +29,7 @@ public: Command* clone() const override { return new RefreshCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; RefreshCommand::RefreshCommand() diff --git a/src/app/commands/cmd_remove_frame.cpp b/src/app/commands/cmd_remove_frame.cpp index 6507bdfcc..7b65ffbd3 100644 --- a/src/app/commands/cmd_remove_frame.cpp +++ b/src/app/commands/cmd_remove_frame.cpp @@ -28,8 +28,8 @@ public: Command* clone() const override { return new RemoveFrameCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; RemoveFrameCommand::RemoveFrameCommand() diff --git a/src/app/commands/cmd_remove_layer.cpp b/src/app/commands/cmd_remove_layer.cpp index 175054b20..79c292390 100644 --- a/src/app/commands/cmd_remove_layer.cpp +++ b/src/app/commands/cmd_remove_layer.cpp @@ -31,8 +31,8 @@ public: Command* clone() const override { return new RemoveLayerCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; RemoveLayerCommand::RemoveLayerCommand() diff --git a/src/app/commands/cmd_reselect_mask.cpp b/src/app/commands/cmd_reselect_mask.cpp index 74097db17..06d69ca3e 100644 --- a/src/app/commands/cmd_reselect_mask.cpp +++ b/src/app/commands/cmd_reselect_mask.cpp @@ -25,8 +25,8 @@ public: Command* clone() const override { return new ReselectMaskCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; ReselectMaskCommand::ReselectMaskCommand() diff --git a/src/app/commands/cmd_reverse_frames.cpp b/src/app/commands/cmd_reverse_frames.cpp index da468324f..34ebf43ce 100644 --- a/src/app/commands/cmd_reverse_frames.cpp +++ b/src/app/commands/cmd_reverse_frames.cpp @@ -25,8 +25,8 @@ public: Command* clone() const override { return new ReverseFramesCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; ReverseFramesCommand::ReverseFramesCommand() diff --git a/src/app/commands/cmd_save_file.cpp b/src/app/commands/cmd_save_file.cpp index 90c62eca5..6fad7a4bc 100644 --- a/src/app/commands/cmd_save_file.cpp +++ b/src/app/commands/cmd_save_file.cpp @@ -254,7 +254,7 @@ public: Command* clone() const override { return new SaveFileCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; SaveFileCommand::SaveFileCommand() @@ -292,7 +292,7 @@ public: Command* clone() const override { return new SaveFileAsCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; SaveFileAsCommand::SaveFileAsCommand() @@ -311,7 +311,7 @@ public: Command* clone() const override { return new SaveFileCopyAsCommand(*this); } protected: - void onExecute(Context* context); + void onExecute(Context* context) override; }; SaveFileCopyAsCommand::SaveFileCopyAsCommand() diff --git a/src/app/commands/cmd_save_mask.cpp b/src/app/commands/cmd_save_mask.cpp index 0275cb132..a01ba662a 100644 --- a/src/app/commands/cmd_save_mask.cpp +++ b/src/app/commands/cmd_save_mask.cpp @@ -27,8 +27,8 @@ public: Command* clone() const override { return new SaveMaskCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; SaveMaskCommand::SaveMaskCommand() diff --git a/src/app/commands/cmd_sprite_properties.cpp b/src/app/commands/cmd_sprite_properties.cpp index f20b38764..5d8f7d090 100644 --- a/src/app/commands/cmd_sprite_properties.cpp +++ b/src/app/commands/cmd_sprite_properties.cpp @@ -37,8 +37,8 @@ public: Command* clone() const override { return new SpritePropertiesCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; SpritePropertiesCommand::SpritePropertiesCommand() diff --git a/src/app/commands/cmd_undo.cpp b/src/app/commands/cmd_undo.cpp index e0d0ce1ef..12343b6cf 100644 --- a/src/app/commands/cmd_undo.cpp +++ b/src/app/commands/cmd_undo.cpp @@ -35,8 +35,8 @@ public: Command* clone() const override { return new UndoCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; private: Type m_type; diff --git a/src/app/commands/cmd_unlink_cel.cpp b/src/app/commands/cmd_unlink_cel.cpp index 47a8e6042..64dbf6ec8 100644 --- a/src/app/commands/cmd_unlink_cel.cpp +++ b/src/app/commands/cmd_unlink_cel.cpp @@ -30,8 +30,8 @@ public: Command* clone() const override { return new UnlinkCelCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; UnlinkCelCommand::UnlinkCelCommand() diff --git a/src/app/commands/filters/cmd_color_curve.cpp b/src/app/commands/filters/cmd_color_curve.cpp index 170dfa74e..23039beb3 100644 --- a/src/app/commands/filters/cmd_color_curve.cpp +++ b/src/app/commands/filters/cmd_color_curve.cpp @@ -81,8 +81,8 @@ public: Command* clone() const override { return new ColorCurveCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; ColorCurveCommand::ColorCurveCommand() diff --git a/src/app/commands/filters/cmd_convolution_matrix.cpp b/src/app/commands/filters/cmd_convolution_matrix.cpp index 36749208b..0062183fc 100644 --- a/src/app/commands/filters/cmd_convolution_matrix.cpp +++ b/src/app/commands/filters/cmd_convolution_matrix.cpp @@ -149,8 +149,8 @@ public: Command* clone() const override { return new ConvolutionMatrixCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; ConvolutionMatrixCommand::ConvolutionMatrixCommand() diff --git a/src/app/commands/filters/cmd_despeckle.cpp b/src/app/commands/filters/cmd_despeckle.cpp index 4bfc57993..fb865f84d 100644 --- a/src/app/commands/filters/cmd_despeckle.cpp +++ b/src/app/commands/filters/cmd_despeckle.cpp @@ -87,8 +87,8 @@ public: Command* clone() const override { return new DespeckleCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; DespeckleCommand::DespeckleCommand() diff --git a/src/app/commands/filters/cmd_invert_color.cpp b/src/app/commands/filters/cmd_invert_color.cpp index e73fc7237..c953f7129 100644 --- a/src/app/commands/filters/cmd_invert_color.cpp +++ b/src/app/commands/filters/cmd_invert_color.cpp @@ -48,8 +48,8 @@ public: Command* clone() const override { return new InvertColorCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; InvertColorCommand::InvertColorCommand() diff --git a/src/app/commands/filters/cmd_replace_color.cpp b/src/app/commands/filters/cmd_replace_color.cpp index f9b5a08a7..de6bcc550 100644 --- a/src/app/commands/filters/cmd_replace_color.cpp +++ b/src/app/commands/filters/cmd_replace_color.cpp @@ -116,8 +116,8 @@ public: Command* clone() const override { return new ReplaceColorCommand(*this); } protected: - bool onEnabled(Context* context); - void onExecute(Context* context); + bool onEnabled(Context* context) override; + void onExecute(Context* context) override; }; ReplaceColorCommand::ReplaceColorCommand() diff --git a/src/app/file/ase_format.cpp b/src/app/file/ase_format.cpp index 1b77c3754..5d3d1e979 100644 --- a/src/app/file/ase_format.cpp +++ b/src/app/file/ase_format.cpp @@ -133,9 +133,9 @@ private: }; class AseFormat : public FileFormat { - const char* onGetName() const { return "ase"; } - const char* onGetExtensions() const { return "ase,aseprite"; } - int onGetFlags() const { + const char* onGetName() const override { return "ase"; } + const char* onGetExtensions() const override { return "ase,aseprite"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | diff --git a/src/app/file/bmp_format.cpp b/src/app/file/bmp_format.cpp index 11ae684b0..f2352f661 100644 --- a/src/app/file/bmp_format.cpp +++ b/src/app/file/bmp_format.cpp @@ -44,9 +44,9 @@ class BmpFormat : public FileFormat { uint32_t blue_mask; // Mask for blue channel. }; - const char* onGetName() const { return "bmp"; } - const char* onGetExtensions() const { return "bmp"; } - int onGetFlags() const { + const char* onGetName() const override { return "bmp"; } + const char* onGetExtensions() const override { return "bmp"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | diff --git a/src/app/file/fli_format.cpp b/src/app/file/fli_format.cpp index 3631b024b..9a76ddfee 100644 --- a/src/app/file/fli_format.cpp +++ b/src/app/file/fli_format.cpp @@ -26,9 +26,9 @@ namespace app { using namespace base; class FliFormat : public FileFormat { - const char* onGetName() const { return "flc"; } - const char* onGetExtensions() const { return "flc,fli"; } - int onGetFlags() const { + const char* onGetName() const override { return "flc"; } + const char* onGetExtensions() const override{ return "flc,fli"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | diff --git a/src/app/file/gif_format.cpp b/src/app/file/gif_format.cpp index ca2e8cbab..c1e742c75 100644 --- a/src/app/file/gif_format.cpp +++ b/src/app/file/gif_format.cpp @@ -62,9 +62,9 @@ enum class DisposalMethod { class GifFormat : public FileFormat { - const char* onGetName() const { return "gif"; } - const char* onGetExtensions() const { return "gif"; } - int onGetFlags() const { + const char* onGetName() const override { return "gif"; } + const char* onGetExtensions() const override { return "gif"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | @@ -78,7 +78,7 @@ class GifFormat : public FileFormat { FILE_SUPPORT_GET_FORMAT_OPTIONS; } - bool onLoad(FileOp* fop); + bool onLoad(FileOp* fop) override; #ifdef ENABLE_SAVE bool onSave(FileOp* fop) override; #endif diff --git a/src/app/file/ico_format.cpp b/src/app/file/ico_format.cpp index 320233a81..6436dc886 100644 --- a/src/app/file/ico_format.cpp +++ b/src/app/file/ico_format.cpp @@ -25,9 +25,9 @@ namespace app { using namespace base; class IcoFormat : public FileFormat { - const char* onGetName() const { return "ico"; } - const char* onGetExtensions() const { return "ico"; } - int onGetFlags() const { + const char* onGetName() const override { return "ico"; } + const char* onGetExtensions() const override { return "ico"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | diff --git a/src/app/file/jpeg_format.cpp b/src/app/file/jpeg_format.cpp index cb6622c11..8c865d079 100644 --- a/src/app/file/jpeg_format.cpp +++ b/src/app/file/jpeg_format.cpp @@ -41,9 +41,9 @@ class JpegFormat : public FileFormat { float quality; // 1.0 maximum quality. }; - const char* onGetName() const { return "jpeg"; } - const char* onGetExtensions() const { return "jpeg,jpg"; } - int onGetFlags() const { + const char* onGetName() const override { return "jpeg"; } + const char* onGetExtensions() const override { return "jpeg,jpg"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | diff --git a/src/app/file/pcx_format.cpp b/src/app/file/pcx_format.cpp index 0a5daa040..2c63a3100 100644 --- a/src/app/file/pcx_format.cpp +++ b/src/app/file/pcx_format.cpp @@ -23,9 +23,9 @@ namespace app { using namespace base; class PcxFormat : public FileFormat { - const char* onGetName() const { return "pcx"; } - const char* onGetExtensions() const { return "pcx"; } - int onGetFlags() const { + const char* onGetName() const override { return "pcx"; } + const char* onGetExtensions() const override { return "pcx"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | diff --git a/src/app/file/png_format.cpp b/src/app/file/png_format.cpp index 971e0cd18..8c7e6c45e 100644 --- a/src/app/file/png_format.cpp +++ b/src/app/file/png_format.cpp @@ -28,9 +28,9 @@ namespace app { using namespace base; class PngFormat : public FileFormat { - const char* onGetName() const { return "png"; } - const char* onGetExtensions() const { return "png"; } - int onGetFlags() const { + const char* onGetName() const override { return "png"; } + const char* onGetExtensions() const override { return "png"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | diff --git a/src/app/file/tga_format.cpp b/src/app/file/tga_format.cpp index 4db1dd97f..38e4c219b 100644 --- a/src/app/file/tga_format.cpp +++ b/src/app/file/tga_format.cpp @@ -24,9 +24,9 @@ namespace app { using namespace base; class TgaFormat : public FileFormat { - const char* onGetName() const { return "tga"; } - const char* onGetExtensions() const { return "tga"; } - int onGetFlags() const { + const char* onGetName() const override { return "tga"; } + const char* onGetExtensions() const override { return "tga"; } + int onGetFlags() const override { return FILE_SUPPORT_LOAD | FILE_SUPPORT_SAVE | diff --git a/src/app/tools/controllers.h b/src/app/tools/controllers.h index 1e983b911..aa2487a04 100644 --- a/src/app/tools/controllers.h +++ b/src/app/tools/controllers.h @@ -78,7 +78,7 @@ private: // Controls clicks for tools like pencil class FreehandController : public Controller { public: - bool isFreehand() { return true; } + bool isFreehand() override { return true; } void pressButton(Points& points, const Point& point) override { points.push_back(point); @@ -234,7 +234,7 @@ public: } } - void getPointsToInterwine(const Points& input, Points& output) { + void getPointsToInterwine(const Points& input, Points& output) override { ASSERT(input.size() >= 2); if (input.size() < 2) return; @@ -243,7 +243,7 @@ public: output.push_back(input[1]); } - void getStatusBarText(const Points& points, std::string& text) { + void getStatusBarText(const Points& points, std::string& text) override { ASSERT(points.size() >= 2); if (points.size() < 2) return; @@ -339,8 +339,8 @@ public: class OnePointController : public Controller { public: // Do not apply grid to "one point tools" (e.g. magic wand, flood fill, etc.) - bool canSnapToGrid() { return false; } - bool isOnePoint() { return true; } + bool canSnapToGrid() override { return false; } + bool isOnePoint() override { return true; } void pressButton(Points& points, const Point& point) override { if (points.size() == 0) diff --git a/src/app/tools/inks.h b/src/app/tools/inks.h index c0de6d35c..95aa4f4f4 100644 --- a/src/app/tools/inks.h +++ b/src/app/tools/inks.h @@ -34,10 +34,9 @@ public: Ink* clone() override { return new PaintInk(*this); } - bool isPaint() const { return true; } + bool isPaint() const override { return true; } - void prepareInk(ToolLoop* loop) - { + void prepareInk(ToolLoop* loop) override { switch (m_type) { case Simple: @@ -101,8 +100,7 @@ public: } } - void inkHline(int x1, int y, int x2, ToolLoop* loop) - { + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { ASSERT(m_proc); (*m_proc)(x1, y, x2, loop); } @@ -119,15 +117,13 @@ public: Ink* clone() override { return new ShadingInk(*this); } - bool isPaint() const { return true; } + bool isPaint() const override { return true; } - void prepareInk(ToolLoop* loop) - { + void prepareInk(ToolLoop* loop) override { m_proc = ink_processing[INK_SHADING][MID(0, loop->sprite()->pixelFormat(), 2)]; } - void inkHline(int x1, int y, int x2, ToolLoop* loop) - { + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { (*m_proc)(x1, y, x2, loop); } @@ -138,15 +134,13 @@ class ScrollInk : public Ink { public: Ink* clone() override { return new ScrollInk(*this); } - bool isScrollMovement() const { return true; } + bool isScrollMovement() const override { return true; } - void prepareInk(ToolLoop* loop) - { + void prepareInk(ToolLoop* loop) override { // Do nothing } - void inkHline(int x1, int y, int x2, ToolLoop* loop) - { + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { // Do nothing } @@ -157,9 +151,9 @@ class ZoomInk : public Ink { public: Ink* clone() override { return new ZoomInk(*this); } - bool isZoom() const { return true; } - void prepareInk(ToolLoop* loop) { } - void inkHline(int x1, int y, int x2, ToolLoop* loop) { } + bool isZoom() const override { return true; } + void prepareInk(ToolLoop* loop) override { } + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { } }; @@ -167,9 +161,9 @@ class MoveInk : public Ink { public: Ink* clone() override { return new MoveInk(*this); } - bool isCelMovement() const { return true; } - void prepareInk(ToolLoop* loop) { } - void inkHline(int x1, int y, int x2, ToolLoop* loop) { } + bool isCelMovement() const override { return true; } + void prepareInk(ToolLoop* loop) override { } + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { } }; @@ -177,9 +171,9 @@ class SliceInk : public Ink { public: Ink* clone() override { return new SliceInk(*this); } - bool isSlice() const { return true; } - void prepareInk(ToolLoop* loop) { } - void inkHline(int x1, int y, int x2, ToolLoop* loop) { + bool isSlice() const override { return true; } + void prepareInk(ToolLoop* loop) override { } + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { // TODO show the selection-preview with a XOR color or something like that draw_hline(loop->getDstImage(), x1, y, x2, loop->getPrimaryColor()); } @@ -199,12 +193,11 @@ public: Ink* clone() override { return new EraserInk(*this); } - bool isPaint() const { return true; } - bool isEffect() const { return true; } - bool isEraser() const { return true; } + bool isPaint() const override { return true; } + bool isEffect() const override { return true; } + bool isEraser() const override { return true; } - void prepareInk(ToolLoop* loop) - { + void prepareInk(ToolLoop* loop) override { switch (m_type) { case Eraser: { @@ -251,8 +244,7 @@ public: } } - void inkHline(int x1, int y, int x2, ToolLoop* loop) - { + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { (*m_proc)(x1, y, x2, loop); } }; @@ -264,21 +256,19 @@ class BlurInk : public Ink { public: Ink* clone() override { return new BlurInk(*this); } - bool isPaint() const { return true; } - bool isEffect() const { return true; } - bool needsSpecialSourceArea() const { return true; } + bool isPaint() const override { return true; } + bool isEffect() const override { return true; } + bool needsSpecialSourceArea() const override { return true; } - void prepareInk(ToolLoop* loop) - { + void prepareInk(ToolLoop* loop) override { m_proc = ink_processing[INK_BLUR][MID(0, loop->sprite()->pixelFormat(), 2)]; } - void inkHline(int x1, int y, int x2, ToolLoop* loop) - { + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { (*m_proc)(x1, y, x2, loop); } - void createSpecialSourceArea(const gfx::Region& dirtyArea, gfx::Region& sourceArea) const { + void createSpecialSourceArea(const gfx::Region& dirtyArea, gfx::Region& sourceArea) const override { // We need one pixel more for each side, to use a 3x3 convolution matrix. for (const auto& rc : dirtyArea) { sourceArea.createUnion(sourceArea, @@ -294,21 +284,19 @@ class JumbleInk : public Ink { public: Ink* clone() override { return new JumbleInk(*this); } - bool isPaint() const { return true; } - bool isEffect() const { return true; } - bool needsSpecialSourceArea() const { return true; } + bool isPaint() const override { return true; } + bool isEffect() const override { return true; } + bool needsSpecialSourceArea() const override { return true; } - void prepareInk(ToolLoop* loop) - { + void prepareInk(ToolLoop* loop) override { m_proc = ink_processing[INK_JUMBLE][MID(0, loop->sprite()->pixelFormat(), 2)]; } - void inkHline(int x1, int y, int x2, ToolLoop* loop) - { + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { (*m_proc)(x1, y, x2, loop); } - void createSpecialSourceArea(const gfx::Region& dirtyArea, gfx::Region& sourceArea) const { + void createSpecialSourceArea(const gfx::Region& dirtyArea, gfx::Region& sourceArea) const override { // We need one pixel more for each side. for (const auto& rc : dirtyArea) { sourceArea.createUnion(sourceArea, @@ -329,10 +317,9 @@ public: Ink* clone() override { return new SelectionInk(*this); } - bool isSelection() const { return true; } + bool isSelection() const override { return true; } - void inkHline(int x1, int y, int x2, ToolLoop* loop) - { + void inkHline(int x1, int y, int x2, ToolLoop* loop) override { if (m_modify_selection) { Point offset = loop->getOffset(); @@ -355,8 +342,7 @@ public: } } - void setFinalStep(ToolLoop* loop, bool state) - { + void setFinalStep(ToolLoop* loop, bool state) override { m_modify_selection = state; if (state) { diff --git a/src/app/ui/context_bar.cpp b/src/app/ui/context_bar.cpp index eee24b7de..15a2b5c7a 100644 --- a/src/app/ui/context_bar.cpp +++ b/src/app/ui/context_bar.cpp @@ -490,7 +490,7 @@ private: getParent()->layout(); } - bool onProcessMessage(ui::Message* msg) { + bool onProcessMessage(ui::Message* msg) override { if (msg->type() == kOpenMessage) { ColorBar::instance()->ChangeSelection.connect( Bind(&InkShadesField::onChangeColorBarSelection, this)); diff --git a/src/app/ui/data_recovery_view.cpp b/src/app/ui/data_recovery_view.cpp index 88b425c41..0adf89d87 100644 --- a/src/app/ui/data_recovery_view.cpp +++ b/src/app/ui/data_recovery_view.cpp @@ -58,7 +58,7 @@ public: Signal0 Regenerate; protected: - void onPreferredSize(PreferredSizeEvent& ev) { + void onPreferredSize(PreferredSizeEvent& ev) override { gfx::Size sz = m_deleteButton.getPreferredSize(); sz.h += 4*guiscale(); ev.setPreferredSize(sz); diff --git a/src/app/ui/document_view.cpp b/src/app/ui/document_view.cpp index 75c310703..6d767df1c 100644 --- a/src/app/ui/document_view.cpp +++ b/src/app/ui/document_view.cpp @@ -96,7 +96,7 @@ public: ->getCurrentQuicktool(currentTool); } - KeyAction getPressedKeyAction(KeyContext context) { + KeyAction getPressedKeyAction(KeyContext context) override { return KeyboardShortcuts::instance()->getCurrentActionModifiers(context); } diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp index 7943d211a..b8a52368e 100644 --- a/src/app/ui/editor/editor.cpp +++ b/src/app/ui/editor/editor.cpp @@ -103,7 +103,7 @@ public: , m_g(g) { } - Editor* getEditor() { + Editor* getEditor() override { return m_editor; } diff --git a/src/app/ui/editor/editor.h b/src/app/ui/editor/editor.h index 9cebc924f..ee8caede9 100644 --- a/src/app/ui/editor/editor.h +++ b/src/app/ui/editor/editor.h @@ -220,7 +220,7 @@ namespace app { void onCurrentToolChange(); void onFgColorChange(); void onContextBarBrushChange(); - void onExposeSpritePixels(doc::DocumentEvent& ev); + void onExposeSpritePixels(doc::DocumentEvent& ev) override; private: void setStateInternal(const EditorStatePtr& newState);