reverted the change of wxCmdLineEntryDesc fields to wxString as this doesn't compile with VC6; make them const char * instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -24,10 +24,13 @@ changes:
|
||||
|
||||
b) Passing NULL as argument: as NULL can't be unambiguously converted to
|
||||
wxString, in many cases code using it won't compile any more and NULL
|
||||
should be replaced with an empty string. The same issue also applies to
|
||||
the structure fields which used to contain "const wxChar *" pointers (such
|
||||
as wxCmdLineEntryDesc::shortName, longName and description fields) and are
|
||||
now wxStrings: empty strings should be assigned to them instead of NULL.
|
||||
should be replaced with an empty string.
|
||||
|
||||
|
||||
- Some structure fields which used to be of type "const wxChar *" (such as
|
||||
wxCmdLineEntryDesc::shortName, longName and description fields) are now of
|
||||
type "const char *", you need to remove wxT() or _T() around the values used
|
||||
to initialize them (which should normally always be ASCII).
|
||||
|
||||
|
||||
|
||||
|
@@ -64,13 +64,17 @@ enum wxCmdLineEntryType
|
||||
struct wxCmdLineEntryDesc
|
||||
{
|
||||
wxCmdLineEntryType kind;
|
||||
wxString shortName;
|
||||
wxString longName;
|
||||
wxString description;
|
||||
const char *shortName;
|
||||
const char *longName;
|
||||
const char *description;
|
||||
wxCmdLineParamType type;
|
||||
int flags;
|
||||
};
|
||||
|
||||
// the list of wxCmdLineEntryDesc objects should be terminated with this one
|
||||
#define wxCMD_LINE_DESC_END \
|
||||
{ wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0x0 }
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCmdLineParser is a class for parsing command line.
|
||||
//
|
||||
|
@@ -485,7 +485,7 @@ void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
|
||||
#if wxUSE_LOG
|
||||
{
|
||||
wxCMD_LINE_SWITCH,
|
||||
"",
|
||||
NULL,
|
||||
OPTION_VERBOSE,
|
||||
gettext_noop("generate verbose log messages"),
|
||||
wxCMD_LINE_VAL_NONE,
|
||||
@@ -494,14 +494,7 @@ void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
// terminator
|
||||
{
|
||||
wxCMD_LINE_NONE,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
wxCMD_LINE_VAL_NONE,
|
||||
0x0
|
||||
}
|
||||
wxCMD_LINE_DESC_END
|
||||
};
|
||||
|
||||
parser.SetDesc(cmdLineDesc);
|
||||
|
@@ -203,7 +203,7 @@ void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
|
||||
#ifdef __WXUNIVERSAL__
|
||||
{
|
||||
wxCMD_LINE_OPTION,
|
||||
"",
|
||||
NULL,
|
||||
OPTION_THEME,
|
||||
gettext_noop("specify the theme to use"),
|
||||
wxCMD_LINE_VAL_STRING,
|
||||
@@ -217,7 +217,7 @@ void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
|
||||
// and not mgl/app.cpp
|
||||
{
|
||||
wxCMD_LINE_OPTION,
|
||||
"",
|
||||
NULL,
|
||||
OPTION_MODE,
|
||||
gettext_noop("specify display mode to use (e.g. 640x480-16)"),
|
||||
wxCMD_LINE_VAL_STRING,
|
||||
@@ -226,14 +226,7 @@ void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
|
||||
#endif // __WXMGL__
|
||||
|
||||
// terminator
|
||||
{
|
||||
wxCMD_LINE_NONE,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
wxCMD_LINE_VAL_NONE,
|
||||
0x0
|
||||
}
|
||||
wxCMD_LINE_DESC_END
|
||||
};
|
||||
|
||||
parser.SetDesc(cmdLineGUIDesc);
|
||||
|
@@ -253,11 +253,11 @@ int XmlResApp::OnRun()
|
||||
#if 0 // not yet implemented
|
||||
{ wxCMD_LINE_OPTION, _T("l"), _T("list-of-handlers"), _T("output list of necessary handlers to this file"), (wxCmdLineParamType)0, 0 },
|
||||
#endif
|
||||
{ wxCMD_LINE_PARAM, "", "", _T("input file(s)"),
|
||||
{ wxCMD_LINE_PARAM, NULL, NULL, _T("input file(s)"),
|
||||
wxCMD_LINE_VAL_STRING,
|
||||
wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_OPTION_MANDATORY },
|
||||
|
||||
{ wxCMD_LINE_NONE, "", "", "", (wxCmdLineParamType)0, 0 }
|
||||
wxCMD_LINE_DESC_END
|
||||
};
|
||||
|
||||
wxCmdLineParser parser(cmdLineDesc, argc, argv);
|
||||
|
Reference in New Issue
Block a user