diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-08-11 13:06:22 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-08-11 13:06:22 (GMT) |
commit | 34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634 (patch) | |
tree | ad481e345a35820f0142bb774556afc6de0d00fa /src/qhp.cpp | |
parent | 3583a7c0bea47665a06d14a64b62376eee21c528 (diff) | |
download | Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.zip Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.tar.gz Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.tar.bz2 |
Release-1.8.2
Diffstat (limited to 'src/qhp.cpp')
-rw-r--r-- | src/qhp.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/qhp.cpp b/src/qhp.cpp index 0d55227..00e870b 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -20,6 +20,7 @@ #include "config.h" #include "memberdef.h" #include "groupdef.h" +#include "doxygen.h" #include "filedef.h" #include <qstringlist.h> @@ -27,8 +28,19 @@ static QCString makeFileName(const char * withoutExtension) { - if (!withoutExtension) return QCString(); - return QCString(withoutExtension)+".html"; + QCString result=withoutExtension; + if (!result.isEmpty()) + { + if (result.at(0)=='!') // relative URL -> strip marker + { + result=result.mid(1); + } + else // add specified HTML extension + { + result+=Doxygen::htmlFileExtension; + } + } + return result; } static QCString makeRef(const char * withoutExtension, const char * anchor) @@ -114,10 +126,11 @@ void Qhp::initialize() QCString fullProjectname = getFullProjectName(); const char * const attributes[] = { "title", fullProjectname, - "ref", "index.html", + "ref", QCString("index")+Doxygen::htmlFileExtension, NULL }; m_toc.open("section", attributes); + m_prevSectionTitle = getFullProjectName(); m_prevSectionLevel = 1; m_sectionLevel = 1; @@ -181,10 +194,14 @@ void Qhp::addContentsItem(bool /*isDir*/, const char * name, { //printf("Qhp::addContentsItem(%s) %d\n",name,m_sectionLevel); // Backup difference before modification + + QCString f = file; + if (!f.isEmpty() && f.at(0)=='^') return; // absolute URL not supported + int diff = m_prevSectionLevel - m_sectionLevel; handlePrevSection(); - setPrevSection(name, file, m_sectionLevel); + setPrevSection(name, f, m_sectionLevel); // Close sections as needed for (; diff > 0; diff--) @@ -289,7 +306,7 @@ void Qhp::handlePrevSection() } // We skip "Main Page" as our extra root is pointing to that - if (!((m_prevSectionLevel==1) && (m_prevSectionTitle=="Main Page"))) + if (!((m_prevSectionLevel==1) && (m_prevSectionTitle==getFullProjectName()))) { QCString finalRef = makeFileName(m_prevSectionRef); |