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:
		@@ -152,10 +152,12 @@ bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
 | 
				
			|||||||
    return wxApp::OnCmdLineParsed(parser);
 | 
					    return wxApp::OnCmdLineParsed(parser);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __WXMAC__
 | 
				
			||||||
void MyApp::MacNewFile()
 | 
					void MyApp::MacNewFile()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxDocManager::GetDocumentManager()->CreateNewDocument();
 | 
					    wxDocManager::GetDocumentManager()->CreateNewDocument();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif // __WXMAC__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool MyApp::OnInit()
 | 
					bool MyApp::OnInit()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,7 +40,9 @@ public:
 | 
				
			|||||||
    virtual void OnInitCmdLine(wxCmdLineParser& parser) wxOVERRIDE;
 | 
					    virtual void OnInitCmdLine(wxCmdLineParser& parser) wxOVERRIDE;
 | 
				
			||||||
    virtual bool OnCmdLineParsed(wxCmdLineParser& parser) wxOVERRIDE;
 | 
					    virtual bool OnCmdLineParsed(wxCmdLineParser& parser) wxOVERRIDE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __WXMAC__
 | 
				
			||||||
    virtual void MacNewFile() wxOVERRIDE;
 | 
					    virtual void MacNewFile() wxOVERRIDE;
 | 
				
			||||||
 | 
					#endif // __WXMAC__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // our specific methods
 | 
					    // our specific methods
 | 
				
			||||||
    Mode GetMode() const { return m_mode; }
 | 
					    Mode GetMode() const { return m_mode; }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user