fix an important bug: ifacecheck was parsing only <sectiondef> with kind==public-func or kind==protected-func; it was ignoring kind==user-defined and in any case the access specifier must be taken from the 'prot' attribute of <memberdef> nodes instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -156,16 +156,12 @@ int IfaceCheckApp::OnRun()
|
|||||||
// in any case set basic std preprocessor #defines:
|
// in any case set basic std preprocessor #defines:
|
||||||
m_doxyInterface.AddPreprocessorValue("NULL", "0");
|
m_doxyInterface.AddPreprocessorValue("NULL", "0");
|
||||||
|
|
||||||
//g_bLogEnabled = false;
|
|
||||||
|
|
||||||
// parse the two XML files which contain the real and the doxygen interfaces
|
// parse the two XML files which contain the real and the doxygen interfaces
|
||||||
// for wxWidgets API:
|
// for wxWidgets API:
|
||||||
if (!m_gccInterface.Parse(parser.GetParam(0)) ||
|
if (!m_gccInterface.Parse(parser.GetParam(0)) ||
|
||||||
!m_doxyInterface.Parse(parser.GetParam(1)))
|
!m_doxyInterface.Parse(parser.GetParam(1)))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// g_bLogEnabled = true;
|
|
||||||
|
|
||||||
if (parser.Found(DUMP_SWITCH))
|
if (parser.Found(DUMP_SWITCH))
|
||||||
{
|
{
|
||||||
wxLogMessage("Dumping real API to '%s'...", API_DUMP_FILE);
|
wxLogMessage("Dumping real API to '%s'...", API_DUMP_FILE);
|
||||||
|
@@ -1495,18 +1495,23 @@ bool wxXmlDoxygenInterface::ParseCompoundDefinition(const wxString& filename)
|
|||||||
wxXmlNode *subchild = child->GetChildren();
|
wxXmlNode *subchild = child->GetChildren();
|
||||||
while (subchild)
|
while (subchild)
|
||||||
{
|
{
|
||||||
wxString kind = subchild->GetAttribute("kind");
|
// NOTE: when documenting functions using the //@{ and //@}
|
||||||
|
// tags to create function groups, doxygen puts the
|
||||||
// parse only public&protected functions:
|
// contained methods into a "user-defined" section
|
||||||
if (subchild->GetName() == "sectiondef" &&
|
// so we _must_ use the "prot" attribute to distinguish
|
||||||
(kind == "public-func" || kind == "protected-func"))
|
// public/protected methods from private ones and cannot
|
||||||
|
// rely on the kind="public" attribute of <sectiondef>
|
||||||
|
if (subchild->GetName() == "sectiondef")
|
||||||
{
|
{
|
||||||
|
|
||||||
wxXmlNode *membernode = subchild->GetChildren();
|
wxXmlNode *membernode = subchild->GetChildren();
|
||||||
while (membernode)
|
while (membernode)
|
||||||
{
|
{
|
||||||
|
const wxString& accessSpec = membernode->GetAttribute("prot");
|
||||||
|
|
||||||
|
// parse only public&protected functions:
|
||||||
if (membernode->GetName() == "memberdef" &&
|
if (membernode->GetName() == "memberdef" &&
|
||||||
membernode->GetAttribute("kind") == "function")
|
membernode->GetAttribute("kind") == "function" &&
|
||||||
|
(accessSpec == "public" || accessSpec == "protected"))
|
||||||
{
|
{
|
||||||
|
|
||||||
wxMethod m;
|
wxMethod m;
|
||||||
@@ -1516,11 +1521,11 @@ bool wxXmlDoxygenInterface::ParseCompoundDefinition(const wxString& filename)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind == "public-func")
|
if (accessSpec == "public")
|
||||||
m.SetAccessSpecifier(wxMAS_PUBLIC);
|
m.SetAccessSpecifier(wxMAS_PUBLIC);
|
||||||
else if (kind == "protected-func")
|
else if (accessSpec == "protected")
|
||||||
m.SetAccessSpecifier(wxMAS_PROTECTED);
|
m.SetAccessSpecifier(wxMAS_PROTECTED);
|
||||||
else if (kind == "private-func")
|
else if (accessSpec == "private")
|
||||||
m.SetAccessSpecifier(wxMAS_PRIVATE);
|
m.SetAccessSpecifier(wxMAS_PRIVATE);
|
||||||
|
|
||||||
if (absoluteFile.IsEmpty())
|
if (absoluteFile.IsEmpty())
|
||||||
|
Reference in New Issue
Block a user