summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2025-09-02 12:08:07 +0000
committerTopi Reinio <topi.reinio@qt.io>2025-09-03 12:38:52 +0000
commit41f16f4223da20f27bbafd7bbedf57c033b9c140 (patch)
treed1b6519fe17d0e05fd764d320a865900b55bc8a9
parent8c771289dda61aa879d3f690d107d2b3a0b05494 (diff)
QDoc: Deprecate command \tableofcontents
The command has not produced any output since `qdoc3` in Qt 4.x. Officially deprecate it; remove its documentation and display a deprecation notice when parsing the command. Drop use of the command from Qt Widgets Designer manual. Fixes: QTBUG-139277 Change-Id: I49c07b7ced436b16ab354215cd569c82d5b861a0 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--src/designer/src/designer/doc/src/designer-manual.qdoc1
-rw-r--r--src/qdoc/qdoc/doc/qdoc-manual-cmdindex.qdoc1
-rw-r--r--src/qdoc/qdoc/doc/qdoc-manual-markupcmds.qdoc10
-rw-r--r--src/qdoc/qdoc/src/qdoc/docparser.cpp2
4 files changed, 1 insertions, 13 deletions
diff --git a/src/designer/src/designer/doc/src/designer-manual.qdoc b/src/designer/src/designer/doc/src/designer-manual.qdoc
index ae76c8e43..9743179cd 100644
--- a/src/designer/src/designer/doc/src/designer-manual.qdoc
+++ b/src/designer/src/designer/doc/src/designer-manual.qdoc
@@ -1708,7 +1708,6 @@ pixmap property in the property editor.
parsing the XML file.
\endlist
- \tableofcontents
\section1 Compile Time Form Processing
You create user interface components with \QD and use Qt's integrated build tools,
diff --git a/src/qdoc/qdoc/doc/qdoc-manual-cmdindex.qdoc b/src/qdoc/qdoc/doc/qdoc-manual-cmdindex.qdoc
index 2a776afd2..54adc3395 100644
--- a/src/qdoc/qdoc/doc/qdoc-manual-cmdindex.qdoc
+++ b/src/qdoc/qdoc/doc/qdoc-manual-cmdindex.qdoc
@@ -130,7 +130,6 @@
\li \l {subtitle-command} {\\subtitle}
\li \l {sup-command} {\\sup}
\li \l {table-command} {\\table}
- \li \l {tableofcontents-command} {\\tableofcontents}
\li \l {target-command} {\\target}
\li \l {threadsafe-command} {\\threadsafe}
\li \l {title-command} {\\title}
diff --git a/src/qdoc/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/qdoc/qdoc/doc/qdoc-manual-markupcmds.qdoc
index e432b4a68..3e9260625 100644
--- a/src/qdoc/qdoc/doc/qdoc-manual-markupcmds.qdoc
+++ b/src/qdoc/qdoc/doc/qdoc-manual-markupcmds.qdoc
@@ -70,7 +70,6 @@
\li \l {sub-command} {\\sub}
\li \l {sup-command} {\\sup}
\li \l {table-command} {\\table}
- \li \l {tableofcontents-command} {\\tableofcontents}
\li \l {target-command} {\\target}
\li \qdoccmd tm
\li \l {tt-command} {\\tt}
@@ -2414,15 +2413,6 @@
This command was introduced in QDoc version 6.10.
- \target tableofcontents-command
- \section1 \\tableofcontents
-
- The \\tableofcontents command has been disabled because QDoc
- now generates a table of contents automatically.
-
- The automatically generated table of contents appears in the upper
- righthand corner of the page.
-
\target brief-command
\section1 \\brief
diff --git a/src/qdoc/qdoc/src/qdoc/docparser.cpp b/src/qdoc/qdoc/src/qdoc/docparser.cpp
index 8da6ef158..231bd0f91 100644
--- a/src/qdoc/qdoc/src/qdoc/docparser.cpp
+++ b/src/qdoc/qdoc/src/qdoc/docparser.cpp
@@ -975,7 +975,7 @@ void DocParser::parse(const QString &source, DocPrivate *docPrivate,
}
break;
case CMD_TABLEOFCONTENTS:
- // Ignore defunct command \tableofcontents. TODO: Remove entirely
+ location().report("\\%1 is deprecated and will be removed in a future version."_L1.arg(cmdName(cmd)));
if (isLeftBraceAhead())
getArgument();
break;