diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-08-19 14:12:28 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2018-08-19 14:12:28 (GMT) |
commit | cf5f1ed593fefcef2cceee69dec44e7daa5e8c12 (patch) | |
tree | f6ba9a7adc467a236ac10fa4c310ce75d31c50f5 /src/doxygen.cpp | |
parent | 9316a08624d834a635a82b5aa394ef621dbf513d (diff) | |
parent | 0b4b3698b29436b299d4e4a315d610bc1ab98acb (diff) | |
download | Doxygen-cf5f1ed593fefcef2cceee69dec44e7daa5e8c12.zip Doxygen-cf5f1ed593fefcef2cceee69dec44e7daa5e8c12.tar.gz Doxygen-cf5f1ed593fefcef2cceee69dec44e7daa5e8c12.tar.bz2 |
Merge branch 'lineno'
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 4cc3ca9..bf93a9b 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -8926,7 +8926,7 @@ static void generatePageDocs() static void buildExampleList(EntryNav *rootNav) { - if (rootNav->section()==Entry::EXAMPLE_SEC && !rootNav->name().isEmpty()) + if ((rootNav->section()==Entry::EXAMPLE_SEC || rootNav->section()==Entry::EXAMPLE_LINENO_SEC) && !rootNav->name().isEmpty()) { rootNav->loadEntry(g_storage); Entry *root = rootNav->entry(); @@ -8947,7 +8947,7 @@ static void buildExampleList(EntryNav *rootNav) pd->setFileName(convertNameToFile(pd->name()+"-example",FALSE,TRUE)); pd->addSectionsToDefinition(root->anchors); pd->setLanguage(root->lang); - //pi->addSections(root->anchors); + pd->setShowLineNo(rootNav->section()==Entry::EXAMPLE_LINENO_SEC); Doxygen::exampleSDict->inSort(root->name,pd); //we don't add example to groups @@ -8996,11 +8996,16 @@ static void generateExampleDocs() g_outputList->docify(pd->name()); endTitle(*g_outputList,n,0); g_outputList->startContents(); + QCString lineNoOptStr; + if (pd->showLineNo()) + { + lineNoOptStr="{lineno}"; + } g_outputList->generateDoc(pd->docFile(), // file pd->docLine(), // startLine pd, // context 0, // memberDef - pd->documentation()+"\n\n\\include "+pd->name(), // docs + pd->documentation()+"\n\n\\include"+lineNoOptStr+" "+pd->name(), // docs TRUE, // index words TRUE, // is example pd->name() |