Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
1bdbbc60
Commit
1bdbbc60
authored
Jan 05, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 705499 - Nested namespace causes incorrect display when referenced via .tag file
parent
2ed3d33a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
doxygen.cpp
src/doxygen.cpp
+24
-17
util.cpp
src/util.cpp
+1
-1
No files found.
src/doxygen.cpp
View file @
1bdbbc60
...
...
@@ -996,8 +996,9 @@ static Definition *findScope(Entry *root,int level=0)
* full qualified name \a name. Creates an artificial scope if the scope is
* not found and set the parent/child scope relation if the scope is found.
*/
static
Definition
*
buildScopeFromQualifiedName
(
const
QCString
name
,
int
level
,
SrcLangExt
lang
)
static
Definition
*
buildScopeFromQualifiedName
(
const
QCString
name
,
int
level
,
SrcLangExt
lang
,
TagInfo
*
tagInfo
)
{
//printf("buildScopeFromQualifiedName(%s) level=%d\n",name.data(),level);
int
i
=
0
;
int
p
=
0
,
l
;
Definition
*
prevScope
=
Doxygen
::
globalScope
;
...
...
@@ -1020,9 +1021,11 @@ static Definition *buildScopeFromQualifiedName(const QCString name,int level,Src
else
if
(
nd
==
0
&&
cd
==
0
)
// scope is not known!
{
// introduce bogus namespace
//printf("++ adding dummy namespace %s to %s
\n",nsName.data(),prevScope->name().data()
);
//printf("++ adding dummy namespace %s to %s
tagInfo=%p\n",nsName.data(),prevScope->name().data(),tagInfo
);
nd
=
new
NamespaceDef
(
"[generated]"
,
1
,
1
,
fullScope
);
"[generated]"
,
1
,
1
,
fullScope
,
tagInfo
?
tagInfo
->
tagName
:
QCString
(),
tagInfo
?
tagInfo
->
fileName
:
QCString
());
nd
->
setLanguage
(
lang
);
// add namespace to the list
...
...
@@ -1109,7 +1112,7 @@ static Definition *findScopeFromQualifiedName(Definition *startScope,const QCStr
// so use this instead.
QCString
fqn
=
QCString
(
ui
.
currentKey
())
+
scope
.
right
(
scope
.
length
()
-
p
);
resultScope
=
buildScopeFromQualifiedName
(
fqn
,
fqn
.
contains
(
"::"
),
startScope
->
getLanguage
());
resultScope
=
buildScopeFromQualifiedName
(
fqn
,
fqn
.
contains
(
"::"
),
startScope
->
getLanguage
()
,
0
);
//printf("Creating scope from fqn=%s result %p\n",fqn.data(),resultScope);
if
(
resultScope
)
{
...
...
@@ -1295,22 +1298,23 @@ static void addClassToContext(EntryNav *rootNav)
QCString
tagName
;
QCString
refFileName
;
if
(
rootNav
->
tagInfo
())
TagInfo
*
tagInfo
=
rootNav
->
tagInfo
();
if
(
tagInfo
)
{
tagName
=
rootNav
->
tagInfo
()
->
tagName
;
refFileName
=
rootNav
->
tagInfo
()
->
fileName
;
tagName
=
tagInfo
->
tagName
;
refFileName
=
tagInfo
->
fileName
;
int
i
;
if
((
i
=
fullName
.
find
(
"::"
))
!=-
1
)
// symbols imported via tag files may come without the parent scope,
// so we artificially create it here
{
buildScopeFromQualifiedName
(
fullName
,
fullName
.
contains
(
"::"
),
root
->
lang
);
buildScopeFromQualifiedName
(
fullName
,
fullName
.
contains
(
"::"
),
root
->
lang
,
tagInfo
);
}
}
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
);
Debug
::
print
(
Debug
::
Classes
,
0
,
" New class `%s' (sec=0x%08x)! #tArgLists=%d
tagInfo=%p
\n
"
,
fullName
.
data
(),
sec
,
root
->
tArgLists
?
(
int
)
root
->
tArgLists
->
count
()
:
-
1
,
tagInfo
);
cd
->
setDocumentation
(
root
->
doc
,
root
->
docFile
,
root
->
docLine
);
// copy docs to definition
cd
->
setBriefDescription
(
root
->
brief
,
root
->
briefFile
,
root
->
briefLine
);
cd
->
setLanguage
(
root
->
lang
);
...
...
@@ -1443,7 +1447,7 @@ static void resolveClassNestingRelations()
//printf("processing unresolved=%s, iteration=%d\n",cd->name().data(),iteration);
/// create the scope artificially
// anyway, so we can at least relate scopes properly.
Definition
*
d
=
buildScopeFromQualifiedName
(
name
,
name
.
contains
(
"::"
),
cd
->
getLanguage
());
Definition
*
d
=
buildScopeFromQualifiedName
(
name
,
name
.
contains
(
"::"
),
cd
->
getLanguage
()
,
0
);
if
(
d
!=
cd
&&
!
cd
->
getDefFileName
().
isEmpty
())
// avoid recursion in case of redundant scopes, i.e: namespace N { class N::C {}; }
// for this case doxygen assumes the exitance of a namespace N::N in which C is to be found!
...
...
@@ -1748,13 +1752,16 @@ static void buildNamespaceList(EntryNav *rootNav)
{
QCString
tagName
;
QCString
tagFileName
;
if
(
rootNav
->
tagInfo
())
TagInfo
*
tagInfo
=
rootNav
->
tagInfo
();
if
(
tagInfo
)
{
tagName
=
rootNav
->
tagInfo
()
->
tagName
;
tagFileName
=
rootNav
->
tagInfo
()
->
fileName
;
tagName
=
tagInfo
->
tagName
;
tagFileName
=
tagInfo
->
fileName
;
}
//printf("++ new namespace %s lang=%s\n",fullName.data(),langToString(root->lang).data());
NamespaceDef
*
nd
=
new
NamespaceDef
(
root
->
fileName
,
root
->
startLine
,
root
->
startColumn
,
fullName
,
tagName
,
tagFileName
,
root
->
type
,
root
->
spec
&
Entry
::
Published
);
//printf("++ new namespace %s lang=%s tagName=%s\n",fullName.data(),langToString(root->lang).data(),tagName.data());
NamespaceDef
*
nd
=
new
NamespaceDef
(
root
->
fileName
,
root
->
startLine
,
root
->
startColumn
,
fullName
,
tagName
,
tagFileName
,
root
->
type
,
root
->
spec
&
Entry
::
Published
);
nd
->
setDocumentation
(
root
->
doc
,
root
->
docFile
,
root
->
docLine
);
// copy docs to definition
nd
->
setBriefDescription
(
root
->
brief
,
root
->
briefFile
,
root
->
briefLine
);
nd
->
addSectionsToDefinition
(
root
->
anchors
);
...
...
@@ -1786,7 +1793,7 @@ static void buildNamespaceList(EntryNav *rootNav)
if
(
d
==
0
)
// we didn't find anything, create the scope artificially
// anyway, so we can at least relate scopes properly.
{
Definition
*
d
=
buildScopeFromQualifiedName
(
fullName
,
fullName
.
contains
(
"::"
),
nd
->
getLanguage
());
Definition
*
d
=
buildScopeFromQualifiedName
(
fullName
,
fullName
.
contains
(
"::"
),
nd
->
getLanguage
()
,
tagInfo
);
d
->
addInnerCompound
(
nd
);
nd
->
setOuterScope
(
d
);
// TODO: Due to the order in which the tag file is written
...
...
src/util.cpp
View file @
1bdbbc60
...
...
@@ -8093,7 +8093,7 @@ bool namespaceHasVisibleChild(NamespaceDef *nd,bool includeClasses)
NamespaceDef
*
cnd
;
for
(
cnli
.
toFirst
();(
cnd
=
cnli
.
current
());
++
cnli
)
{
if
(
cnd
->
isLinkable
()
&&
cnd
->
localName
().
find
(
'@'
)
==-
1
)
if
(
cnd
->
isLinkable
InProject
()
&&
cnd
->
localName
().
find
(
'@'
)
==-
1
)
{
return
TRUE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment