Add missing OVERRIDE modifier to Command::clone() overrides

It fixes some invalid clone() overrides without const modifier.
This commit is contained in:
David Capello 2014-03-29 17:08:40 -03:00
parent b16bf981d0
commit 44d3e228fd
70 changed files with 87 additions and 84 deletions

View File

@ -32,7 +32,7 @@ using namespace ui;
class AboutCommand : public Command { class AboutCommand : public Command {
public: public:
AboutCommand(); AboutCommand();
Command* clone() const { return new AboutCommand(*this); } Command* clone() const OVERRIDE { return new AboutCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -38,7 +38,7 @@ using namespace ui;
class AdvancedModeCommand : public Command { class AdvancedModeCommand : public Command {
public: public:
AdvancedModeCommand(); AdvancedModeCommand();
Command* clone() const { return new AdvancedModeCommand(*this); } Command* clone() const OVERRIDE { return new AdvancedModeCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -37,7 +37,7 @@ namespace app {
class BackgroundFromLayerCommand : public Command { class BackgroundFromLayerCommand : public Command {
public: public:
BackgroundFromLayerCommand(); BackgroundFromLayerCommand();
Command* clone() const { return new BackgroundFromLayerCommand(*this); } Command* clone() const OVERRIDE { return new BackgroundFromLayerCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -24,13 +24,14 @@
#include "app/commands/commands.h" #include "app/commands/commands.h"
#include "app/context.h" #include "app/context.h"
#include "base/compiler_specific.h"
namespace app { namespace app {
class CancelCommand : public Command { class CancelCommand : public Command {
public: public:
CancelCommand(); CancelCommand();
Command* clone() { return new CancelCommand(*this); } Command* clone() const OVERRIDE { return new CancelCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -149,7 +149,7 @@ class CanvasSizeCommand : public Command {
public: public:
CanvasSizeCommand(); CanvasSizeCommand();
Command* clone() const { return new CanvasSizeCommand(*this); } Command* clone() const OVERRIDE { return new CanvasSizeCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -45,7 +45,7 @@ using namespace ui;
class CelPropertiesCommand : public Command { class CelPropertiesCommand : public Command {
public: public:
CelPropertiesCommand(); CelPropertiesCommand();
Command* clone() const { return new CelPropertiesCommand(*this); } Command* clone() const OVERRIDE { return new CelPropertiesCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -41,7 +41,7 @@ class ChangePixelFormatCommand : public Command {
DitheringMethod m_dithering; DitheringMethod m_dithering;
public: public:
ChangePixelFormatCommand(); ChangePixelFormatCommand();
Command* clone() const { return new ChangePixelFormatCommand(*this); } Command* clone() const OVERRIDE { return new ChangePixelFormatCommand(*this); }
protected: protected:
void onLoadParams(Params* params); void onLoadParams(Params* params);

View File

@ -40,7 +40,7 @@ namespace app {
class ClearCommand : public Command { class ClearCommand : public Command {
public: public:
ClearCommand(); ClearCommand();
Command* clone() const { return new ClearCommand(*this); } Command* clone() const OVERRIDE { return new ClearCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -52,7 +52,7 @@ public:
{ {
} }
Command* clone() const { return new CloseFileCommand(*this); } Command* clone() const OVERRIDE { return new CloseFileCommand(*this); }
protected: protected:
@ -99,7 +99,7 @@ public:
{ {
} }
Command* clone() const { return new CloseAllFilesCommand(*this); } Command* clone() const OVERRIDE { return new CloseAllFilesCommand(*this); }
protected: protected:

View File

@ -60,7 +60,7 @@ static void on_exit_delete_this_widget()
class ConfigureTools : public Command { class ConfigureTools : public Command {
public: public:
ConfigureTools(); ConfigureTools();
Command* clone() const { return new ConfigureTools(*this); } Command* clone() const OVERRIDE { return new ConfigureTools(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -34,7 +34,7 @@ namespace app {
class CopyCommand : public Command { class CopyCommand : public Command {
public: public:
CopyCommand(); CopyCommand();
Command* clone() const { return new CopyCommand(*this); } Command* clone() const OVERRIDE { return new CopyCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -33,7 +33,7 @@ namespace app {
class CopyCelCommand : public Command { class CopyCelCommand : public Command {
public: public:
CopyCelCommand(); CopyCelCommand();
Command* clone() const { return new CopyCelCommand(*this); } Command* clone() const OVERRIDE { return new CopyCelCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -40,7 +40,7 @@ namespace app {
class CropSpriteCommand : public Command { class CropSpriteCommand : public Command {
public: public:
CropSpriteCommand(); CropSpriteCommand();
Command* clone() const { return new CropSpriteCommand(*this); } Command* clone() const OVERRIDE { return new CropSpriteCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);
@ -81,7 +81,7 @@ void CropSpriteCommand::onExecute(Context* context)
class AutocropSpriteCommand : public Command { class AutocropSpriteCommand : public Command {
public: public:
AutocropSpriteCommand(); AutocropSpriteCommand();
Command* clone() const { return new AutocropSpriteCommand(*this); } Command* clone() const OVERRIDE { return new AutocropSpriteCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -34,7 +34,7 @@ namespace app {
class CutCommand : public Command { class CutCommand : public Command {
public: public:
CutCommand(); CutCommand();
Command* clone() const { return new CutCommand(*this); } Command* clone() const OVERRIDE { return new CutCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -33,7 +33,7 @@ namespace app {
class DeselectMaskCommand : public Command { class DeselectMaskCommand : public Command {
public: public:
DeselectMaskCommand(); DeselectMaskCommand();
Command* clone() const { return new DeselectMaskCommand(*this); } Command* clone() const OVERRIDE { return new DeselectMaskCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -41,7 +41,7 @@ namespace app {
class DuplicateLayerCommand : public Command { class DuplicateLayerCommand : public Command {
public: public:
DuplicateLayerCommand(); DuplicateLayerCommand();
Command* clone() const { return new DuplicateLayerCommand(*this); } Command* clone() const OVERRIDE { return new DuplicateLayerCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -41,7 +41,7 @@ using namespace ui;
class DuplicateSpriteCommand : public Command { class DuplicateSpriteCommand : public Command {
public: public:
DuplicateSpriteCommand(); DuplicateSpriteCommand();
Command* clone() { return new DuplicateSpriteCommand(*this); } Command* clone() const OVERRIDE { return new DuplicateSpriteCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -32,7 +32,7 @@ namespace app {
class ExitCommand : public Command { class ExitCommand : public Command {
public: public:
ExitCommand(); ExitCommand();
Command* clone() { return new ExitCommand(*this); } Command* clone() const OVERRIDE { return new ExitCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -50,7 +50,7 @@ class EyedropperCommand : public Command {
public: public:
EyedropperCommand(); EyedropperCommand();
Command* clone() const { return new EyedropperCommand(*this); } Command* clone() const OVERRIDE { return new EyedropperCommand(*this); }
protected: protected:
void onLoadParams(Params* params); void onLoadParams(Params* params);

View File

@ -35,7 +35,7 @@ namespace app {
class FlattenLayersCommand : public Command { class FlattenLayersCommand : public Command {
public: public:
FlattenLayersCommand(); FlattenLayersCommand();
Command* clone() { return new FlattenLayersCommand(*this); } Command* clone() const OVERRIDE { return new FlattenLayersCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -20,6 +20,7 @@
#define APP_COMMANDS_CMD_FLIP_H_INCLUDED #define APP_COMMANDS_CMD_FLIP_H_INCLUDED
#include "app/commands/command.h" #include "app/commands/command.h"
#include "base/compiler_specific.h"
#include "raster/algorithm/flip_type.h" #include "raster/algorithm/flip_type.h"
namespace app { namespace app {
@ -27,7 +28,7 @@ namespace app {
class FlipCommand : public Command { class FlipCommand : public Command {
public: public:
FlipCommand(); FlipCommand();
Command* clone() const { return new FlipCommand(*this); } Command* clone() const OVERRIDE { return new FlipCommand(*this); }
raster::algorithm::FlipType getFlipType() const { return m_flipType; } raster::algorithm::FlipType getFlipType() const { return m_flipType; }

View File

@ -41,7 +41,7 @@ using namespace ui;
class FramePropertiesCommand : public Command { class FramePropertiesCommand : public Command {
public: public:
FramePropertiesCommand(); FramePropertiesCommand();
Command* clone() { return new FramePropertiesCommand(*this); } Command* clone() const OVERRIDE { return new FramePropertiesCommand(*this); }
protected: protected:
void onLoadParams(Params* params); void onLoadParams(Params* params);

View File

@ -62,7 +62,7 @@ public:
GotoFirstFrameCommand() GotoFirstFrameCommand()
: GotoCommand("GotoFirstFrame", : GotoCommand("GotoFirstFrame",
"Goto First Frame") { } "Goto First Frame") { }
Command* clone() { return new GotoFirstFrameCommand(*this); } Command* clone() const OVERRIDE { return new GotoFirstFrameCommand(*this); }
protected: protected:
FrameNumber onGetFrame(Editor* editor) OVERRIDE { FrameNumber onGetFrame(Editor* editor) OVERRIDE {
@ -79,7 +79,7 @@ public:
GotoPreviousFrameCommand() GotoPreviousFrameCommand()
: GotoCommand("GotoPreviousFrame", : GotoCommand("GotoPreviousFrame",
"Goto Previous Frame") { } "Goto Previous Frame") { }
Command* clone() { return new GotoPreviousFrameCommand(*this); } Command* clone() const OVERRIDE { return new GotoPreviousFrameCommand(*this); }
protected: protected:
FrameNumber onGetFrame(Editor* editor) OVERRIDE { FrameNumber onGetFrame(Editor* editor) OVERRIDE {
@ -100,7 +100,7 @@ class GotoNextFrameCommand : public GotoCommand
public: public:
GotoNextFrameCommand() : GotoCommand("GotoNextFrame", GotoNextFrameCommand() : GotoCommand("GotoNextFrame",
"Goto Next Frame") { } "Goto Next Frame") { }
Command* clone() { return new GotoNextFrameCommand(*this); } Command* clone() const OVERRIDE { return new GotoNextFrameCommand(*this); }
protected: protected:
FrameNumber onGetFrame(Editor* editor) OVERRIDE { FrameNumber onGetFrame(Editor* editor) OVERRIDE {
@ -119,7 +119,7 @@ class GotoLastFrameCommand : public GotoCommand
public: public:
GotoLastFrameCommand() : GotoCommand("GotoLastFrame", GotoLastFrameCommand() : GotoCommand("GotoLastFrame",
"Goto Last Frame") { } "Goto Last Frame") { }
Command* clone() { return new GotoLastFrameCommand(*this); } Command* clone() const OVERRIDE { return new GotoLastFrameCommand(*this); }
protected: protected:
FrameNumber onGetFrame(Editor* editor) OVERRIDE { FrameNumber onGetFrame(Editor* editor) OVERRIDE {
@ -136,7 +136,7 @@ public:
GotoFrameCommand() : GotoCommand("GotoFrame", GotoFrameCommand() : GotoCommand("GotoFrame",
"Goto Frame") "Goto Frame")
, m_frame(0) { } , m_frame(0) { }
Command* clone() { return new GotoFrameCommand(*this); } Command* clone() const OVERRIDE { return new GotoFrameCommand(*this); }
protected: protected:
void onLoadParams(Params* params) OVERRIDE void onLoadParams(Params* params) OVERRIDE

View File

@ -50,7 +50,7 @@ protected:
class GotoPreviousLayerCommand : public GotoCommand { class GotoPreviousLayerCommand : public GotoCommand {
public: public:
GotoPreviousLayerCommand(); GotoPreviousLayerCommand();
Command* clone() { return new GotoPreviousLayerCommand(*this); } Command* clone() const OVERRIDE { return new GotoPreviousLayerCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);
@ -92,7 +92,7 @@ void GotoPreviousLayerCommand::onExecute(Context* context)
class GotoNextLayerCommand : public GotoCommand { class GotoNextLayerCommand : public GotoCommand {
public: public:
GotoNextLayerCommand(); GotoNextLayerCommand();
Command* clone() { return new GotoNextLayerCommand(*this); } Command* clone() const OVERRIDE { return new GotoNextLayerCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -31,7 +31,7 @@ namespace app {
class GotoNextTabCommand : public Command { class GotoNextTabCommand : public Command {
public: public:
GotoNextTabCommand(); GotoNextTabCommand();
Command* clone() { return new GotoNextTabCommand(*this); } Command* clone() const OVERRIDE { return new GotoNextTabCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);
@ -52,7 +52,7 @@ void GotoNextTabCommand::onExecute(Context* context)
class GotoPreviousTabCommand : public Command { class GotoPreviousTabCommand : public Command {
public: public:
GotoPreviousTabCommand(); GotoPreviousTabCommand();
Command* clone() { return new GotoPreviousTabCommand(*this); } Command* clone() const OVERRIDE { return new GotoPreviousTabCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -48,7 +48,7 @@ public:
{ {
} }
Command* clone() const { return new ShowGridCommand(*this); } Command* clone() const OVERRIDE { return new ShowGridCommand(*this); }
protected: protected:
bool onChecked(Context* context) bool onChecked(Context* context)
@ -75,7 +75,7 @@ public:
{ {
} }
Command* clone() const { return new SnapToGridCommand(*this); } Command* clone() const OVERRIDE { return new SnapToGridCommand(*this); }
protected: protected:
bool onChecked(Context* context) bool onChecked(Context* context)
@ -102,7 +102,7 @@ protected:
class GridSettingsCommand : public Command { class GridSettingsCommand : public Command {
public: public:
GridSettingsCommand(); GridSettingsCommand();
Command* clone() const { return new GridSettingsCommand(*this); } Command* clone() const OVERRIDE { return new GridSettingsCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -348,7 +348,7 @@ private:
class ImportSpriteSheetCommand : public Command { class ImportSpriteSheetCommand : public Command {
public: public:
ImportSpriteSheetCommand(); ImportSpriteSheetCommand();
Command* clone() { return new ImportSpriteSheetCommand(*this); } Command* clone() const OVERRIDE { return new ImportSpriteSheetCommand(*this); }
protected: protected:
virtual void onExecute(Context* context) OVERRIDE; virtual void onExecute(Context* context) OVERRIDE;

View File

@ -37,7 +37,7 @@ namespace app {
class InvertMaskCommand : public Command { class InvertMaskCommand : public Command {
public: public:
InvertMaskCommand(); InvertMaskCommand();
Command* clone() { return new InvertMaskCommand(*this); } Command* clone() const OVERRIDE { return new InvertMaskCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -32,7 +32,7 @@ namespace app {
class LaunchCommand : public Command { class LaunchCommand : public Command {
public: public:
LaunchCommand(); LaunchCommand();
Command* clone() const { return new LaunchCommand(*this); } Command* clone() const OVERRIDE { return new LaunchCommand(*this); }
protected: protected:
void onLoadParams(Params* params) OVERRIDE; void onLoadParams(Params* params) OVERRIDE;

View File

@ -34,7 +34,7 @@ namespace app {
class LayerFromBackgroundCommand : public Command { class LayerFromBackgroundCommand : public Command {
public: public:
LayerFromBackgroundCommand(); LayerFromBackgroundCommand();
Command* clone() { return new LayerFromBackgroundCommand(*this); } Command* clone() const OVERRIDE { return new LayerFromBackgroundCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -37,7 +37,7 @@ using namespace ui;
class LayerPropertiesCommand : public Command { class LayerPropertiesCommand : public Command {
public: public:
LayerPropertiesCommand(); LayerPropertiesCommand();
Command* clone() { return new LayerPropertiesCommand(*this); } Command* clone() const OVERRIDE { return new LayerPropertiesCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -39,7 +39,7 @@ class LoadMaskCommand : public Command {
public: public:
LoadMaskCommand(); LoadMaskCommand();
Command* clone() const { return new LoadMaskCommand(*this); } Command* clone() const OVERRIDE { return new LoadMaskCommand(*this); }
protected: protected:
void onLoadParams(Params* params); void onLoadParams(Params* params);

View File

@ -40,7 +40,7 @@ using namespace ui;
class LoadPaletteCommand : public Command { class LoadPaletteCommand : public Command {
public: public:
LoadPaletteCommand(); LoadPaletteCommand();
Command* clone() { return new LoadPaletteCommand(*this); } Command* clone() const OVERRIDE { return new LoadPaletteCommand(*this); }
protected: protected:
void onExecute(Context* context) OVERRIDE; void onExecute(Context* context) OVERRIDE;

View File

@ -33,7 +33,7 @@ namespace app {
class MaskAllCommand : public Command { class MaskAllCommand : public Command {
public: public:
MaskAllCommand(); MaskAllCommand();
Command* clone() { return new MaskAllCommand(*this); } Command* clone() const OVERRIDE { return new MaskAllCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -54,7 +54,7 @@ using namespace ui;
class MaskByColorCommand : public Command { class MaskByColorCommand : public Command {
public: public:
MaskByColorCommand(); MaskByColorCommand();
Command* clone() { return new MaskByColorCommand(*this); } Command* clone() const OVERRIDE { return new MaskByColorCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -46,7 +46,7 @@ namespace app {
class MergeDownLayerCommand : public Command { class MergeDownLayerCommand : public Command {
public: public:
MergeDownLayerCommand(); MergeDownLayerCommand();
Command* clone() { return new MergeDownLayerCommand(*this); } Command* clone() const OVERRIDE { return new MergeDownLayerCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -33,7 +33,7 @@ namespace app {
class MoveCelCommand : public Command { class MoveCelCommand : public Command {
public: public:
MoveCelCommand(); MoveCelCommand();
Command* clone() const { return new MoveCelCommand(*this); } Command* clone() const OVERRIDE { return new MoveCelCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -55,7 +55,7 @@ namespace app {
class NewFileCommand : public Command { class NewFileCommand : public Command {
public: public:
NewFileCommand(); NewFileCommand();
Command* clone() { return new NewFileCommand(*this); } Command* clone() const OVERRIDE { return new NewFileCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -43,7 +43,7 @@ namespace app {
class NewFrameCommand : public Command { class NewFrameCommand : public Command {
public: public:
NewFrameCommand(); NewFrameCommand();
Command* clone() { return new NewFrameCommand(*this); } Command* clone() const OVERRIDE { return new NewFrameCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -44,7 +44,7 @@ using namespace ui;
class NewLayerCommand : public Command { class NewLayerCommand : public Command {
public: public:
NewLayerCommand(); NewLayerCommand();
Command* clone() { return new NewLayerCommand(*this); } Command* clone() const OVERRIDE { return new NewLayerCommand(*this); }
protected: protected:
void onLoadParams(Params* params); void onLoadParams(Params* params);

View File

@ -41,7 +41,7 @@ using namespace ui;
class NewLayerSetCommand : public Command { class NewLayerSetCommand : public Command {
public: public:
NewLayerSetCommand(); NewLayerSetCommand();
Command* clone() { return new NewLayerSetCommand(*this); } Command* clone() const OVERRIDE { return new NewLayerSetCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -48,7 +48,7 @@ namespace app {
class OpenFileCommand : public Command { class OpenFileCommand : public Command {
public: public:
OpenFileCommand(); OpenFileCommand();
Command* clone() { return new OpenFileCommand(*this); } Command* clone() const OVERRIDE { return new OpenFileCommand(*this); }
protected: protected:
void onLoadParams(Params* params); void onLoadParams(Params* params);

View File

@ -32,7 +32,7 @@ namespace app {
class OpenInFolderCommand : public Command { class OpenInFolderCommand : public Command {
public: public:
OpenInFolderCommand(); OpenInFolderCommand();
Command* clone() { return new OpenInFolderCommand(*this); } Command* clone() const OVERRIDE { return new OpenInFolderCommand(*this); }
protected: protected:
bool onEnabled(Context* context) OVERRIDE; bool onEnabled(Context* context) OVERRIDE;

View File

@ -32,7 +32,7 @@ namespace app {
class OpenWithAppCommand : public Command { class OpenWithAppCommand : public Command {
public: public:
OpenWithAppCommand(); OpenWithAppCommand();
Command* clone() { return new OpenWithAppCommand(*this); } Command* clone() const OVERRIDE { return new OpenWithAppCommand(*this); }
protected: protected:
bool onEnabled(Context* context) OVERRIDE; bool onEnabled(Context* context) OVERRIDE;

View File

@ -44,7 +44,7 @@ using namespace ui;
class OptionsCommand : public Command { class OptionsCommand : public Command {
public: public:
OptionsCommand(); OptionsCommand();
Command* clone() { return new OptionsCommand(*this); } Command* clone() const OVERRIDE { return new OptionsCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -146,7 +146,7 @@ static PaletteEntryEditor* g_window = NULL;
class PaletteEditorCommand : public Command { class PaletteEditorCommand : public Command {
public: public:
PaletteEditorCommand(); PaletteEditorCommand();
Command* clone() { return new PaletteEditorCommand(*this); } Command* clone() const OVERRIDE { return new PaletteEditorCommand(*this); }
protected: protected:
void onLoadParams(Params* params) OVERRIDE; void onLoadParams(Params* params) OVERRIDE;

View File

@ -23,6 +23,7 @@
#include "app/commands/command.h" #include "app/commands/command.h"
#include "app/context.h" #include "app/context.h"
#include "app/util/clipboard.h" #include "app/util/clipboard.h"
#include "base/compiler_specific.h"
#include "raster/layer.h" #include "raster/layer.h"
#include "raster/sprite.h" #include "raster/sprite.h"
@ -31,7 +32,7 @@ namespace app {
class PasteCommand : public Command { class PasteCommand : public Command {
public: public:
PasteCommand(); PasteCommand();
Command* clone() { return new PasteCommand(*this); } Command* clone() const OVERRIDE { return new PasteCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -43,7 +43,7 @@ namespace app {
class PlayAnimationCommand : public Command { class PlayAnimationCommand : public Command {
public: public:
PlayAnimationCommand(); PlayAnimationCommand();
Command* clone() { return new PlayAnimationCommand(*this); } Command* clone() const OVERRIDE { return new PlayAnimationCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -55,7 +55,7 @@ using namespace filters;
class PreviewCommand : public Command { class PreviewCommand : public Command {
public: public:
PreviewCommand(); PreviewCommand();
Command* clone() { return new PreviewCommand(*this); } Command* clone() const OVERRIDE { return new PreviewCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -40,7 +40,7 @@ namespace app {
class RefreshCommand : public Command { class RefreshCommand : public Command {
public: public:
RefreshCommand(); RefreshCommand();
Command* clone() { return new RefreshCommand(*this); } Command* clone() const OVERRIDE { return new RefreshCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -37,7 +37,7 @@ namespace app {
class RemoveCelCommand : public Command { class RemoveCelCommand : public Command {
public: public:
RemoveCelCommand(); RemoveCelCommand();
Command* clone() { return new RemoveCelCommand(*this); } Command* clone() const OVERRIDE { return new RemoveCelCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -36,7 +36,7 @@ namespace app {
class RemoveFrameCommand : public Command { class RemoveFrameCommand : public Command {
public: public:
RemoveFrameCommand(); RemoveFrameCommand();
Command* clone() { return new RemoveFrameCommand(*this); } Command* clone() const OVERRIDE { return new RemoveFrameCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -38,7 +38,7 @@ namespace app {
class RemoveLayerCommand : public Command { class RemoveLayerCommand : public Command {
public: public:
RemoveLayerCommand(); RemoveLayerCommand();
Command* clone() { return new RemoveLayerCommand(*this); } Command* clone() const OVERRIDE { return new RemoveLayerCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -33,7 +33,7 @@ namespace app {
class RepeatLastExportCommand : public Command { class RepeatLastExportCommand : public Command {
public: public:
RepeatLastExportCommand(); RepeatLastExportCommand();
Command* clone() { return new RepeatLastExportCommand(*this); } Command* clone() const OVERRIDE { return new RepeatLastExportCommand(*this); }
protected: protected:
virtual bool onEnabled(Context* context) OVERRIDE; virtual bool onEnabled(Context* context) OVERRIDE;

View File

@ -33,7 +33,7 @@ namespace app {
class ReselectMaskCommand : public Command { class ReselectMaskCommand : public Command {
public: public:
ReselectMaskCommand(); ReselectMaskCommand();
Command* clone() { return new ReselectMaskCommand(*this); } Command* clone() const OVERRIDE { return new ReselectMaskCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -45,7 +45,7 @@ class RotateCanvasCommand : public Command {
public: public:
RotateCanvasCommand(); RotateCanvasCommand();
Command* clone() { return new RotateCanvasCommand(*this); } Command* clone() const OVERRIDE { return new RotateCanvasCommand(*this); }
protected: protected:
void onLoadParams(Params* params); void onLoadParams(Params* params);

View File

@ -207,7 +207,7 @@ protected:
class SaveFileCommand : public SaveFileBaseCommand { class SaveFileCommand : public SaveFileBaseCommand {
public: public:
SaveFileCommand(); SaveFileCommand();
Command* clone() { return new SaveFileCommand(*this); } Command* clone() const OVERRIDE { return new SaveFileCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);
@ -248,7 +248,7 @@ void SaveFileCommand::onExecute(Context* context)
class SaveFileAsCommand : public SaveFileBaseCommand { class SaveFileAsCommand : public SaveFileBaseCommand {
public: public:
SaveFileAsCommand(); SaveFileAsCommand();
Command* clone() { return new SaveFileAsCommand(*this); } Command* clone() const OVERRIDE { return new SaveFileAsCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);
@ -268,7 +268,7 @@ void SaveFileAsCommand::onExecute(Context* context)
class SaveFileCopyAsCommand : public SaveFileBaseCommand { class SaveFileCopyAsCommand : public SaveFileBaseCommand {
public: public:
SaveFileCopyAsCommand(); SaveFileCopyAsCommand();
Command* clone() { return new SaveFileCopyAsCommand(*this); } Command* clone() const OVERRIDE { return new SaveFileCopyAsCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -35,7 +35,7 @@ namespace app {
class SaveMaskCommand : public Command { class SaveMaskCommand : public Command {
public: public:
SaveMaskCommand(); SaveMaskCommand();
Command* clone() { return new SaveMaskCommand(*this); } Command* clone() const OVERRIDE { return new SaveMaskCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -36,7 +36,7 @@ using namespace ui;
class SavePaletteCommand : public Command { class SavePaletteCommand : public Command {
public: public:
SavePaletteCommand(); SavePaletteCommand();
Command* clone() { return new SavePaletteCommand(*this); } Command* clone() const OVERRIDE { return new SavePaletteCommand(*this); }
protected: protected:
void onExecute(Context* context) OVERRIDE; void onExecute(Context* context) OVERRIDE;

View File

@ -46,7 +46,7 @@ public:
}; };
ScrollCommand(); ScrollCommand();
Command* clone() { return new ScrollCommand(*this); } Command* clone() const OVERRIDE { return new ScrollCommand(*this); }
protected: protected:
void onLoadParams(Params* params); void onLoadParams(Params* params);

View File

@ -31,7 +31,7 @@ namespace app {
class MakeUniqueEditorCommand : public Command { class MakeUniqueEditorCommand : public Command {
public: public:
MakeUniqueEditorCommand(); MakeUniqueEditorCommand();
Command* clone() { return new MakeUniqueEditorCommand(*this); } Command* clone() const OVERRIDE { return new MakeUniqueEditorCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);
@ -54,7 +54,7 @@ void MakeUniqueEditorCommand::onExecute(Context* context)
class SplitEditorHorizontallyCommand : public Command { class SplitEditorHorizontallyCommand : public Command {
public: public:
SplitEditorHorizontallyCommand(); SplitEditorHorizontallyCommand();
Command* clone() { return new SplitEditorHorizontallyCommand(*this); } Command* clone() const OVERRIDE { return new SplitEditorHorizontallyCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);
@ -77,7 +77,7 @@ void SplitEditorHorizontallyCommand::onExecute(Context* context)
class SplitEditorVerticallyCommand : public Command { class SplitEditorVerticallyCommand : public Command {
public: public:
SplitEditorVerticallyCommand(); SplitEditorVerticallyCommand();
Command* clone() { return new SplitEditorVerticallyCommand(*this); } Command* clone() const OVERRIDE { return new SplitEditorVerticallyCommand(*this); }
protected: protected:
void onExecute(Context* context); void onExecute(Context* context);

View File

@ -44,7 +44,7 @@ using namespace ui;
class SpritePropertiesCommand : public Command { class SpritePropertiesCommand : public Command {
public: public:
SpritePropertiesCommand(); SpritePropertiesCommand();
Command* clone() { return new SpritePropertiesCommand(*this); } Command* clone() const OVERRIDE { return new SpritePropertiesCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -162,7 +162,7 @@ protected:
class SpriteSizeCommand : public Command { class SpriteSizeCommand : public Command {
public: public:
SpriteSizeCommand(); SpriteSizeCommand();
Command* clone() { return new SpriteSizeCommand(*this); } Command* clone() const OVERRIDE { return new SpriteSizeCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -34,7 +34,7 @@ namespace app {
class TimelineCommand : public Command { class TimelineCommand : public Command {
public: public:
TimelineCommand(); TimelineCommand();
Command* clone() { return new TimelineCommand(*this); } Command* clone() const OVERRIDE { return new TimelineCommand(*this); }
protected: protected:
void onLoadParams(Params* params) OVERRIDE; void onLoadParams(Params* params) OVERRIDE;

View File

@ -40,7 +40,7 @@ public:
enum Type { Undo, Redo }; enum Type { Undo, Redo };
UndoCommand(Type type); UndoCommand(Type type);
Command* clone() { return new UndoCommand(*this); } Command* clone() const OVERRIDE { return new UndoCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -89,7 +89,7 @@ private:
class ColorCurveCommand : public Command { class ColorCurveCommand : public Command {
public: public:
ColorCurveCommand(); ColorCurveCommand();
Command* clone() const { return new ColorCurveCommand(*this); } Command* clone() const OVERRIDE { return new ColorCurveCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -156,7 +156,7 @@ private:
class ConvolutionMatrixCommand : public Command { class ConvolutionMatrixCommand : public Command {
public: public:
ConvolutionMatrixCommand(); ConvolutionMatrixCommand();
Command* clone() const { return new ConvolutionMatrixCommand(*this); } Command* clone() const OVERRIDE { return new ConvolutionMatrixCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -94,7 +94,7 @@ class DespeckleCommand : public Command
{ {
public: public:
DespeckleCommand(); DespeckleCommand();
Command* clone() const { return new DespeckleCommand(*this); } Command* clone() const OVERRIDE { return new DespeckleCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -60,7 +60,7 @@ private:
class InvertColorCommand : public Command { class InvertColorCommand : public Command {
public: public:
InvertColorCommand(); InvertColorCommand();
Command* clone() const { return new InvertColorCommand(*this); } Command* clone() const OVERRIDE { return new InvertColorCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);

View File

@ -121,7 +121,7 @@ private:
class ReplaceColorCommand : public Command { class ReplaceColorCommand : public Command {
public: public:
ReplaceColorCommand(); ReplaceColorCommand();
Command* clone() const { return new ReplaceColorCommand(*this); } Command* clone() const OVERRIDE { return new ReplaceColorCommand(*this); }
protected: protected:
bool onEnabled(Context* context); bool onEnabled(Context* context);