MCPcopy Create free account
hub / github.com/KDE/kdevelop / FunctionNode

Method FunctionNode

kdevplatform/language/classmodel/classmodelnode.cpp:257–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255//////////////////////////////////////////////////////////////////////////////
256
257FunctionNode::FunctionNode(Declaration* a_decl, NodesModelInterface* a_model)
258 : IdentifierNode(a_decl, a_model)
259{
260 // Append the argument signature to the identifier's name (which is what the displayName is.
261 if (FunctionType::Ptr type = a_decl->type<FunctionType>())
262 m_displayName += type->partToString(FunctionType::SignatureArguments);
263
264 // Add special values for ctor / dtor to sort first
265 auto* classmember = dynamic_cast<ClassFunctionDeclaration*>(a_decl);
266 if (classmember) {
267 if (classmember->isConstructor() || classmember->isDestructor())
268 m_sortableString = QLatin1Char('0') + m_displayName;
269 else
270 m_sortableString = QLatin1Char('1') + m_displayName;
271 } else {
272 m_sortableString = m_displayName;
273 }
274}
275
276//////////////////////////////////////////////////////////////////////////////
277//////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

partToStringMethod · 0.80
isConstructorMethod · 0.80
isDestructorMethod · 0.80

Tested by

no test coverage detected