Explain that wxApp::OnInitCmdLine() must not call Parse()

Make it clear that this method should only set up the command line
options to recognize, but not actually parse them.

See #18771.
This commit is contained in:
Vadim Zeitlin
2020-05-25 22:40:11 +02:00
parent 824b36fdc5
commit e2562b08a4

View File

@@ -401,6 +401,12 @@ public:
Called from OnInit() and may be used to initialize the parser with the
command line options for this application. The base class versions adds
support for a few standard options only.
Note that this method should just configure @a parser to accept the
desired command line options by calling wxCmdLineParser::AddOption(),
wxCmdLineParser::AddSwitch() and similar methods, but should @e not
call wxCmdLineParser::Parse() as this will be done by wxWidgets itself
slightly later.
*/
virtual void OnInitCmdLine(wxCmdLineParser& parser);