How does C++ support create class declarations?

Andreas Pakulat apaku at
Sun Feb 17 22:18:17 UTC 2008


seems I'm still missing a piece here. Looking at C++ highlighting code I
see this:

if( dec->context()->scopeIdentifier().isEmpty() )
   type = GlobalVariableType;

and I'm wondering why that isn't empty. For Python scopeIdentifier is
empty, although qualifiedIdentifier of the declaration returns something
meaningful. I really must be missing something here. Currently what I do

openContext( astnode, DUContext::Class, identifierForName(
astnode->className ) );
openDefinition( astnode->className, astnode );

which gives me a context with scopeIdentifier "Bar" (using the
includeClasses option) and a declaration with qualifiedIdentifier

So what am I doing wrong, that my declarations context returns "" for
scopeIdentifier() while obviously that from C++ doesn't. Or is it
correct in C++ to get a GlobalVariableType for a class Foo {};?


Your own qualities will help prevent your advancement in the world.

More information about the KDevelop-devel mailing list