Can I suppress the More ... free links on the Doxygen class help pages?

The link to the Doxygen class page consists primarily of lists of class members, each followed by a brief description (if one exists). A member is a link to the details page for that member. An invariably short description is accompanied by a link "More ...". The content of this link is identical to the content of the element itself. This "More ..." link suggests - at least for me - that a more detailed description is available at the other end of this link. This is misleading when a member has only a brief description. In this case, the link points to a page that simply repeats this brief description, and then indicates "Definition in line NN of the file abcxyz.ext."

Is there a way to get Doxygen to suppress these frustrating empty "More ..." links?

+4
source share
3 answers

An experimental patch for doxygen 1.8.10, which allows you to remove the "More ..." links using "USE_MORE_LINK = NO" in the Doxyfile.

<!-- language: diff -->
=== modified file 'src/classdef.cpp'
--- src/classdef.cpp    2015-07-06 11:29:12 +0000
+++ src/classdef.cpp    2015-07-06 11:37:57 +0000
@@ -1802,12 +1802,14 @@

   // HTML only
   ol.pushGeneratorState();
-  ol.disableAllBut(OutputGenerator::Html);
-  ol.docify(" ");
-  ol.startTextLink(getOutputFileBase(),
-      anchor.isEmpty() ? QCString("details") : anchor);
-  ol.parseText(theTranslator->trMore());
-  ol.endTextLink();
+  if (Config_getBool("USE_MORE_LINK")) {
+    ol.disableAllBut(OutputGenerator::Html);
+    ol.docify(" ");
+    ol.startTextLink(getOutputFileBase(),
+        anchor.isEmpty() ? QCString("details") : anchor);
+    ol.parseText(theTranslator->trMore());
+    ol.endTextLink();
+  }
   ol.popGeneratorState();

   if (!anchor.isEmpty())

=== modified file 'src/config.xml'
--- src/config.xml  2015-07-06 11:29:12 +0000
+++ src/config.xml  2015-07-06 11:57:09 +0000
@@ -366,6 +366,13 @@
 ]]>
       </docs>
     </option>
+    <option type='bool' id='USE_MORE_LINK' defval='1'>
+      <docs>
+<![CDATA[
+ Experimental parameter, which allows you to remove the "More..." links by using USE_MORE_LINK = NO.
+]]>
+      </docs>
+    </option>
     <option type='list' id='ABBREVIATE_BRIEF' format='string'>
       <docs>
 <![CDATA[

=== modified file 'src/filedef.cpp'
--- src/filedef.cpp 2015-07-06 11:29:12 +0000
+++ src/filedef.cpp 2015-07-06 11:31:41 +0000
@@ -373,8 +373,8 @@
       ol.writeString(" \n");
       ol.enable(OutputGenerator::RTF);

-      if (Config_getBool("REPEAT_BRIEF") ||
-          !documentation().isEmpty()
+      if ( (Config_getBool("REPEAT_BRIEF") || !documentation().isEmpty() ) &&
+          Config_getBool("USE_MORE_LINK")
          )
       {
         ol.disableAllBut(OutputGenerator::Html);

=== modified file 'src/memberdef.cpp'
--- src/memberdef.cpp   2015-07-06 11:29:12 +0000
+++ src/memberdef.cpp   2015-07-06 11:37:48 +0000
@@ -1805,22 +1805,24 @@
       {
         static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
         ol.pushGeneratorState();
-        ol.disableAllBut(OutputGenerator::Html);
-        //ol.endEmphasis();
-        ol.docify(" ");
-        if (separateMemberPages ||
-            (m_impl->group!=0 && gd==0) ||
-            (m_impl->nspace!=0 && nd==0)
-           ) // forward link to the page or group or namespace
-        {
-          ol.startTextLink(getOutputFileBase(),anchor());
-        }
-        else // local link
-        {
-          ol.startTextLink(0,anchor());
-        }
-        ol.parseText(theTranslator->trMore());
-        ol.endTextLink();
+        if (Config_getBool("USE_MORE_LINK")) {
+          ol.disableAllBut(OutputGenerator::Html);
+          //ol.endEmphasis();
+          ol.docify(" ");
+          if (separateMemberPages ||
+              (m_impl->group!=0 && gd==0) ||
+              (m_impl->nspace!=0 && nd==0)
+             ) // forward link to the page or group or namespace
+          {
+            ol.startTextLink(getOutputFileBase(),anchor());
+          }
+          else // local link
+          {
+            ol.startTextLink(0,anchor());
+          }
+          ol.parseText(theTranslator->trMore());
+          ol.endTextLink();
+        }
         //ol.startEmphasis();
         ol.popGeneratorState();
       }
+2
source

(An indicative answer, since this particular case is not what I ever needed to do.)

In case you want to delete all the detailed descriptions (and, therefore, presumably links to it), you can modify the "layout" file to make this section invisible.

Link: http://www.stack.nl/~dimitri/doxygen/manual/customize.html#layout

As an alternative..

, REPEAT_BRIEF. , , REPEAT_BRIEF , .

+1

It might have been a bit late, but I ran into the same problem and solved it easily, with the following doxyfile configuration:

ALWAYS_DETAILED_SEC = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = NO
EXTRACT_ALL = NO
# Since EXTRACT_ALL is NO, configure the following as you wish. In my case
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES

I hope this helps.

0
source

Source: https://habr.com/ru/post/1537125/


All Articles