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
745955f5
Commit
745955f5
authored
Aug 24, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 735145 - QHP toc broken if mainpage with PROJECT_NAME title has sections/subpages
parent
fdd1c3f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
index.cpp
src/index.cpp
+13
-2
qhp.cpp
src/qhp.cpp
+8
-4
qhp.h
src/qhp.h
+1
-2
No files found.
src/index.cpp
View file @
745955f5
...
...
@@ -3079,6 +3079,17 @@ static void countRelatedPages(int &docPages,int &indexPages)
//----------------------------------------------------------------------------
static
bool
mainPageHasOwnTitle
()
{
static
QCString
projectName
=
Config_getString
(
"PROJECT_NAME"
);
QCString
title
;
if
(
Doxygen
::
mainPage
)
{
title
=
filterTitle
(
Doxygen
::
mainPage
->
title
());
}
return
!
projectName
.
isEmpty
()
&&
mainPageHasTitle
()
&&
qstricmp
(
title
,
projectName
)
!=
0
;
}
static
void
writePages
(
PageDef
*
pd
,
FTVHelp
*
ftv
)
{
//printf("writePages()=%s pd=%p mainpage=%p\n",pd->name().data(),pd,Doxygen::mainPage);
...
...
@@ -3115,8 +3126,8 @@ static void writePages(PageDef *pd,FTVHelp *ftv)
}
}
if
(
hasSubPages
&&
ftv
)
ftv
->
incContentsDepth
();
bool
doIndent
=
(
hasSections
||
hasSubPages
)
&&
(
pd
!=
Doxygen
::
mainPage
||
mainPageHasTitle
());
bool
doIndent
=
(
hasSections
||
hasSubPages
)
&&
(
pd
!=
Doxygen
::
mainPage
||
mainPageHas
Own
Title
());
if
(
doIndent
)
{
Doxygen
::
indexList
->
incContentsDepth
();
...
...
src/qhp.cpp
View file @
745955f5
...
...
@@ -53,7 +53,7 @@ static QCString makeRef(const char * withoutExtension, const char * anchor)
return
result
+
"#"
+
anchor
;
}
Qhp
::
Qhp
()
:
m_prevSectionLevel
(
0
),
m_sectionLevel
(
0
)
Qhp
::
Qhp
()
:
m_prevSectionLevel
(
0
),
m_sectionLevel
(
0
)
,
m_skipMainPageSection
(
FALSE
)
{
m_doc
.
setIndentLevel
(
0
);
m_toc
.
setIndentLevel
(
2
);
...
...
@@ -177,14 +177,13 @@ void Qhp::finalize()
void
Qhp
::
incContentsDepth
()
{
m_sectionLevel
++
;
//printf("Qhp::incContentsDepth() %d->%d\n",m_sectionLevel-1,m_sectionLevel);
}
void
Qhp
::
decContentsDepth
()
{
//printf("Qhp::decContentsDepth() %d->%d\n",m_sectionLevel,m_sectionLevel-1);
if
(
m_sectionLevel
<=
0
)
if
(
m_sectionLevel
<=
0
||
(
m_sectionLevel
==
1
&&
m_skipMainPageSection
))
{
m_skipMainPageSection
=
FALSE
;
return
;
}
m_sectionLevel
--
;
...
...
@@ -208,6 +207,7 @@ void Qhp::addContentsItem(bool /*isDir*/, const char * name,
setPrevSection
(
name
,
f
,
anchor
,
m_sectionLevel
);
// Close sections as needed
//printf("Qhp::addContentsItem() closing %d sections\n",diff);
for
(;
diff
>
0
;
diff
--
)
{
m_toc
.
close
(
"section"
);
...
...
@@ -331,6 +331,10 @@ void Qhp::handlePrevSection()
m_toc
.
openClose
(
"section"
,
attributes
);
}
}
else
{
m_skipMainPageSection
=
TRUE
;
}
clearPrevSection
();
}
...
...
src/qhp.h
View file @
745955f5
...
...
@@ -64,8 +64,7 @@ class Qhp : public IndexIntf
int
m_prevSectionLevel
;
int
m_sectionLevel
;
//QCString m_prevIdName;
//QCString m_prevIdRef;
bool
m_skipMainPageSection
;
};
#endif // DOXYGEN_QHP_H
...
...
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