summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-06-30 11:30:56 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-06-30 11:30:56 (GMT)
commit4f520b36a54c8ef645dd346d0959b07ffe6deecb (patch)
treeedebd4e5186b710ad7612db5cced08d6c818f870 /src
parentc471d38e2898f070f819f2ea3af1f4cc92a3e810 (diff)
parentb0b17dc7267f2a2cbe41c846bf630d48c1a3335d (diff)
downloadDoxygen-4f520b36a54c8ef645dd346d0959b07ffe6deecb.zip
Doxygen-4f520b36a54c8ef645dd346d0959b07ffe6deecb.tar.gz
Doxygen-4f520b36a54c8ef645dd346d0959b07ffe6deecb.tar.bz2
Merge branch 'tagenum'
Diffstat (limited to 'src')
-rw-r--r--src/doxygen.cpp15
-rw-r--r--src/util.cpp3
2 files changed, 15 insertions, 3 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index f52172f..56aba70 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1295,10 +1295,21 @@ static void addClassToContext(EntryNav *rootNav)
tagName = rootNav->tagInfo()->tagName;
refFileName = rootNav->tagInfo()->fileName;
}
+ Definition *d = 0;
+ int i;
+ if ((i=fullName.find("::"))!=-1)
+ {
+ d = buildScopeFromQualifiedName(fullName,fullName.contains("::"),root->lang);
+ }
cd=new ClassDef(root->fileName,root->startLine,root->startColumn,
fullName,sec,tagName,refFileName,TRUE,root->spec&Entry::Enum);
Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
fullName.data(),sec,root->tArgLists ? (int)root->tArgLists->count() : -1);
+ if (d)
+ {
+ cd->setOuterScope(d);
+ d->addInnerCompound(cd);
+ }
cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->setLanguage(root->lang);
@@ -7187,8 +7198,8 @@ static void addEnumValuesToEnums(EntryNav *rootNav)
// them here and only add them to the enum
e->loadEntry(g_storage);
Entry *root = e->entry();
- //printf("md->qualifiedName()=%s rootNav->name()=%s tagInfo=%p\n",
- // md->qualifiedName().data(),rootNav->name().data(),rootNav->tagInfo());
+ //printf("md->qualifiedName()=%s rootNav->name()=%s tagInfo=%p name=%s\n",
+ // md->qualifiedName().data(),rootNav->name().data(),rootNav->tagInfo(),root->name.data());
if (substitute(md->qualifiedName(),"::",".")== // TODO: add function to get canonical representation
substitute(rootNav->name(),"::",".") || // enum value scope matches that of the enum
rootNav->tagInfo() // be less strict for tag files as members can have incomplete scope
diff --git a/src/util.cpp b/src/util.cpp
index 0fd341b..f207430 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -4279,7 +4279,8 @@ bool getDefs(const QCString &scName,
MemberDef *tmd = mmd->getEnumScope();
//printf("try member %s tmd=%s\n",mmd->name().data(),tmd?tmd->name().data():"<none>");
int ni=namespaceName.findRev("::");
- bool notInNS = tmd && ni==-1 && tmd->getNamespaceDef()==0;
+ //printf("namespaceName=%s ni=%d\n",namespaceName.data(),ni);
+ bool notInNS = tmd && ni==-1 && tmd->getNamespaceDef()==0 && (mScope.isEmpty() || mScope==tmd->name());
bool sameNS = tmd && tmd->getNamespaceDef() && namespaceName.left(ni)==tmd->getNamespaceDef()->name();
//printf("notInNS=%d sameNS=%d\n",notInNS,sameNS);
if (tmd && tmd->isStrong() && // C++11 enum class