Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let the DoxygenParser find xml files produced by Doxygen 1.8.7 #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion ApiExtractor/doxygenparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ void DoxygenParser::fillDocumentation(AbstractMetaClass* metaClass)
doxyFileSuffix += metaClass->name();
doxyFileSuffix += ".xml";

// if capital chars are disabled
QString lowerCaseDoxyFileSuffix;
for(QString::const_iterator i = doxyFileSuffix.begin(); i != doxyFileSuffix.end(); ++i) {
if(i->isUpper()) {
lowerCaseDoxyFileSuffix.append('_');
lowerCaseDoxyFileSuffix.append(i->toLower());
} else {
lowerCaseDoxyFileSuffix.append(*i);
}
}

const char* prefixes[] = { "class", "struct", "namespace" };
const int numPrefixes = sizeof(prefixes) / sizeof(const char*);
bool isProperty = false;
Expand All @@ -73,14 +84,19 @@ void DoxygenParser::fillDocumentation(AbstractMetaClass* metaClass)
doxyFilePath = documentationDataDirectory() + "/" + prefixes[i] + doxyFileSuffix;
if (QFile::exists(doxyFilePath))
break;

doxyFilePath = documentationDataDirectory() + "/" + prefixes[i] + lowerCaseDoxyFileSuffix;
if (QFile::exists(doxyFilePath))
break;

doxyFilePath.clear();
}

if (doxyFilePath.isEmpty()) {
ReportHandler::warning("Can't find doxygen file for class "
+ metaClass->name() + ", tried: "
+ documentationDataDirectory() + "/{struct|class|namespace}"
+ doxyFileSuffix);
+ "{" + doxyFileSuffix + "|" + lowerCaseDoxyFileSuffix + "}");
return;
}
QXmlQuery xquery;
Expand Down