From 102ebf0ee78b43e73bf9a1292fd42060540cdb26 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Feb 2023 02:51:11 +0100 Subject: DocBook: introduce a member variable to enable 5.2 tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main goal is to make the code easier to read and check. This way, a bug was found: a reversed condition. Extensions are not supposed to be enabled by default, but still were for parts of the documentation. Pick-to: 6.5 Change-Id: I5425c658d8f8adb368a12967a679b0c09851cf6a Reviewed-by: Topi Reiniö Reviewed-by: Paul Wicking --- src/qdoc/qdoc/docbookgenerator.cpp | 5 +- src/qdoc/qdoc/docbookgenerator.h | 7 +- .../docbook/qml-qdoc-test-abstractparent.xml | 18 -- .../docbook/qml-qdoc-test-child.xml | 18 -- .../docbook/qml-qdoc-test-doctest.xml | 17 -- .../expected_output/docbook/qml-qdoc-test-type.xml | 91 +------- .../docbook/qml-qdoc-test-yetanotherchild.xml | 8 - .../docbook/qml-uicomponents-progressbar.xml | 40 ---- .../docbook/qml-uicomponents-switch.xml | 8 - .../docbook/qml-uicomponents-tabwidget.xml | 17 -- .../expected_output/docbook/testqdoc-test.xml | 183 ---------------- .../docbook/testqdoc-testderived.xml | 35 --- .../expected_output/docbook/testqdoc.xml | 9 - .../headerfile-docbook/testheader.xml | 31 --- .../properties-docbook/testqdoc-testderived.xml | 118 ----------- .../proxypage-docbook/stdpair-proxy.xml | 6 - .../qml-qdoc-test-parent.xml | 25 --- .../scopedenum-docbook/testqdoc-test.xml | 235 --------------------- 18 files changed, 10 insertions(+), 861 deletions(-) diff --git a/src/qdoc/qdoc/docbookgenerator.cpp b/src/qdoc/qdoc/docbookgenerator.cpp index 648a0a43d..d180aba01 100644 --- a/src/qdoc/qdoc/docbookgenerator.cpp +++ b/src/qdoc/qdoc/docbookgenerator.cpp @@ -156,6 +156,7 @@ void DocBookGenerator::initializeGenerator() m_naturalLanguage = QLatin1String("en"); m_buildVersion = m_config->get(CONFIG_BUILDVERSION).asString(); + m_useDocBook52 = m_config->get(CONFIG_DOCBOOKEXTENSIONS).asBool(); } QString DocBookGenerator::format() @@ -1227,7 +1228,7 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative) m_writer->writeEndElement(); // bridgehead newLine(); - if (m_config->get(CONFIG_DOCBOOKEXTENSIONS).asBool()) { + if (m_useDocBook52) { if (isStyleProperty) { m_writer->writeStartElement(dbNamespace, "fieldsynopsis"); @@ -3665,7 +3666,7 @@ void DocBookGenerator::generateDocBookSynopsis(const Node *node) // Generator::generateThreadSafeness, QDocIndexFiles::generateIndexSection. // This function is the only place where DocBook extensions are used. - if (m_config->get(CONFIG_DOCBOOKEXTENSIONS).asBool()) + if (!m_useDocBook52) return; // Nothing to export in some cases. Note that isSharedCommentNode() returns diff --git a/src/qdoc/qdoc/docbookgenerator.h b/src/qdoc/qdoc/docbookgenerator.h index fe9f9ba3a..be80f38c2 100644 --- a/src/qdoc/qdoc/docbookgenerator.h +++ b/src/qdoc/qdoc/docbookgenerator.h @@ -136,8 +136,9 @@ private: void generateSynopsisInfo(const QString &key, const QString &value); void generateModifier(const QString &value); - bool m_inListItemLineOpen {}; - int currentSectionLevel {}; + // Generator state when outputting the documentation. + bool m_inListItemLineOpen { false }; + int currentSectionLevel { 0 }; QStack sectionLevels {}; QString m_qflagsHref {}; bool m_inTeletype { false }; @@ -154,11 +155,13 @@ private: unsigned m_inList { 0 }; // Depth in number of nested lists. bool m_rewritingCustomQmlModuleSummary { false }; + // Generator configuration, set before starting the generation. QString m_project {}; QString m_projectDescription {}; QString m_naturalLanguage {}; QString m_buildVersion {}; QXmlStreamWriter *m_writer { nullptr }; + bool m_useDocBook52 { false }; // Enable tags from DocBook 5.2. Also called "extensions". Config *m_config { nullptr }; }; diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml index 154b70b0f..1691fbadf 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml @@ -36,28 +36,10 @@ Property Documentation [default] children : list<Child> - -list<Child> -children -writable -[default] - -public -active -unspecified - Children of the type. name : string - -string -name -writable -public -active -unspecified - Name of this parent. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml index 76df460b7..e3a347678 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml @@ -36,28 +36,10 @@ Property Documentation [default] children : list<Child> - -list<Child> -children -writable -[default] - -public -active -unspecified - Children of the type. name : string - -string -name -writable -public -active -unspecified - Name of this child. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml index d39a330bb..5091e0e27 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml @@ -34,14 +34,6 @@ Property Documentation [default: true] active : bool - -bool -active -writable -public -active -unspecified - Whether the test is active. See Also @@ -54,15 +46,6 @@ [required] name : string - -string -name -writable -required -public -active -unspecified - Name of the test. DocTest { name: &quot;test&quot; diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml index 4422b6962..4f846dfac 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml @@ -42,79 +42,21 @@ Property Documentation fifth : int - -int -fifth -writable -public -active -unspecified - -fourth : int -int -fourth -writable -public -active -unspecified - -A group of properties sharing a documentation comment. +fourth : intA group of properties sharing a documentation comment. group group group.first : int - -int -group.first -writable -public -active -unspecified - group.second : int - -int -group.second -writable -public -active -unspecified - group.third : int - -int -group.third -writable -public -active -unspecified - A property group. [read-only] id : int - -int -id -[read-only] - -public -active -unspecified - A read-only property. [required] name : string - -string -name -writable -required -public -active -unspecified - Name of the Test. @@ -122,15 +64,6 @@ Attached Property Documentation [default: Type.NoType] Type.type : enumeration - -enumeration -Type.type -attached -writable -public -active -unspecified - @@ -188,27 +121,7 @@ Method Documentation disable() - - -disable - -qmlmethod -disable() -public -active -unspecified - -enable() - -enable - -qmlmethod -enable() -public -active -unspecified - -Enables or disables this type. +enable()Enables or disables this type. Type copy(a) diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml index 34264b735..492e1b64e 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml @@ -30,14 +30,6 @@ Property Documentation prop : int - -int -prop -writable -public -active -unspecified - Propagated to inheriting type docs. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml index cd0945ec1..ac48b6471 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml @@ -26,14 +26,6 @@ Property Documentation color : color - -color -color -writable -public -active -unspecified - The color of the ProgressBar's gradient. Must bind to a color type. See Also @@ -46,38 +38,14 @@ maximum : int - -int -maximum -writable -public -active -unspecified - The maximum value of the ProgressBar range. The value must not be more than this value. minimum : int - -int -minimum -writable -public -active -unspecified - The minimum value of the ProgressBar range. The value must not be less than this value. secondColor : color - -color -secondColor -writable -public -active -unspecified - The second color of the ProgressBar's gradient. Must bind to a color type. See Also @@ -90,14 +58,6 @@ value : int - -int -value -writable -public -active -unspecified - The value of the progress. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml index 65992be73..6c9d4a0f6 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml @@ -26,14 +26,6 @@ Property Documentation on : bool - -bool -on -writable -public -active -unspecified - Indicates the state of the switch. If false, then the switch is in the off state. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml index 61644e64d..e051ba196 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml @@ -46,27 +46,10 @@ Property Documentation current : int - -int -current -writable -public -active -unspecified - The currently active tab in the TabWidget. [read-only] sampleReadOnlyProperty : int - -int -sampleReadOnlyProperty -[read-only] - -public -active -unspecified - A sample read-only property. A contrived property to demonstrate QDoc's ability to detect read-only properties. The signature is: readonly property int sampleReadOnlyProperty: 0 diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml index 06b8f5816..12b574d2a 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml @@ -57,12 +57,6 @@ Member Type Documentation Test::SomeType - -SomeType -public -active -unspecified - A typedef. @@ -75,65 +69,18 @@ [noexcept default] Test::Test() - -Test - -default -constructor -Test() = default -public -active -unspecified - Default constructor. void (*)(bool) Test::funcPtr(bool b, const char *s) - -void (*)(bool) -funcPtr - -bool -b - - -const char * -s - -plain -void (*)(bool) funcPtr(bool b, const char *s) -public -active -unspecified - Returns a pointer to a function that takes a boolean. Uses b and s. void Test::inlineFunction() - - -inlineFunction - -plain -void inlineFunction() -public -active -unspecified - An inline function, documented using the \fn QDoc command. void Test::methodWithEmDashInItsDocs() - - -methodWithEmDashInItsDocs - -plain -void methodWithEmDashInItsDocs() -public -active -unspecified - This method has em dashes in its documentation—as you'll find represented by --- in the sources—here and there. The important bit to note is that when passed e.g. to the \c command, the three hyphens are processed as input to the command and not replaced by an em dash. ----------------------------------------------------------------------- People can still add a bunch of dashes, though, without QDoc replacing them all with a series of em dashes. @@ -149,16 +96,6 @@ void Test::methodWithEnDashInItsDocs() - - -methodWithEnDashInItsDocs - -plain -void methodWithEnDashInItsDocs() -public -active -unspecified - This method has en dashes in its documentation – as you'll find represented by -- in the sources – here and there. The important bit to note is that when passed e.g. to the \c command, the two hyphens are processed as input to the command and not replaced by an en dash. This also applies to code blocks, where otherwise, the decrement operator would get completely borked: for (int i = 42; i &gt; 0; --i) // Do something cool during countdown. @@ -178,79 +115,18 @@ int Test::someFunction(int, int v = 0) - -int -someFunction - -int - - - -int -v -0 - -plain -int someFunction(int, int v) -public -active -unspecified - Function that takes a parameter v. Also returns the value of v. void Test::someFunctionDefaultArg(int i, bool b = false) - - -someFunctionDefaultArg - -int -i - - -bool -b -false - -plain -void someFunctionDefaultArg(int i, bool b) -public -active -unspecified - Function that takes a parameter i and b. [virtual] void Test::virtualFun() - -virtual - -virtualFun - -plain -void virtualFun() -public -active -unspecified - Function that must be reimplemented. [noexcept default] TestQDoc::Test &Test::operator=(TestQDoc::Test &&other) - -TestQDoc::Test & -operator= - -TestQDoc::Test && -other - -default -move-assign -TestQDoc::Test & operator=(TestQDoc::Test &&other) = default -public -active -unspecified - Move-assigns other. @@ -258,23 +134,6 @@ Related Non-Members bool operator==(const TestQDoc::Test &lhs, const TestQDoc::Test &rhs) - -bool -operator== - -const TestQDoc::Test & -lhs - - -const TestQDoc::Test & -rhs - -plain -bool operator==(const TestQDoc::Test &lhs, const TestQDoc::Test &rhs) -public -active -unspecified - Returns true if lhs and rhs are equal. @@ -282,18 +141,6 @@ Macro Documentation [since Test 1.1] QDOCTEST_MACRO2(int &x) - -QDOCTEST_MACRO2 - -int & -x - -macrowithparams -QDOCTEST_MACRO2(int &x) -public -active -unspecified - A macro with argument x. This macro was introduced in Test 1.1. @@ -310,46 +157,16 @@ void Test::anotherObsoleteMember() - - -anotherObsoleteMember - -plain -void anotherObsoleteMember() -public -deprecated -unspecified - This function is deprecated. We strongly advise against using it in new code. Use obsoleteMember() instead. void Test::deprecatedMember() - - -deprecatedMember - -plain -void deprecatedMember() -public -deprecated -unspecified - This function is deprecated since 6.0. We strongly advise against using it in new code. Use someFunction() instead. void Test::obsoleteMember() - - -obsoleteMember - -plain -void obsoleteMember() -public -deprecated -unspecified - This function is deprecated. We strongly advise against using it in new code. Use someFunction() instead. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml index 5b792c60d..e28f7f70d 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml @@ -50,22 +50,10 @@ Member Type Documentation [alias] TestDerived::DerivedType - -DerivedType -public -active -unspecified - An aliased typedef. [alias] TestDerived::NotTypedef - -NotTypedef -public -active -unspecified - I'm an alias, not a typedef. @@ -73,18 +61,6 @@ Member Function Documentation [override virtual] void TestDerived::virtualFun() - -virtual - -virtualFun - -override -plain -void virtualFun() override -public -active -unspecified - Reimplements: Test::virtualFun(). @@ -95,17 +71,6 @@ Obsolete Member Function Documentation [static] void TestDerived::staticObsoleteMember() - -static - -staticObsoleteMember - -plain -void staticObsoleteMember() -public -deprecated -unspecified - This function is deprecated. We strongly advise against using it in new code. Static obsolete method. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml index 7fd926ed1..a00553748 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml @@ -58,15 +58,6 @@ Macro Documentation QDOCTEST_MACRO - -QDOCTEST_MACRO - -macrowithoutparams -QDOCTEST_MACRO -public -active -unspecified - diff --git a/tests/auto/qdoc/generatedoutput/expected_output/headerfile-docbook/testheader.xml b/tests/auto/qdoc/generatedoutput/expected_output/headerfile-docbook/testheader.xml index bfedd98d6..e4edd0fc0 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/headerfile-docbook/testheader.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/headerfile-docbook/testheader.xml @@ -30,20 +30,6 @@ Type Documentation enum Globals - -Globals - -Glo -0 - - -Bal -1 - -public -active -unspecified - @@ -69,13 +55,6 @@ Variable Documentation const int globalVar - -const int -globalVar -public -active -unspecified - Global variable. @@ -83,16 +62,6 @@ Function Documentation void globalFunc() - - -globalFunc - -plain -void globalFunc() -public -active -unspecified - Global function. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties-docbook/testqdoc-testderived.xml b/tests/auto/qdoc/generatedoutput/expected_output/properties-docbook/testqdoc-testderived.xml index d1532260c..805930fb0 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/properties-docbook/testqdoc-testderived.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/properties-docbook/testqdoc-testderived.xml @@ -62,22 +62,10 @@ Member Type Documentation [alias] TestDerived::DerivedType - -DerivedType -public -active -unspecified - An aliased typedef. [alias] TestDerived::NotTypedef - -NotTypedef -public -active -unspecified - I'm an alias, not a typedef. @@ -85,34 +73,11 @@ Property Documentation [bindable] bindableProp : QString - -(Qt property) -QString -bindableProp -public -active -unspecified -bindableProp -setBindableProp -bindablePropChanged - This property supports QProperty bindings. Some property. boolProp : bool - -(Qt property) -bool -boolProp -public -active -unspecified -boolProp -setBoolProp -resetBoolProp -boolPropChanged - A boolean property. Access functions: @@ -141,15 +106,6 @@ [read-only] intProp : int* const - -(Qt property) -int* -intProp -public -active -unspecified -getInt - An integer property. Access functions: @@ -163,15 +119,6 @@ [read-only] name : const QString* - -(Qt property) -const QString* -name -public -active -unspecified -name - This property holds a name. Access functions: @@ -185,15 +132,6 @@ [bindable read-only] someProp : QString - -(Qt property) -QString -someProp -public -active -unspecified -someProp - This property supports QProperty bindings. Another property. @@ -202,49 +140,16 @@ Member Function Documentation [private signal] void TestDerived::emitSomething() - - -emitSomething - -signal -void emitSomething() -public -active -unspecified - Emitted when things happen. This is a private signal. It can be used in signal connections but cannot be emitted by the user. [override virtual] int TestDerived::id() - -virtual -int -id - -override -plain -int id() override -public -active -unspecified - Reimplements an access function for property: Test::id. [invokable] void TestDerived::invokeMe() const - -const - -invokeMe - -plain -void invokeMe() const -public -active -unspecified - Something invokable. This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE. @@ -252,18 +157,6 @@ [override virtual] void TestDerived::virtualFun() - -virtual - -virtualFun - -override -plain -void virtualFun() override -public -active -unspecified - Reimplements: Test::virtualFun(). @@ -274,17 +167,6 @@ Obsolete Member Function Documentation [static] void TestDerived::staticObsoleteMember() - -static - -staticObsoleteMember - -plain -void staticObsoleteMember() -public -deprecated -unspecified - This function is deprecated. We strongly advise against using it in new code. Static obsolete method. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/proxypage-docbook/stdpair-proxy.xml b/tests/auto/qdoc/generatedoutput/expected_output/proxypage-docbook/stdpair-proxy.xml index c62e6ef70..7dbbc54c1 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/proxypage-docbook/stdpair-proxy.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/proxypage-docbook/stdpair-proxy.xml @@ -11,12 +11,6 @@ Type Documentation [alias] template <class T1, class T2> StdPair - -StdPair -public -active -unspecified - diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qmlpropertygroups-docbook/qml-qdoc-test-parent.xml b/tests/auto/qdoc/generatedoutput/expected_output/qmlpropertygroups-docbook/qml-qdoc-test-parent.xml index c5fa99777..e223892b1 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/qmlpropertygroups-docbook/qml-qdoc-test-parent.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/qmlpropertygroups-docbook/qml-qdoc-test-parent.xml @@ -37,33 +37,8 @@ group group group.a : int - -int -group.a -writable -public -active -unspecified - [read-only] group.b : int - -int -group.b -[read-only] - -public -active -unspecified - [since 2.0] group.c : int - -int -group.c -writable -public -active -unspecified - Property group. diff --git a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml index 5c3cef465..4710a4cf5 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml @@ -57,28 +57,6 @@ Member Type Documentation enum Test::ClassicEnum - -ClassicEnum - -Yee -0 - - -Haw -1 - - -Howdy -2 - - -Partner -3 - -public -active -unspecified - @@ -113,36 +91,6 @@ enum Test::ScopedEnum - -ScopedEnum - -This -0x01 - - -That -0x02 - - -All -This | That - - -OmittedValue -99 - - -UselessValue -100 - - -VeryLastValue -101 - -public -active -unspecified - @@ -183,12 +131,6 @@ Test::SomeType - -SomeType -public -active -unspecified - A typedef. @@ -201,65 +143,18 @@ [noexcept default] Test::Test() - -Test - -default -constructor -Test() = default -public -active -unspecified - Default constructor. void (*)(bool) Test::funcPtr(bool b, const char *s) - -void (*)(bool) -funcPtr - -bool -b - - -const char * -s - -plain -void (*)(bool) funcPtr(bool b, const char *s) -public -active -unspecified - Returns a pointer to a function that takes a boolean. Uses b and s. void Test::inlineFunction() - - -inlineFunction - -plain -void inlineFunction() -public -active -unspecified - An inline function, documented using the \fn QDoc command. void Test::methodWithEmDashInItsDocs() - - -methodWithEmDashInItsDocs - -plain -void methodWithEmDashInItsDocs() -public -active -unspecified - This method has em dashes in its documentation—as you'll find represented by --- in the sources—here and there. The important bit to note is that when passed e.g. to the \c command, the three hyphens are processed as input to the command and not replaced by an em dash. ----------------------------------------------------------------------- People can still add a bunch of dashes, though, without QDoc replacing them all with a series of em dashes. @@ -275,16 +170,6 @@ void Test::methodWithEnDashInItsDocs() - - -methodWithEnDashInItsDocs - -plain -void methodWithEnDashInItsDocs() -public -active -unspecified - This method has en dashes in its documentation – as you'll find represented by -- in the sources – here and there. The important bit to note is that when passed e.g. to the \c command, the two hyphens are processed as input to the command and not replaced by an en dash. This also applies to code blocks, where otherwise, the decrement operator would get completely borked: for (int i = 42; i &gt; 0; --i) // Do something cool during countdown. @@ -304,79 +189,18 @@ int Test::someFunction(int, int v = 0) - -int -someFunction - -int - - - -int -v -0 - -plain -int someFunction(int, int v) -public -active -unspecified - Function that takes a parameter v. Also returns the value of v. void Test::someFunctionDefaultArg(int i, bool b = false) - - -someFunctionDefaultArg - -int -i - - -bool -b -false - -plain -void someFunctionDefaultArg(int i, bool b) -public -active -unspecified - Function that takes a parameter i and b. [virtual] void Test::virtualFun() - -virtual - -virtualFun - -plain -void virtualFun() -public -active -unspecified - Function that must be reimplemented. [noexcept default] TestQDoc::Test &Test::operator=(TestQDoc::Test &&other) - -TestQDoc::Test & -operator= - -TestQDoc::Test && -other - -default -move-assign -TestQDoc::Test & operator=(TestQDoc::Test &&other) = default -public -active -unspecified - Move-assigns other. @@ -384,23 +208,6 @@ Related Non-Members bool operator==(const TestQDoc::Test &lhs, const TestQDoc::Test &rhs) - -bool -operator== - -const TestQDoc::Test & -lhs - - -const TestQDoc::Test & -rhs - -plain -bool operator==(const TestQDoc::Test &lhs, const TestQDoc::Test &rhs) -public -active -unspecified - Returns true if lhs and rhs are equal. @@ -408,18 +215,6 @@ Macro Documentation [since Test 1.1] QDOCTEST_MACRO2(int &x) - -QDOCTEST_MACRO2 - -int & -x - -macrowithparams -QDOCTEST_MACRO2(int &x) -public -active -unspecified - A macro with argument x. This macro was introduced in Test 1.1. @@ -436,46 +231,16 @@ void Test::anotherObsoleteMember() - - -anotherObsoleteMember - -plain -void anotherObsoleteMember() -public -deprecated -unspecified - This function is deprecated. We strongly advise against using it in new code. Use obsoleteMember() instead. void Test::deprecatedMember() - - -deprecatedMember - -plain -void deprecatedMember() -public -deprecated -unspecified - This function is deprecated since 6.0. We strongly advise against using it in new code. Use someFunction() instead. void Test::obsoleteMember() - - -obsoleteMember - -plain -void obsoleteMember() -public -deprecated -unspecified - This function is deprecated. We strongly advise against using it in new code. Use someFunction() instead. -- cgit v1.2.1