Commit b2643163 authored by Ralf Habacker's avatar Ralf Habacker

Fix 'c++ import does not recognize const methods'

Also added a related import test case.

BUG:392777
FIXED-IN:2.25.0 (KDE Applications 18.04.0)
parent e7a7ca20
class ConstMethodClass {
bool ConstMethod(QString &param) const;
};
......@@ -347,6 +347,8 @@ void CppTree2Uml::parseFunctionDefinition(FunctionDefinitionAST* ast)
if (d->override())
m->setOverride(true);
if (d->constant())
m->setConst(true);
// if a class has no return type, it could be a constructor or
// a destructor
if (d && returnType.isEmpty()) {
......@@ -636,6 +638,8 @@ void CppTree2Uml::parseFunctionDeclaration(GroupAST* funSpec, GroupAST* storageS
UMLOperation *m = Import_Utils::makeOperation(c, id);
if (d->override())
m->setOverride(true);
if (d->constant())
m->setConst(true);
if (isConstExpression)
m->setStereotype(QLatin1String("constexpr"));
// if a class has no return type, it could de a constructor or
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment