Bracket MacNewFile() with __WXMAC__ checks in the docview sample.
This fixes compilation in C++11 mode: "override" results in an error on non-Mac platforms because this method doesn't exist there and so can't be overridden. Closes #16903.
This commit is contained in:
parent
0e2d9e539c
commit
05a0f97caf
@ -152,10 +152,12 @@ bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
|
||||
return wxApp::OnCmdLineParsed(parser);
|
||||
}
|
||||
|
||||
#ifdef __WXMAC__
|
||||
void MyApp::MacNewFile()
|
||||
{
|
||||
wxDocManager::GetDocumentManager()->CreateNewDocument();
|
||||
}
|
||||
#endif // __WXMAC__
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
|
@ -40,7 +40,9 @@ public:
|
||||
virtual void OnInitCmdLine(wxCmdLineParser& parser) wxOVERRIDE;
|
||||
virtual bool OnCmdLineParsed(wxCmdLineParser& parser) wxOVERRIDE;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
virtual void MacNewFile() wxOVERRIDE;
|
||||
#endif // __WXMAC__
|
||||
|
||||
// our specific methods
|
||||
Mode GetMode() const { return m_mode; }
|
||||
|
Loading…
Reference in New Issue
Block a user