Skip to content

Commit

Permalink
Fixed override warnings in macOS build (GrandOrgue#1999)
Browse files Browse the repository at this point in the history
  • Loading branch information
willeke1234 authored Sep 6, 2024
1 parent f495bc8 commit 3d49075
Show file tree
Hide file tree
Showing 31 changed files with 130 additions and 124 deletions.
2 changes: 2 additions & 0 deletions src/grandorgue/GOApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,12 @@ bool GOApp::OnInit() {
return true;
}

#ifdef __WXMAC__
void GOApp::MacOpenFile(const wxString &filename) {
if (m_Frame)
m_Frame->SendLoadFile(filename);
}
#endif

int GOApp::OnRun() { return wxApp::OnRun(); }

Expand Down
14 changes: 8 additions & 6 deletions src/grandorgue/GOApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ class GOApp : public wxApp {
private:
bool m_Restart;

virtual void MacOpenFile(const wxString &fileName);
void OnInitCmdLine(wxCmdLineParser &parser);
bool OnCmdLineParsed(wxCmdLineParser &parser);
bool OnInit();
int OnRun();
int OnExit();
#ifdef __WXMAC__
virtual void MacOpenFile(const wxString &fileName) override;
#endif
void OnInitCmdLine(wxCmdLineParser &parser) override;
bool OnCmdLineParsed(wxCmdLineParser &parser) override;
bool OnInit() override;
int OnRun() override;
int OnExit() override;
virtual void CleanUp() override;

protected:
Expand Down
12 changes: 6 additions & 6 deletions src/grandorgue/GOAudioRecorder.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand Down Expand Up @@ -28,12 +28,12 @@ class GOAudioRecorder : public GOElementCreator, private GOTimerCallback {
bool m_DoRename;

static const struct ButtonDefinitionEntry m_element_types[];
const struct ButtonDefinitionEntry *GetButtonDefinitionList();
const struct ButtonDefinitionEntry *GetButtonDefinitionList() override;

void ButtonStateChanged(int id, bool newState) override;

void UpdateDisplay();
void HandleTimer();
void HandleTimer() override;

public:
GOAudioRecorder(GOOrganController *organController);
Expand All @@ -45,9 +45,9 @@ class GOAudioRecorder : public GOElementCreator, private GOTimerCallback {
bool IsRecording();
void StopRecording();

void Load(GOConfigReader &cfg);
GOEnclosure *GetEnclosure(const wxString &name, bool is_panel);
GOLabelControl *GetLabelControl(const wxString &name, bool is_panel);
void Load(GOConfigReader &cfg) override;
GOEnclosure *GetEnclosure(const wxString &name, bool is_panel) override;
GOLabelControl *GetLabelControl(const wxString &name, bool is_panel) override;
};

#endif
2 changes: 1 addition & 1 deletion src/grandorgue/GODocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class GODocument : public GODocumentBase,

GOMidiListener m_listener;

void OnMidiEvent(const GOMidiEvent &event);
void OnMidiEvent(const GOMidiEvent &event) override;

void SyncState();
void CloseOrgan();
Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/GOFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class GOFrame : public wxFrame,
void OnMenuOpen(wxMenuEvent &event);
void OnCloseWindow(wxCloseEvent &event);

void OnMidiEvent(const GOMidiEvent &event);
void OnMidiEvent(const GOMidiEvent &event) override;

void OnUpdateLoaded(wxUpdateUIEvent &event);
void OnSetTitle(wxCommandEvent &event);
Expand Down
18 changes: 9 additions & 9 deletions src/grandorgue/GOMetronome.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand Down Expand Up @@ -36,16 +36,16 @@ class GOMetronome : private GOTimerCallback,

static const struct GOElementCreator::ButtonDefinitionEntry m_element_types[];
const struct GOElementCreator::ButtonDefinitionEntry *
GetButtonDefinitionList();
GetButtonDefinitionList() override;

void HandleTimer();
void HandleTimer() override;

void ButtonStateChanged(int id, bool newState) override;

void AbortPlayback();
void PreparePlayback();
void AbortPlayback() override;
void PreparePlayback() override;

void Save(GOConfigWriter &cfg);
void Save(GOConfigWriter &cfg) override;

void StartTimer();
void StopTimer();
Expand All @@ -57,10 +57,10 @@ class GOMetronome : private GOTimerCallback,
GOMetronome(GOOrganController *organController);
virtual ~GOMetronome();

void Load(GOConfigReader &cfg);
void Load(GOConfigReader &cfg) override;

GOEnclosure *GetEnclosure(const wxString &name, bool is_panel);
GOLabelControl *GetLabelControl(const wxString &name, bool is_panel);
GOEnclosure *GetEnclosure(const wxString &name, bool is_panel) override;
GOLabelControl *GetLabelControl(const wxString &name, bool is_panel) override;
};

#endif
12 changes: 6 additions & 6 deletions src/grandorgue/combinations/GOSetter.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ class GOSetter : private GOSoundStateHandler,
void Crescendo(int pos, bool force = false);

static const struct ButtonDefinitionEntry m_element_types[];
const struct ButtonDefinitionEntry *GetButtonDefinitionList();
const struct ButtonDefinitionEntry *GetButtonDefinitionList() override;

void ButtonStateChanged(int id, bool newState) override;

void ControlChanged(GOControl *control) override;

void PreparePlayback();
void PreparePlayback() override;

/**
* Called after at least one combination is changed
Expand Down Expand Up @@ -153,10 +153,10 @@ class GOSetter : private GOSoundStateHandler,
*/
void ToYaml(YAML::Node &yamlNode) const override;
void FromYaml(const YAML::Node &yamlNode) override;
void Load(GOConfigReader &cfg);
void Save(GOConfigWriter &cfg);
GOEnclosure *GetEnclosure(const wxString &name, bool is_panel);
GOLabelControl *GetLabelControl(const wxString &name, bool is_panel);
void Load(GOConfigReader &cfg) override;
void Save(GOConfigWriter &cfg) override;
GOEnclosure *GetEnclosure(const wxString &name, bool is_panel) override;
GOLabelControl *GetLabelControl(const wxString &name, bool is_panel) override;

/**
* Called from GOOrganController after loading the initial preset and after
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class GODivisionalButtonControl : public GOPushbuttonControl {

void Load(GOConfigReader &cfg, const wxString &group);

void LoadCombination(GOConfigReader &cfg);
void Save(GOConfigWriter &cfg);
void LoadCombination(GOConfigReader &cfg) override;
void Save(GOConfigWriter &cfg) override;

void Push() override;
};
Expand Down
4 changes: 2 additions & 2 deletions src/grandorgue/combinations/model/GODivisionalCombination.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand All @@ -27,7 +27,7 @@ class GODivisionalCombination : public GOCombination {
// It is not registered as saveable object because
// GOdivisionalSetter::LoadCombination creates the combinations dynamically
void LoadCombinationInt(GOConfigReader &cfg, GOSettingType srcType) override;
void SaveInt(GOConfigWriter &cfg);
void SaveInt(GOConfigWriter &cfg) override;

void PutElementToYamlMap(
const GOCombinationDefinition::Element &e,
Expand Down
18 changes: 9 additions & 9 deletions src/grandorgue/control/GOButtonControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ class GOButtonControl : public GOControl,
bool m_ReadOnly;
bool m_IsPiston;

void ProcessMidi(const GOMidiEvent &event);
void HandleKey(int key);
void ProcessMidi(const GOMidiEvent &event) override;
void HandleKey(int key) override;

void Save(GOConfigWriter &cfg);
void Save(GOConfigWriter &cfg) override;

void AbortPlayback();
void PreparePlayback();
void PrepareRecording();
void AbortPlayback() override;
void PreparePlayback() override;
void PrepareRecording() override;

GOMidiReceiverBase *GetMidiReceiver() override {
return IsReadOnly() ? nullptr : &m_midi;
Expand Down Expand Up @@ -91,9 +91,9 @@ class GOButtonControl : public GOControl,

const wxString &GetMidiName() const override { return GetName(); }

wxString GetElementStatus();
std::vector<wxString> GetElementActions();
void TriggerElementActions(unsigned no);
wxString GetElementStatus() override;
std::vector<wxString> GetElementActions() override;
void TriggerElementActions(unsigned no) override;
};

#endif
6 changes: 3 additions & 3 deletions src/grandorgue/control/GOCallbackButtonControl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand All @@ -22,8 +22,8 @@ class GOCallbackButtonControl : public GOButtonControl {
GOButtonCallback *callback,
bool isPushbutton,
bool isPiston = false);
void Push(void);
void Set(bool on);
void Push(void) override;
void Set(bool on) override;

const wxString &GetMidiTypeCode() const override;
const wxString &GetMidiType() const override;
Expand Down
14 changes: 7 additions & 7 deletions src/grandorgue/control/GOLabelControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class GOLabelControl : public GOControl,
GOOrganController *m_OrganController;
GOMidiSender m_sender;

void Save(GOConfigWriter &cfg);
void Save(GOConfigWriter &cfg) override;

void AbortPlayback();
void PreparePlayback();
void PrepareRecording();
void AbortPlayback() override;
void PreparePlayback() override;
void PrepareRecording() override;

public:
GOLabelControl(GOOrganController *organController);
Expand All @@ -52,9 +52,9 @@ class GOLabelControl : public GOControl,
const wxString &GetMidiName() const override { return GetName(); }
GOMidiSender *GetMidiSender() override { return &m_sender; }

wxString GetElementStatus();
std::vector<wxString> GetElementActions();
void TriggerElementActions(unsigned no);
wxString GetElementStatus() override;
std::vector<wxString> GetElementActions() override;
void TriggerElementActions(unsigned no) override;
};

#endif
2 changes: 1 addition & 1 deletion src/grandorgue/control/GOPistonControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class GOPistonControl : public GOPushbuttonControl,
public:
GOPistonControl(GOOrganModel &organModel);
void Load(GOConfigReader &cfg, wxString group);
void Push();
void Push() override;

const wxString &GetMidiTypeCode() const override;
const wxString &GetMidiType() const override;
Expand Down
4 changes: 2 additions & 2 deletions src/grandorgue/dialogs/midi-event/GOMidiEventRecvTab.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand Down Expand Up @@ -93,7 +93,7 @@ class GOMidiEventRecvTab : public wxPanel,
void OnDeleteClick(wxCommandEvent &event);
void OnEventChange(wxCommandEvent &event);
void OnTypeChange(wxCommandEvent &event);
void OnMidiEvent(const GOMidiEvent &event);
void OnMidiEvent(const GOMidiEvent &event) override;

protected:
enum {
Expand Down
4 changes: 2 additions & 2 deletions src/grandorgue/dialogs/settings/GOSettingsMidiDevices.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand Down Expand Up @@ -53,7 +53,7 @@ class SettingsMidiDevices : public wxPanel, GOSettingsPorts {
const wxString &portName,
const wxString apiName,
bool oldEnabled,
bool newEnabled);
bool newEnabled) override;
void OnInDevicesClick(wxCommandEvent &event);
void OnInOutDeviceClick(wxCommandEvent &event);
void OnInChannelShiftClick(wxCommandEvent &event);
Expand Down
4 changes: 2 additions & 2 deletions src/grandorgue/dialogs/settings/GOSettingsReverb.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand Down Expand Up @@ -55,7 +55,7 @@ class GOSettingsReverb : public wxPanel {
void UpdateLimits();
void UpdateEnabled();

bool Validate();
bool Validate() override;

public:
GOSettingsReverb(GOConfig &settings, wxWindow *parent);
Expand Down
4 changes: 2 additions & 2 deletions src/grandorgue/dialogs/settings/GOSettingsTemperaments.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand Down Expand Up @@ -37,7 +37,7 @@ class GOSettingsTemperaments : public wxPanel {
void OnAdd(wxCommandEvent &event);
void OnDel(wxCommandEvent &event);

void Update();
void Update() override;

public:
GOSettingsTemperaments(GOConfig &settings, wxWindow *parent);
Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/gui/GOGUIControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class GOGUIControl : private GOSaveableObject,
bool m_DrawPending;

void Init(GOConfigReader &cfg, wxString group);
void Save(GOConfigWriter &cfg);
void Save(GOConfigWriter &cfg) override;

void ControlChanged(GOControl *control) override;

Expand Down
13 changes: 7 additions & 6 deletions src/grandorgue/gui/GOGUILabel.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
Expand Down Expand Up @@ -62,12 +62,13 @@ class GOGUILabel : public GOGUIControl {
unsigned imageno = 1,
unsigned w = 0,
unsigned h = 0);
void Load(GOConfigReader &cfg, wxString group);
void Layout();
void Load(GOConfigReader &cfg, wxString group) override;
void Layout() override;

bool HandleMousePress(int x, int y, bool right, GOGUIMouseState &state);
void PrepareDraw(double scale, GOBitmap *background);
void Draw(GODC &dc);
bool HandleMousePress(
int x, int y, bool right, GOGUIMouseState &state) override;
void PrepareDraw(double scale, GOBitmap *background) override;
void Draw(GODC &dc) override;
};

#endif
2 changes: 1 addition & 1 deletion src/grandorgue/gui/GOGUIPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class GOGUIPanel : public GOSizeKeeper {
wxString name,
wxString group,
wxString group_name = wxT(""));
void Load(GOConfigReader &cfg, const wxString &group);
void Load(GOConfigReader &cfg, const wxString &group) override;
void Layout();

void SetView(GOGUIPanelView *view);
Expand Down
Loading

0 comments on commit 3d49075

Please sign in to comment.