From e2562b08a42033e95b68ced37b5b77f9851585b4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 May 2020 22:40:11 +0200 Subject: [PATCH] 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. --- interface/wx/app.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/wx/app.h b/interface/wx/app.h index e6a051ab73..7e965c4b3f 100644 --- a/interface/wx/app.h +++ b/interface/wx/app.h @@ -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);