summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2020-03-11 14:58:45 +0100
committerPaul Wicking <paul.wicking@qt.io>2020-03-11 14:59:43 +0100
commitc0124a943b2afdc99f717fc9a8f70b0ed998e087 (patch)
treeb5cfdb64950e994cc14a47ae80ac7ccd0b7be9fb
parent0bb8b0d3451decf0fa00c902a63a9ef4319c49ef (diff)
parent98a4e4291da098b19a4a60fa8dbfcbdfa3b6a123 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
-rw-r--r--src/designer/src/components/formeditor/formwindowsettings.cpp7
-rw-r--r--src/distancefieldgenerator/distancefieldmodel.h1
-rw-r--r--src/qdoc/clangcodeparser.cpp7
-rw-r--r--src/qdoc/codeparser.cpp39
-rw-r--r--src/qdoc/cppcodeparser.cpp4
-rw-r--r--src/qdoc/doc/files/basicqt.qdoc.sample3
-rw-r--r--src/qdoc/doc/qa-pages.qdoc1
-rw-r--r--src/qdoc/doc/qdoc-manual-cmdindex.qdoc2
-rw-r--r--src/qdoc/doc/qdoc-manual-contextcmds.qdoc16
-rw-r--r--src/qdoc/doc/qdoc-manual-intro.qdoc1
-rw-r--r--src/qdoc/doc/qdoc-manual-markupcmds.qdoc10
-rw-r--r--src/qdoc/doc/qdoc-manual-qdocconf.qdoc9
-rw-r--r--src/qdoc/doc/qdoc-manual-topiccmds.qdoc1
-rw-r--r--src/qdoc/docbookgenerator.cpp154
-rw-r--r--src/qdoc/docbookgenerator.h4
-rw-r--r--src/qdoc/generator.cpp137
-rw-r--r--src/qdoc/generator.h6
-rw-r--r--src/qdoc/helpprojectwriter.cpp127
-rw-r--r--src/qdoc/helpprojectwriter.h4
-rw-r--r--src/qdoc/htmlgenerator.cpp55
-rw-r--r--src/qdoc/htmlgenerator.h1
-rw-r--r--src/qdoc/main.cpp10
-rw-r--r--src/qdoc/qdocindexfiles.cpp2
-rw-r--r--tests/auto/qdoc/config/config.pro16
-rw-r--r--tests/auto/qdoc/config/tst_config.cpp85
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml14
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml1
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html1
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html3
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html14
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html1
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html1
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/test.qhp137
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/testcpp.index39
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html1
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf4
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/examples-qhp.qdocconf17
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf4
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf6
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc14
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf2
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc15
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc18
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp3
-rw-r--r--tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp26
-rw-r--r--tests/auto/qdoc/qdoc.pro3
-rw-r--r--tests/auto/qdoc/utilities/tst_utilities.cpp89
-rw-r--r--tests/auto/qdoc/utilities/utilities.pro12
52 files changed, 763 insertions, 376 deletions
diff --git a/src/designer/src/components/formeditor/formwindowsettings.cpp b/src/designer/src/components/formeditor/formwindowsettings.cpp
index de03c6792..3e24b7623 100644
--- a/src/designer/src/components/formeditor/formwindowsettings.cpp
+++ b/src/designer/src/components/formeditor/formwindowsettings.cpp
@@ -108,12 +108,13 @@ void FormWindowData::fromFormWindow(FormWindowBase* fw)
defaultMargin = defaultSpacing = INT_MIN;
fw->layoutDefault(&defaultMargin, &defaultSpacing);
- QStyle *style = fw->formContainer()->style();
+ auto container = fw->formContainer();
+ QStyle *style = container->style();
layoutDefaultEnabled = defaultMargin != INT_MIN || defaultSpacing != INT_MIN;
if (defaultMargin == INT_MIN)
- defaultMargin = style->pixelMetric(QStyle::PM_DefaultChildMargin, nullptr);
+ defaultMargin = style->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr, container);
if (defaultSpacing == INT_MIN)
- defaultSpacing = style->pixelMetric(QStyle::PM_DefaultLayoutSpacing, nullptr);
+ defaultSpacing = style->pixelMetric(QStyle::PM_LayoutHorizontalSpacing, nullptr);
marginFunction.clear();
diff --git a/src/distancefieldgenerator/distancefieldmodel.h b/src/distancefieldgenerator/distancefieldmodel.h
index b866e5e6a..5c71a20ab 100644
--- a/src/distancefieldgenerator/distancefieldmodel.h
+++ b/src/distancefieldgenerator/distancefieldmodel.h
@@ -31,6 +31,7 @@
#include <QAbstractListModel>
#include <QRawFont>
+#include <QtGui/qpainterpath.h>
#include <QtGui/private/qtextengine_p.h>
#include <QMultiHash>
#include <QScopedPointer>
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp
index fe2a0bca0..a3d39dbd2 100644
--- a/src/qdoc/clangcodeparser.cpp
+++ b/src/qdoc/clangcodeparser.cpp
@@ -1310,7 +1310,7 @@ void ClangCodeParser::buildPCH()
const QByteArray module = moduleHeader().toUtf8();
QByteArray header;
QByteArray privateHeaderDir;
- qCInfo(lcQdoc) << "Build & visit PCH for " << moduleHeader();
+ qCDebug(lcQdoc) << "Build and visit PCH for" << moduleHeader();
// A predicate for std::find_if() to locate a path to the module's header
// (e.g. QtGui/QtGui) to be used as pre-compiled header
struct FindPredicate
@@ -1413,7 +1413,7 @@ void ClangCodeParser::buildPCH()
auto error = clang_saveTranslationUnit(tu, pchName_.constData(),
clang_defaultSaveOptions(tu));
if (error) {
- qCCritical(lcQdoc) << "Could not save PCH file for " << moduleHeader();
+ qCCritical(lcQdoc) << "Could not save PCH file for" << moduleHeader();
pchName_.clear();
} else {
// Visit the header now, as token from pre-compiled header won't be visited
@@ -1421,7 +1421,7 @@ void ClangCodeParser::buildPCH()
CXCursor cur = clang_getTranslationUnitCursor(tu);
ClangVisitor visitor(qdb_, allHeaders_);
visitor.visitChildren(cur);
- qCInfo(lcQdoc) << "PCH built & visited for " << moduleHeader();
+ qCDebug(lcQdoc) << "PCH built and visited for" << moduleHeader();
}
clang_disposeTranslationUnit(tu);
} else {
@@ -1586,6 +1586,7 @@ void ClangCodeParser::parseSourceFile(const Location & /*location*/, const QStri
clang_disposeTokens(tu, tokens, numTokens);
clang_disposeTranslationUnit(tu);
clang_disposeIndex(index_);
+ namespaceScope_.clear();
}
/*!
diff --git a/src/qdoc/codeparser.cpp b/src/qdoc/codeparser.cpp
index db2d0df97..648a2de22 100644
--- a/src/qdoc/codeparser.cpp
+++ b/src/qdoc/codeparser.cpp
@@ -269,25 +269,28 @@ bool CodeParser::isParsingQdoc() const
void CodeParser::checkModuleInclusion(Node *n)
{
if (n->physicalModuleName().isEmpty()) {
- qdb_->addToModule(Generator::defaultModuleName(), n);
- QString word;
- switch (n->nodeType()) {
- case Node::Class:
- word = QLatin1String("Class");
- break;
- case Node::Struct:
- word = QLatin1String("Struct");
- break;
- case Node::Union:
- word = QLatin1String("Union");
- break;
- case Node::Namespace:
- word = QLatin1String("Namespace");
- break;
- default:
- return;
- }
+ n->setPhysicalModuleName(Generator::defaultModuleName());
+
if (n->isInAPI() && !n->name().isEmpty()) {
+ QString word;
+ switch (n->nodeType()) {
+ case Node::Class:
+ word = QLatin1String("Class");
+ break;
+ case Node::Struct:
+ word = QLatin1String("Struct");
+ break;
+ case Node::Union:
+ word = QLatin1String("Union");
+ break;
+ case Node::Namespace:
+ word = QLatin1String("Namespace");
+ break;
+ default:
+ return;
+ }
+
+ qdb_->addToModule(Generator::defaultModuleName(), n);
n->doc().location().warning(tr("%1 %2 has no \\inmodule command; "
"using project name by default: %3")
.arg(word)
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp
index dec081c22..647631c27 100644
--- a/src/qdoc/cppcodeparser.cpp
+++ b/src/qdoc/cppcodeparser.cpp
@@ -33,8 +33,9 @@
#include "cppcodeparser.h"
#include "config.h"
-#include "qdocdatabase.h"
#include "generator.h"
+#include "loggingcategory.h"
+#include "qdocdatabase.h"
#include <QtCore/qdebug.h>
#include <QtCore/qfile.h>
@@ -559,6 +560,7 @@ void CppCodeParser::processMetaCommand(const Doc &doc, const QString &command,
}
}
} else if (command == COMMAND_CONTENTSPAGE) {
+ qCWarning(lcQdoc, "(qdoc) The \\contentspage command is obsolete and should not be used.");
setLink(node, Node::ContentsLink, arg);
} else if (command == COMMAND_NEXTPAGE) {
setLink(node, Node::NextLink, arg);
diff --git a/src/qdoc/doc/files/basicqt.qdoc.sample b/src/qdoc/doc/files/basicqt.qdoc.sample
index ce8df096f..1243387b2 100644
--- a/src/qdoc/doc/files/basicqt.qdoc.sample
+++ b/src/qdoc/doc/files/basicqt.qdoc.sample
@@ -1,6 +1,5 @@
/*!
\page basicqt.html
- \contentspage {Basic Qt} {Contents}
\nextpage Getting Started
\indexpage Index
@@ -24,7 +23,6 @@
/*!
\page gettingstarted.html
\previouspage Basic Qt
- \contentspage {Basic Qt} {Contents}
\nextpage Creating Dialogs
\indexpage Index
@@ -40,7 +38,6 @@
/ *!
\page creatingdialogs.html
\previouspage Getting Started
- \contentspage {Basic Qt} {Contents}
\indexpage Index
\startpage Basic Qt
diff --git a/src/qdoc/doc/qa-pages.qdoc b/src/qdoc/doc/qa-pages.qdoc
index c69b1cdc6..1e3ca19f4 100644
--- a/src/qdoc/doc/qa-pages.qdoc
+++ b/src/qdoc/doc/qa-pages.qdoc
@@ -28,7 +28,6 @@
/*!
\page 28-qdoc-qa-pages.html
\previouspage The QDoc Configuration File
- \contentspage QDoc Manual
\nextpage QDoc Manual
\title QA Pages
diff --git a/src/qdoc/doc/qdoc-manual-cmdindex.qdoc b/src/qdoc/doc/qdoc-manual-cmdindex.qdoc
index 672c2e409..77a3266fb 100644
--- a/src/qdoc/doc/qdoc-manual-cmdindex.qdoc
+++ b/src/qdoc/doc/qdoc-manual-cmdindex.qdoc
@@ -28,7 +28,6 @@
/*!
\page 27-qdoc-commands-alphabetical.html
\previouspage Introduction to QDoc
- \contentspage QDoc Manual
\nextpage Topic Commands
\title Command Index
@@ -49,7 +48,6 @@
\li \l {class-command} {\\class}
\li \l {code-command} {\\code}
\li \l {codeline-command} {\\codeline}
- \li \l {contentspage-command} {\\contentspage}
\li \l {default-command} {\\default}
\li \l {div-command} {\\div}
\li \l {dots-command} {\\dots}
diff --git a/src/qdoc/doc/qdoc-manual-contextcmds.qdoc b/src/qdoc/doc/qdoc-manual-contextcmds.qdoc
index f020035d3..3d69e76a6 100644
--- a/src/qdoc/doc/qdoc-manual-contextcmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-contextcmds.qdoc
@@ -28,7 +28,6 @@
/*!
\page 14-qdoc-commands-contextcommands.html
\previouspage Topic Commands
- \contentspage QDoc Manual
\nextpage Document Navigation
\title Context Commands
@@ -47,7 +46,6 @@
\list
\li \l {abstract-command} {\\abstract}
- \li \l {contentspage-command}{\\contentspage},
\li \l {ingroup-command}{\\ingroup},
\li \l {inherits-command}{\\inherits},
\li \l {inmodule-command}{\\inmodule},
@@ -74,7 +72,6 @@
/*!
\page 15-qdoc-commands-navigation.html
\previouspage Context Commands
- \contentspage QDoc Manual
\nextpage Status
\title Document Navigation
@@ -169,20 +166,11 @@
documentation. The generated link type tells browsers and search
engines which document is considered by the author to be the
starting point of the collection.
-
- \target contentspage-command
- \section2 \\contentspage
-
- The \\contentspage command links the current page to a table of
- contents page. The command follows the same syntax and argument
- convention as the \l {previouspage-command} {\\previouspage}
- command.
*/
/*!
\page 16-qdoc-commands-status.html
\previouspage Document Navigation
- \contentspage QDoc Manual
\nextpage Thread Support
\title Status
@@ -441,7 +429,6 @@
/*!
\page 17-qdoc-commands-thread.html
\previouspage Status
- \contentspage QDoc Manual
\nextpage Relating Things
\title Thread Support
@@ -621,7 +608,6 @@
/*!
\page 18-qdoc-commands-relating.html
\previouspage Thread Support
- \contentspage QDoc Manual
\nextpage Grouping Things
\title Relating Things
@@ -808,7 +794,6 @@
/*!
\page 19-qdoc-commands-grouping.html
\previouspage Relating Things
- \contentspage QDoc Manual
\nextpage Naming Things
\title Grouping Things
@@ -890,7 +875,6 @@
/*!
\page 20-qdoc-commands-namingthings.html
\previouspage Grouping Things
- \contentspage QDoc Manual
\nextpage Markup Commands
\title Naming Things
diff --git a/src/qdoc/doc/qdoc-manual-intro.qdoc b/src/qdoc/doc/qdoc-manual-intro.qdoc
index 7ea3f1e36..a943863a6 100644
--- a/src/qdoc/doc/qdoc-manual-intro.qdoc
+++ b/src/qdoc/doc/qdoc-manual-intro.qdoc
@@ -27,7 +27,6 @@
/*!
\page 01-qdoc-manual.html
- \contentspage QDoc Manual
\previouspage QDoc Manual
\nextpage Command Index
diff --git a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
index 386501cd3..6fc16c9e1 100644
--- a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
@@ -27,7 +27,6 @@
/*!
\page 03-qdoc-commands-markup.html
- \contentspage QDoc Manual
\previouspage Naming Things
\nextpage Text Markup
@@ -109,7 +108,6 @@
/*!
\page 04-qdoc-commands-textmarkup.html
- \contentspage QDoc Manual
\previouspage Markup Commands
\nextpage Document Structure
@@ -659,7 +657,6 @@
/*!
\page 05-qdoc-commands-documentstructure.html
\previouspage Text Markup
- \contentspage QDoc Manual
\nextpage Including Code Inline
\title Document Structure
@@ -858,7 +855,6 @@
/*!
\page 06-qdoc-commands-includecodeinline.html
\previouspage Document Structure
- \contentspage QDoc Manual
\nextpage Including External Code
\title Including Code Inline
@@ -1091,7 +1087,6 @@
/*!
\page 07-0-qdoc-commands-includingexternalcode.html
\previouspage Including Code Inline
- \contentspage QDoc Manual
\nextpage Creating Links
\title Including External Code
@@ -1722,7 +1717,6 @@
/*!
\page 08-qdoc-commands-creatinglinks.html
\previouspage Including External Code
- \contentspage QDoc Manual
\nextpage Including Images
\title Creating Links
@@ -2119,7 +2113,6 @@
/*!
\page 09-qdoc-commands-includingimages.html
\previouspage Creating Links
- \contentspage QDoc Manual
\nextpage Tables and Lists
\title Including Images
@@ -2316,7 +2309,6 @@
/*!
\page 10-qdoc-commands-tablesandlists.html
\previouspage Including Images
- \contentspage QDoc Manual
\nextpage Special Content
\title Tables and Lists
@@ -2857,7 +2849,6 @@
/*!
\page 11-qdoc-commands-specialcontent.html
\previouspage Tables and Lists
- \contentspage QDoc Manual
\nextpage Miscellaneous
\title Special Content
@@ -3292,7 +3283,6 @@
/*!
\page 12-0-qdoc-commands-miscellaneous.html
\previouspage Special Content
- \contentspage QDoc Manual
\nextpage The QDoc Configuration File
\title Miscellaneous
diff --git a/src/qdoc/doc/qdoc-manual-qdocconf.qdoc b/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
index 62ac13c28..d15fd5515 100644
--- a/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
+++ b/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
@@ -28,7 +28,6 @@
/*!
\page 21-0-qdoc-configuration.html
\previouspage Miscellaneous
- \contentspage QDoc Manual
\nextpage Generic Configuration Variables
\title The QDoc Configuration File
@@ -151,7 +150,6 @@
/*!
\page 22-qdoc-configuration-generalvariables.html
\previouspage The QDoc Configuration File
- \contentspage QDoc Manual
\nextpage Creating Help Project Files
\title Generic Configuration Variables
@@ -1317,7 +1315,6 @@
/*!
\page 22-creating-help-project-files.html
\previouspage Generic Configuration Variables
- \contentspage QDoc Manual
\nextpage C++ Specific Configuration Variables
\title Creating Help Project Files
@@ -1451,7 +1448,6 @@
/*!
\page 23-qdoc-configuration-cppvariables.html
\previouspage Creating Help Project Files
- \contentspage QDoc Manual
\nextpage Format-specific Configuration Variables
\title C++ Specific Configuration Variables
@@ -1562,7 +1558,6 @@
/*!
\page 24-qdoc-configuration-htmlvariables.html
\previouspage C++ Specific Configuration Variables
- \contentspage QDoc Manual
\nextpage Supporting Derived Projects
\keyword HTML Specific Configuration Variables
@@ -1713,7 +1708,6 @@
/*!
\page 25-qdoc-configuration-derivedprojects.html
\previouspage Format-specific Configuration Variables
- \contentspage QDoc Manual
\nextpage Example Manifest Files
\title Supporting Derived Projects
@@ -1871,7 +1865,6 @@
/*!
\page 26-qdoc-configuration-example-manifest-files.html
\previouspage Supporting Derived Projects
- \contentspage QDoc Manual
\title Example Manifest Files
@@ -1953,7 +1946,6 @@
/*!
\page 21-1-minimum-qdocconf.html
\previouspage qtgui.qdocconf
- \contentspage QDoc Manual
\nextpage The QDoc Configuration File
\title minimum.qdocconf
@@ -1964,7 +1956,6 @@
/*!
\page 21-2-qtgui-qdocconf.html
\previouspage Supporting Derived Projects
- \contentspage QDoc Manual
\nextpage minimum.qdocconf
\title qtgui.qdocconf
diff --git a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
index 5902d376e..63a500ae1 100644
--- a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
@@ -28,7 +28,6 @@
/*!
\page 13-qdoc-commands-topics.html
\previouspage Command Index
- \contentspage QDoc Manual
\nextpage Context Commands
\title Topic Commands
diff --git a/src/qdoc/docbookgenerator.cpp b/src/qdoc/docbookgenerator.cpp
index 5f8d961f8..063065511 100644
--- a/src/qdoc/docbookgenerator.cpp
+++ b/src/qdoc/docbookgenerator.cpp
@@ -2076,27 +2076,28 @@ bool DocBookGenerator::generateThreadSafeness(const Node *node)
void DocBookGenerator::generateBody(const Node *node)
{
// From Generator::generateBody, without warnings.
+ const FunctionNode *fn = node->isFunction() ? static_cast<const FunctionNode *>(node) : nullptr;
+
if (!node->hasDoc() && !node->hasSharedDoc()) {
/*
Test for special function, like a destructor or copy constructor,
that has no documentation.
*/
- if (node->nodeType() == Node::Function) {
- const auto func = static_cast<const FunctionNode *>(node);
+ if (fn) {
QString t;
- if (func->isDtor()) {
- t = "Destroys the instance of " + func->parent()->name() + ".";
- if (func->isVirtual())
+ if (fn->isDtor()) {
+ t = "Destroys the instance of " + fn->parent()->name() + ".";
+ if (fn->isVirtual())
t += " The destructor is virtual.";
- } else if (func->isCtor()) {
- t = "Default constructs an instance of " + func->parent()->name() + ".";
- } else if (func->isCCtor()) {
+ } else if (fn->isCtor()) {
+ t = "Default constructs an instance of " + fn->parent()->name() + ".";
+ } else if (fn->isCCtor()) {
t = "Copy constructor.";
- } else if (func->isMCtor()) {
+ } else if (fn->isMCtor()) {
t = "Move-copy constructor.";
- } else if (func->isCAssign()) {
+ } else if (fn->isCAssign()) {
t = "Copy-assignment constructor.";
- } else if (func->isMAssign()) {
+ } else if (fn->isMAssign()) {
t = "Move-assignment constructor.";
}
@@ -2104,10 +2105,9 @@ void DocBookGenerator::generateBody(const Node *node)
writer->writeTextElement(dbNamespace, "para", t);
}
} else if (!node->isSharingComment()) {
- if (node->nodeType() == Node::Function) {
- const auto func = static_cast<const FunctionNode *>(node);
- if (!func->overridesThis().isEmpty())
- generateReimplementsClause(func);
+ if (fn) {
+ if (!fn->overridesThis().isEmpty())
+ generateReimplementsClause(fn);
}
if (!generateText(node->doc().body(), node)) {
@@ -2115,6 +2115,17 @@ void DocBookGenerator::generateBody(const Node *node)
return;
}
+ if (fn) {
+ if (fn->isQmlSignal())
+ generateAddendum(node, QmlSignalHandler);
+ if (fn->isPrivateSignal())
+ generateAddendum(node, PrivateSignal);
+ if (fn->isInvokable())
+ generateAddendum(node, Invokable);
+ if (fn->hasAssociatedProperties())
+ generateAddendum(node, AssociatedProperties);
+ }
+
// Warning generation skipped with respect to Generator::generateBody.
}
@@ -3393,83 +3404,83 @@ void DocBookGenerator::generateOverloadedSignal(const Node *node)
}
/*!
- Generates a bold line that explains that this is a private signal,
- only made public to let users pass it to connect().
- */
-void DocBookGenerator::generatePrivateSignalNote()
-{
- // From Generator::generatePrivateSignalNote.
- writer->writeStartElement(dbNamespace, "note");
- newLine();
- writer->writeTextElement(dbNamespace, "para",
- "This is a private signal. It can be used in signal connections but "
- "cannot be emitted by the user.");
- writer->writeEndElement(); // note
- newLine();
-}
-
-/*!
- Generates a bold line that says:
- "This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE."
- */
-void DocBookGenerator::generateInvokableNote(const Node *node)
+ Generates an addendum note of type \a type for \a node. \a marker
+ is unused in this generator.
+*/
+void DocBookGenerator::generateAddendum(const Node *node, Addendum type, CodeMarker *marker)
{
- // From Generator::generateInvokableNote.
+ Q_UNUSED(marker);
+ Q_ASSERT(node && !node->name().isEmpty());
writer->writeStartElement(dbNamespace, "note");
newLine();
- writer->writeStartElement(dbNamespace, "para");
- writer->writeCharacters(
+ switch (type) {
+ case Invokable:
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters(
"This function can be invoked via the meta-object system and from QML. See ");
- generateSimpleLink(node->url(), "Q_INVOKABLE");
- writer->writeCharacters(".");
- writer->writeEndElement(); // para
- newLine();
- writer->writeEndElement(); // note
- newLine();
-}
-
-/*!
- Generates bold Note lines that explain how function \a fn
- is associated with each of its associated properties.
- */
-void DocBookGenerator::generateAssociatedPropertyNotes(const FunctionNode *fn)
-{
- // From HtmlGenerator::generateAssociatedPropertyNotes.
- if (fn->hasAssociatedProperties()) {
- writer->writeStartElement(dbNamespace, "note");
+ generateSimpleLink(node->url(), "Q_INVOKABLE");
+ writer->writeCharacters(".");
+ writer->writeEndElement(); // para
newLine();
+ break;
+ case PrivateSignal:
+ writer->writeTextElement(dbNamespace, "para",
+ "This is a private signal. It can be used in signal connections but "
+ "cannot be emitted by the user.");
+ break;
+ case QmlSignalHandler:
+ {
+ QString handler(node->name());
+ handler[0] = handler[0].toTitleCase();
+ handler.prepend(QLatin1String("on"));
writer->writeStartElement(dbNamespace, "para");
-
+ writer->writeCharacters("The corresponding handler is ");
+ writer->writeTextElement(dbNamespace, "code", handler);
+ writer->writeCharacters(".");
+ writer->writeEndElement(); // para
+ newLine();
+ break;
+ }
+ case AssociatedProperties:
+ {
+ if (!node->isFunction())
+ return;
+ const FunctionNode *fn = static_cast<const FunctionNode *>(node);
NodeList nodes = fn->associatedProperties();
+ if (nodes.isEmpty())
+ return;
std::sort(nodes.begin(), nodes.end(), Node::nodeNameLessThan);
for (const auto node : qAsConst(nodes)) {
QString msg;
const auto pn = static_cast<const PropertyNode *>(node);
switch (pn->role(fn)) {
case PropertyNode::Getter:
- msg = QStringLiteral("Getter function ");
+ msg = QStringLiteral("Getter function");
break;
case PropertyNode::Setter:
- msg = QStringLiteral("Setter function ");
+ msg = QStringLiteral("Setter function");
break;
case PropertyNode::Resetter:
- msg = QStringLiteral("Resetter function ");
+ msg = QStringLiteral("Resetter function");
break;
case PropertyNode::Notifier:
- msg = QStringLiteral("Notifier signal ");
+ msg = QStringLiteral("Notifier signal");
break;
default:
- break;
+ continue;
}
- writer->writeCharacters(msg + "for property ");
+ writer->writeCharacters(msg + " for property ");
generateSimpleLink(linkForNode(pn, nullptr), pn->name());
writer->writeCharacters(". ");
}
- writer->writeEndElement(); // para
- newLine();
- writer->writeEndElement(); // note
- newLine();
+ break;
+ }
+ default:
+ break;
}
+
+ writer->writeEndElement(); // note
+ newLine();
}
void DocBookGenerator::generateDetailedMember(const Node *node, const PageNode *relative)
@@ -3568,13 +3579,6 @@ void DocBookGenerator::generateDetailedMember(const Node *node, const PageNode *
newLine();
generateSectionList(notifiers, node);
}
- } else if (node->isFunction()) {
- const auto fn = static_cast<const FunctionNode *>(node);
- if (fn->isPrivateSignal())
- generatePrivateSignalNote();
- if (fn->isInvokable())
- generateInvokableNote(node);
- generateAssociatedPropertyNotes(fn);
} else if (node->isEnumType()) {
const auto en = static_cast<const EnumNode *>(node);
@@ -3646,9 +3650,9 @@ void DocBookGenerator::generateSectionList(const Section &section, const Node *r
newLine();
if (hasPrivateSignals)
- generatePrivateSignalNote();
+ generateAddendum(relative, Generator::PrivateSignal);
if (isInvokable)
- generateInvokableNote(relative);
+ generateAddendum(relative, Generator::Invokable);
}
if (status != Section::Obsolete && section.style() == Section::Summary
diff --git a/src/qdoc/docbookgenerator.h b/src/qdoc/docbookgenerator.h
index 9a223f4af..5eea595f7 100644
--- a/src/qdoc/docbookgenerator.h
+++ b/src/qdoc/docbookgenerator.h
@@ -81,6 +81,7 @@ protected:
bool generateStatus(const Node *node);
bool generateThreadSafeness(const Node *node);
bool generateSince(const Node *node);
+ void generateAddendum(const Node *node, Generator::Addendum type, CodeMarker *marker = nullptr) override;
using Generator::generateBody;
void generateBody(const Node *node);
@@ -133,9 +134,6 @@ private:
void generateExampleFilePage(const Node *en, const QString &file,
CodeMarker *marker = nullptr) override;
void generateOverloadedSignal(const Node *node);
- void generatePrivateSignalNote();
- void generateInvokableNote(const Node *node);
- void generateAssociatedPropertyNotes(const FunctionNode *fn);
bool generateQmlText(const Text &text, const Node *relative, CodeMarker *marker = nullptr,
const QString &qmlName = QString()) override;
void generateRequiredLinks(const Node *node);
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index 7bb32f471..bdeeec2be 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -759,55 +759,55 @@ const Atom *Generator::generateAtomList(const Atom *atom, const Node *relative,
*/
void Generator::generateBody(const Node *node, CodeMarker *marker)
{
+ const FunctionNode *fn = node->isFunction() ? static_cast<const FunctionNode *>(node) : nullptr;
if (!node->hasDoc() && !node->hasSharedDoc()) {
/*
Test for special function, like a destructor or copy constructor,
that has no documentation.
*/
- if (node->isFunction()) {
- const FunctionNode *func = static_cast<const FunctionNode *>(node);
- if (func->isDtor()) {
+ if (fn) {
+ if (fn->isDtor()) {
Text text;
text << "Destroys the instance of ";
- text << func->parent()->name() << ".";
- if (func->isVirtual())
+ text << fn->parent()->name() << ".";
+ if (fn->isVirtual())
text << " The destructor is virtual.";
out() << "<p>";
generateText(text, node, marker);
out() << "</p>";
- } else if (func->isCtor()) {
+ } else if (fn->isCtor()) {
Text text;
text << "Default constructs an instance of ";
- text << func->parent()->name() << ".";
+ text << fn->parent()->name() << ".";
out() << "<p>";
generateText(text, node, marker);
out() << "</p>";
- } else if (func->isCCtor()) {
+ } else if (fn->isCCtor()) {
Text text;
text << "Copy constructor.";
out() << "<p>";
generateText(text, node, marker);
out() << "</p>";
- } else if (func->isMCtor()) {
+ } else if (fn->isMCtor()) {
Text text;
text << "Move-copy constructor.";
out() << "<p>";
generateText(text, node, marker);
out() << "</p>";
- } else if (func->isCAssign()) {
+ } else if (fn->isCAssign()) {
Text text;
text << "Copy-assignment operator.";
out() << "<p>";
generateText(text, node, marker);
out() << "</p>";
- } else if (func->isMAssign()) {
+ } else if (fn->isMAssign()) {
Text text;
text << "Move-assignment operator.";
out() << "<p>";
generateText(text, node, marker);
out() << "</p>";
} else if (!node->isWrapper() && !node->isMarkedReimp()) {
- if (!func->isIgnored()) // undocumented functions added by Q_OBJECT
+ if (!fn->isIgnored()) // undocumented functions added by Q_OBJECT
node->location().warning(
tr("No documentation for '%1'").arg(node->plainSignature()));
}
@@ -818,8 +818,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
tr("No documentation for '%1'").arg(node->plainSignature()));
}
} else if (!node->isSharingComment()) {
- if (node->isFunction()) {
- const FunctionNode *fn = static_cast<const FunctionNode *>(node);
+ if (fn) {
if (!fn->overridesThis().isEmpty())
generateReimplementsClause(fn, marker);
}
@@ -829,6 +828,18 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
return;
}
+ if (fn) {
+ if (fn->isQmlSignal())
+ generateAddendum(node, QmlSignalHandler, marker);
+ if (fn->isPrivateSignal())
+ generateAddendum(node, PrivateSignal, marker);
+ if (fn->isInvokable())
+ generateAddendum(node, Invokable, marker);
+ if (fn->hasAssociatedProperties())
+ generateAddendum(node, AssociatedProperties, marker);
+ }
+
+ // Generate warnings
if (node->isEnumType()) {
const EnumNode *enume = static_cast<const EnumNode *>(node);
@@ -860,8 +871,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
}
}
}
- } else if (node->isFunction()) {
- const FunctionNode *fn = static_cast<const FunctionNode *>(node);
+ } else if (fn) {
const QSet<QString> declaredNames = fn->parameters().getNames();
const QSet<QString> documentedNames = fn->doc().parameterNames();
if (declaredNames != documentedNames) {
@@ -1344,33 +1354,76 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker)
}
/*!
- Generates a bold line that explains that this is a private signal,
- only made public to let users pass it to connect().
- */
-void Generator::generatePrivateSignalNote(const Node *node, CodeMarker *marker)
+ Generates an addendum note of type \a type for \a node, using \a marker
+ as the code marker.
+*/
+void Generator::generateAddendum(const Node *node, Addendum type, CodeMarker *marker)
{
+ Q_ASSERT(node && !node->name().isEmpty());
Text text;
text << Atom::ParaLeft << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "Note: " << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << "This is a private signal. It can be used in signal connections but cannot be emitted "
- "by the user."
- << Atom::ParaRight;
- generateText(text, node, marker);
-}
+ << "Note: " << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD);
+
+ switch (type) {
+ case Invokable:
+ text << "This function can be invoked via the meta-object system and from QML. See "
+ << Atom(Atom::Link, "Q_INVOKABLE")
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << "Q_INVOKABLE"
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) << ".";
+ break;
+ case PrivateSignal:
+ text << "This is a private signal. It can be used in signal connections "
+ "but cannot be emitted by the user.";
+ break;
+ case QmlSignalHandler:
+ {
+ QString handler(node->name());
+ handler[0] = handler[0].toTitleCase();
+ handler.prepend(QLatin1String("on"));
+ text << "The corresponding handler is "
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_TELETYPE) << handler
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_TELETYPE) << ".";
+ break;
+ }
+ case AssociatedProperties:
+ {
+ if (!node->isFunction())
+ return;
+ const FunctionNode *fn = static_cast<const FunctionNode *>(node);
+ NodeList nodes = fn->associatedProperties();
+ if (nodes.isEmpty())
+ return;
+ std::sort(nodes.begin(), nodes.end(), Node::nodeNameLessThan);
+ for (const auto *n : qAsConst(nodes)) {
+ QString msg;
+ const PropertyNode *pn = static_cast<const PropertyNode *>(n);
+ switch (pn->role(fn)) {
+ case PropertyNode::Getter:
+ msg = QStringLiteral("Getter function");
+ break;
+ case PropertyNode::Setter:
+ msg = QStringLiteral("Setter function");
+ break;
+ case PropertyNode::Resetter:
+ msg = QStringLiteral("Resetter function");
+ break;
+ case PropertyNode::Notifier:
+ msg = QStringLiteral("Notifier signal");
+ break;
+ default:
+ continue;
+ }
+ text << msg << " for property " << Atom(Atom::Link, pn->name())
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << pn->name()
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) << ". ";
+ }
+ break;
+ }
+ default:
+ return;
+ }
-/*!
- Generates a bold line that says:
- "This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE."
- */
-void Generator::generateInvokableNote(const Node *node, CodeMarker *marker)
-{
- Text text;
- text << Atom::ParaLeft << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "Note: " << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << "This function can be invoked via the meta-object system and from QML. See "
- << Atom(Atom::Link, "Q_INVOKABLE") << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
- << "Q_INVOKABLE" << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) << "."
- << Atom::ParaRight;
+ text << Atom::ParaRight;
generateText(text, node, marker);
}
@@ -2133,8 +2186,8 @@ QString Generator::typeString(const Node *node)
case Node::Union:
return "union";
case Node::QmlType:
- return "type";
case Node::QmlBasicType:
+ case Node::JsBasicType:
return "type";
case Node::Page:
return "documentation";
@@ -2166,6 +2219,10 @@ QString Generator::typeString(const Node *node)
case Node::JsModule:
case Node::QmlModule:
return "module";
+ case Node::SharedComment: {
+ const auto &collective = static_cast<const SharedCommentNode *>(node)->collective();
+ return collective.first()->nodeTypeString();
+ }
default:
return "documentation";
}
diff --git a/src/qdoc/generator.h b/src/qdoc/generator.h
index fd5fbbcef..f12aff933 100644
--- a/src/qdoc/generator.h
+++ b/src/qdoc/generator.h
@@ -53,6 +53,7 @@ class Generator
public:
enum ListType { Generic, Obsolete };
+ enum Addendum { Invokable, PrivateSignal, QmlSignalHandler, AssociatedProperties };
Generator();
virtual ~Generator();
@@ -63,6 +64,7 @@ public:
virtual void initializeGenerator();
virtual void initializeFormat();
virtual void terminateGenerator();
+ virtual QString typeString(const Node *node);
QString fullDocumentLocation(const Node *node, bool useSubdir = false);
QString linkForExampleFile(const QString &path, const Node *parent,
@@ -118,7 +120,6 @@ protected:
virtual bool generateText(const Text &text, const Node *relative, CodeMarker *marker);
virtual QString imageFileName(const Node *relative, const QString &fileBase);
virtual int skipAtoms(const Atom *atom, Atom::AtomType type) const;
- virtual QString typeString(const Node *node);
static bool matchAhead(const Atom *atom, Atom::AtomType expectedAtomType);
static QString outputPrefix(const Node *node);
@@ -140,8 +141,7 @@ protected:
static QString formatSince(const Node *node);
void generateSince(const Node *node, CodeMarker *marker);
void generateStatus(const Node *node, CodeMarker *marker);
- void generatePrivateSignalNote(const Node *node, CodeMarker *marker);
- void generateInvokableNote(const Node *node, CodeMarker *marker);
+ virtual void generateAddendum(const Node *node, Addendum type, CodeMarker *marker);
void generateThreadSafeness(const Node *node, CodeMarker *marker);
QString getMetadataElement(const Aggregate *inner, const QString &t);
QStringList getMetadataElements(const Aggregate *inner, const QString &t);
diff --git a/src/qdoc/helpprojectwriter.cpp b/src/qdoc/helpprojectwriter.cpp
index 019604ce7..a372ea762 100644
--- a/src/qdoc/helpprojectwriter.cpp
+++ b/src/qdoc/helpprojectwriter.cpp
@@ -92,7 +92,6 @@ void HelpProjectWriter::reset(const QString &defaultFileName, Generator *g)
+ Config::dot + "filterAttributes");
project.customFilters[name] = QSet<QString>(filters.cbegin(), filters.cend());
}
- // customFilters = config.defs.
const auto excludedPrefixes = config.getStringSet(prefix + "excluded");
for (auto name : excludedPrefixes)
@@ -103,6 +102,8 @@ void HelpProjectWriter::reset(const QString &defaultFileName, Generator *g)
SubProject subproject;
QString subprefix = prefix + "subprojects" + Config::dot + name + Config::dot;
subproject.title = config.getString(subprefix + "title");
+ if (subproject.title.isEmpty())
+ continue;
subproject.indexTitle = config.getString(subprefix + "indexTitle");
subproject.sortPages = config.getBool(subprefix + "sortPages");
subproject.type = config.getString(subprefix + "type");
@@ -129,8 +130,8 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList
typeHash["union"] = Node::Union;
typeHash["header"] = Node::HeaderFile;
typeHash["headerfile"] = Node::HeaderFile;
- typeHash["doc"] = Node::Page; // to be removed from qdocconf files
- typeHash["fake"] = Node::Page; // to be removed from qdocconf files
+ typeHash["doc"] = Node::Page; // Unused (supported but ignored as a prefix)
+ typeHash["fake"] = Node::Page; // Unused (supported but ignored as a prefix)
typeHash["page"] = Node::Page;
typeHash["enum"] = Node::Enum;
typeHash["example"] = Node::Example;
@@ -149,41 +150,26 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList
typeHash["qmltype"] = Node::QmlType;
typeHash["qmlbasictype"] = Node::QmlBasicType;
- QHash<QString, Node::NodeType> pageTypeHash;
- pageTypeHash["example"] = Node::Example;
- pageTypeHash["headerfile"] = Node::HeaderFile;
- pageTypeHash["header"] = Node::HeaderFile;
- pageTypeHash["page"] = Node::Page;
- pageTypeHash["externalpage"] = Node::ExternalPage;
-
- NodeTypeSet fullSubset;
- for (auto it = pageTypeHash.constBegin(); it != pageTypeHash.constEnd(); ++it)
- fullSubset.insert(it.value());
-
for (const QString &selector : selectors) {
QStringList pieces = selector.split(QLatin1Char(':'));
- if (pieces.size() == 1) {
- QString lower = selector.toLower();
- if (typeHash.contains(lower))
- subproject.selectors[typeHash[lower]] = fullSubset;
- } else if (pieces.size() >= 2) {
- QString pageTypeStr = pieces[0].toLower();
- pieces = pieces[1].split(QLatin1Char(','));
- if (typeHash.contains(pageTypeStr)) {
- NodeTypeSet nodeTypeSet;
- for (int i = 0; i < pieces.size(); ++i) {
- QString piece = pieces[i].toLower();
- if (typeHash[pageTypeStr] == Node::Group
- || typeHash[pageTypeStr] == Node::Module
- || typeHash[pageTypeStr] == Node::QmlModule
- || typeHash[pageTypeStr] == Node::JsModule) {
- subproject.groups << piece;
- continue;
- }
- if (pageTypeHash.contains(piece))
- nodeTypeSet.insert(pageTypeHash[piece]);
+ // Remove doc: or fake: prefix
+ if (pieces.size() > 1 && typeHash.value(pieces[0].toLower()) == Node::Page)
+ pieces.takeFirst();
+
+ QString typeName = pieces.takeFirst().toLower();
+ if (!typeHash.contains(typeName))
+ continue;
+
+ subproject.selectors << typeHash.value(typeName);
+ if (!pieces.isEmpty()) {
+ pieces = pieces[0].split(QLatin1Char(','));
+ for (const auto &piece : qAsConst(pieces)) {
+ if (typeHash[typeName] == Node::Group
+ || typeHash[typeName] == Node::Module
+ || typeHash[typeName] == Node::QmlModule
+ || typeHash[typeName] == Node::JsModule) {
+ subproject.groups << piece.toLower();
}
- subproject.selectors[typeHash[pageTypeStr]] = nodeTypeSet;
}
}
}
@@ -268,7 +254,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QXmlStreamWriter &
project.subprojects[i].nodes[objName] = node;
} else if (subproject.selectors.contains(node->nodeType())) {
// Add all group members for '[group|module|qmlmodule]:name' selector
- if (node->isGroup() || node->isModule() || node->isQmlModule()) {
+ if (node->isCollectionNode()) {
if (project.subprojects[i].groups.contains(node->name().toLower())) {
const CollectionNode *cn = static_cast<const CollectionNode *>(node);
const auto members = cn->members();
@@ -277,20 +263,15 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QXmlStreamWriter &
m->isTextPageNode() ? m->fullTitle() : m->fullDocumentName();
project.subprojects[i].nodes[memberName] = m;
}
+ continue;
+ } else if (!project.subprojects[i].groups.isEmpty()) {
+ continue; // Node does not represent specified group(s)
}
+ } else if (node->isTextPageNode()) {
+ if (node->isExternalPage() || node->fullTitle().isEmpty())
+ continue;
}
- // Accept only the node types in the selectors hash.
- else if (!node->isTextPageNode())
- project.subprojects[i].nodes[objName] = node;
- else {
- // Accept only doc nodes with subtypes contained in the selector's
- // mask.
- if (subproject.selectors[node->nodeType()].contains(node->nodeType())
- && !node->isExternalPage() && !node->fullTitle().isEmpty()) {
-
- project.subprojects[i].nodes[objName] = node;
- }
- }
+ project.subprojects[i].nodes[objName] = node;
}
}
@@ -537,6 +518,9 @@ void HelpProjectWriter::writeSection(QXmlStreamWriter &writer, const QString &pa
*/
void HelpProjectWriter::addMembers(HelpProject &project, QXmlStreamWriter &writer, const Node *node)
{
+ if (node->isQmlBasicType() || node->isJsBasicType())
+ return;
+
QString href = gen_->fullDocumentLocation(node, false);
href = href.left(href.size() - 5);
if (href.isEmpty())
@@ -570,58 +554,41 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer
case Node::Class:
case Node::Struct:
case Node::Union:
+ case Node::QmlType:
+ case Node::JsType:
+ case Node::QmlBasicType:
+ case Node::JsBasicType: {
+ QString typeStr = gen_->typeString(node);
+ if (!typeStr.isEmpty())
+ typeStr[0] = typeStr[0].toTitleCase();
writer.writeStartElement("section");
writer.writeAttribute("ref", href);
if (node->parent() && !node->parent()->name().isEmpty())
writer.writeAttribute(
- "title", tr("%1::%2 Class Reference").arg(node->parent()->name()).arg(objName));
+ "title", tr("%1::%2 %3 Reference").arg(node->parent()->name()).arg(objName).arg(typeStr));
else
- writer.writeAttribute("title", tr("%1 Class Reference").arg(objName));
+ writer.writeAttribute("title", tr("%1 %2 Reference").arg(objName).arg(typeStr));
addMembers(project, writer, node);
writer.writeEndElement(); // section
- break;
+ } break;
case Node::Namespace:
writeSection(writer, href, objName);
break;
+ case Node::Example:
case Node::HeaderFile:
- writer.writeStartElement("section");
- writer.writeAttribute("ref", href);
- writer.writeAttribute("title", node->fullTitle());
- addMembers(project, writer, node);
- writer.writeEndElement(); // section
- break;
-
- case Node::JsType:
- case Node::QmlType:
- writer.writeStartElement("section");
- writer.writeAttribute("ref", href);
- writer.writeAttribute("title", tr("%1 Type Reference").arg(node->fullTitle()));
- addMembers(project, writer, node);
- writer.writeEndElement(); // section
- break;
-
- case Node::Page: {
- // Page nodes (such as manual pages) contain subtypes, titles and other
- // attributes.
- const PageNode *pn = static_cast<const PageNode *>(node);
-
- writer.writeStartElement("section");
- writer.writeAttribute("ref", href);
- writer.writeAttribute("title", pn->fullTitle());
-
- writer.writeEndElement(); // section
- } break;
+ case Node::Page:
case Node::Group:
case Node::Module:
case Node::JsModule:
case Node::QmlModule: {
- const CollectionNode *cn = static_cast<const CollectionNode *>(node);
writer.writeStartElement("section");
writer.writeAttribute("ref", href);
- writer.writeAttribute("title", cn->fullTitle());
+ writer.writeAttribute("title", node->fullTitle());
+ if (node->nodeType() == Node::HeaderFile)
+ addMembers(project, writer, node);
writer.writeEndElement(); // section
} break;
default:;
diff --git a/src/qdoc/helpprojectwriter.h b/src/qdoc/helpprojectwriter.h
index eedfa3909..31b8f009d 100644
--- a/src/qdoc/helpprojectwriter.h
+++ b/src/qdoc/helpprojectwriter.h
@@ -44,11 +44,9 @@ using NodeTypeSet = QSet<unsigned char>;
struct SubProject
{
- using NodeTypeToSet = QHash<unsigned char, NodeTypeSet>;
-
QString title;
QString indexTitle;
- NodeTypeToSet selectors;
+ NodeTypeSet selectors;
bool sortPages;
QString type;
QHash<QString, const Node *> nodes;
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
index e7f4dc1cb..c440b31c3 100644
--- a/src/qdoc/htmlgenerator.cpp
+++ b/src/qdoc/htmlgenerator.cpp
@@ -829,7 +829,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
out() << formattingRightMap()[ATOM_FORMATTING_BOLD];
break;
case Atom::NoteRight:
- out() << "</p>";
+ out() << "</p>\n";
break;
case Atom::LegaleseLeft:
out() << "<div class=\"LegaleseLeft\">";
@@ -3114,10 +3114,12 @@ void HtmlGenerator::generateSectionList(const Section &section, const Node *rela
if (twoColumn)
out() << "</td></tr>\n</table></div>\n";
}
- if (hasPrivateSignals && alignNames)
- generatePrivateSignalNote(relative, marker);
- if (isInvokable && alignNames)
- generateInvokableNote(relative, marker);
+ if (alignNames) {
+ if (hasPrivateSignals)
+ generateAddendum(relative, Generator::PrivateSignal, marker);
+ if (isInvokable)
+ generateAddendum(relative, Generator::Invokable, marker);
+ }
}
if (status != Section::Obsolete && section.style() == Section::Summary
@@ -3502,13 +3504,6 @@ void HtmlGenerator::generateDetailedMember(const Node *node, const PageNode *rel
out() << "<p><b>Notifier signal:</b></p>\n";
generateSectionList(notifiers, node, marker);
}
- } else if (node->isFunction()) {
- const FunctionNode *fn = static_cast<const FunctionNode *>(node);
- if (fn->isPrivateSignal())
- generatePrivateSignalNote(node, marker);
- if (fn->isInvokable())
- generateInvokableNote(node, marker);
- generateAssociatedPropertyNotes(const_cast<FunctionNode *>(fn));
} else if (node->isEnumType()) {
const EnumNode *etn = static_cast<const EnumNode *>(node);
if (etn->flagsType()) {
@@ -4211,40 +4206,4 @@ QXmlStreamWriter &HtmlGenerator::xmlWriter()
return *xmlWriterStack.top();
}
-/*!
- Generates bold Note lines that explain how function \a fn
- is associated with each of its associated properties.
- */
-void HtmlGenerator::generateAssociatedPropertyNotes(const FunctionNode *fn)
-{
- if (fn->hasAssociatedProperties()) {
- out() << "<p><b>Note:</b> ";
- NodeList nodes = fn->associatedProperties();
- std::sort(nodes.begin(), nodes.end(), Node::nodeNameLessThan);
- for (const auto *node : qAsConst(nodes)) {
- QString msg;
- const PropertyNode *pn = static_cast<const PropertyNode *>(node);
- switch (pn->role(fn)) {
- case PropertyNode::Getter:
- msg = QStringLiteral("Getter function ");
- break;
- case PropertyNode::Setter:
- msg = QStringLiteral("Setter function ");
- break;
- case PropertyNode::Resetter:
- msg = QStringLiteral("Resetter function ");
- break;
- case PropertyNode::Notifier:
- msg = QStringLiteral("Notifier signal ");
- break;
- default:
- break;
- }
- QString link = linkForNode(pn, nullptr);
- out() << msg << "for property <a href=\"" << link << "\">" << pn->name() << "</a>. ";
- }
- out() << "</p>";
- }
-}
-
QT_END_NAMESPACE
diff --git a/src/qdoc/htmlgenerator.h b/src/qdoc/htmlgenerator.h
index ea50e4baf..c1a47ba33 100644
--- a/src/qdoc/htmlgenerator.h
+++ b/src/qdoc/htmlgenerator.h
@@ -81,7 +81,6 @@ protected:
void generateManifestFile(const QString &manifest, const QString &element);
void readManifestMetaContent();
void generateKeywordAnchors(const Node *node);
- void generateAssociatedPropertyNotes(const FunctionNode *fn);
private:
enum SubTitleSize { SmallSubTitle, LargeSubTitle };
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp
index 96e93c015..29ba75d7a 100644
--- a/src/qdoc/main.cpp
+++ b/src/qdoc/main.cpp
@@ -238,12 +238,12 @@ void logStartEndMessage(const QLatin1String &startStop, const Config &config)
+ config.getString(CONFIG_PROJECT)
+ QLatin1String(" in ")
+ QLatin1String(config.singleExec() ? "single" : "dual")
- + QLatin1String(" process mode, (")
+ + QLatin1String(" process mode: ")
+ QLatin1String(config.preparing() ? "prepare" : "generate")
- + QLatin1String(" phase)");
+ + QLatin1String(" phase.");
const QString msg = startStop + runName;
- qCInfo(lcQdoc) << msg.data();
+ qCInfo(lcQdoc) << msg.toUtf8().data();
}
/*!
@@ -478,7 +478,7 @@ static void processQdocconfFile(const QString &fileName)
add it to the big tree.
*/
parsed = 0;
- qCInfo(lcQdoc) << "Parse source files for " << project;
+ qCInfo(lcQdoc) << "Parse source files for" << project;
for (const auto &key : sources.keys()) {
auto *codeParser = CodeParser::parserForSourceFile(key);
if (codeParser) {
@@ -487,7 +487,7 @@ static void processQdocconfFile(const QString &fileName)
codeParser->parseSourceFile(config.location(), key);
}
}
- qCInfo(lcQdoc) << "Source files parsed for " << project;
+ qCInfo(lcQdoc) << "Source files parsed for" << project;
}
/*
Now the primary tree has been built from all the header and
diff --git a/src/qdoc/qdocindexfiles.cpp b/src/qdoc/qdocindexfiles.cpp
index f51526ab1..12136dd4a 100644
--- a/src/qdoc/qdocindexfiles.cpp
+++ b/src/qdoc/qdocindexfiles.cpp
@@ -1522,7 +1522,7 @@ void QDocIndexFiles::generateIndex(const QString &fileName, const QString &url,
if (!file.open(QFile::WriteOnly | QFile::Text))
return;
- qCInfo(lcQdoc) << "Writing index file: " << fileName;
+ qCInfo(lcQdoc) << "Writing index file:" << fileName;
gen_ = g;
QXmlStreamWriter writer(&file);
diff --git a/tests/auto/qdoc/config/config.pro b/tests/auto/qdoc/config/config.pro
new file mode 100644
index 000000000..b6cb9a32d
--- /dev/null
+++ b/tests/auto/qdoc/config/config.pro
@@ -0,0 +1,16 @@
+CONFIG += testcase
+QT = core testlib
+TARGET = tst_config
+INCLUDEPATH += $$PWD/../../../../src/qdoc
+
+HEADERS += \
+ $$PWD/../../../../src/qdoc/config.h \
+ $$PWD/../../../../src/qdoc/location.h \
+ $$PWD/../../../../src/qdoc/qdoccommandlineparser.h \
+ $$PWD/../../../../src/qdoc/loggingcategory.h
+
+SOURCES += \
+ tst_config.cpp \
+ $$PWD/../../../../src/qdoc/config.cpp \
+ $$PWD/../../../../src/qdoc/location.cpp \
+ $$PWD/../../../../src/qdoc/qdoccommandlineparser.cpp
diff --git a/tests/auto/qdoc/config/tst_config.cpp b/tests/auto/qdoc/config/tst_config.cpp
new file mode 100644
index 000000000..1e9383fb9
--- /dev/null
+++ b/tests/auto/qdoc/config/tst_config.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "config.h"
+
+#include <QtCore/qhash.h>
+#include <QtCore/qstringlist.h>
+#include <QtTest/QtTest>
+
+QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(lcQdoc, "qt.test")
+QT_END_NAMESPACE
+
+class tst_Config : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void classMembersInitializeToFalseOrEmpty();
+ void includePathsFromCommandLine();
+};
+
+void tst_Config::classMembersInitializeToFalseOrEmpty()
+{
+ QStringList commandLineArgs = { QStringLiteral("./qdoc") };
+
+ Config::instance().init("QDoc Test", commandLineArgs);
+ auto &config = Config::instance();
+ QCOMPARE(config.singleExec(), false);
+
+ QVERIFY(config.defines().isEmpty());
+ QVERIFY(config.includePaths().isEmpty());
+ QVERIFY(config.dependModules().isEmpty());
+ QVERIFY(config.indexDirs().isEmpty());
+ QVERIFY(config.currentDir().isEmpty());
+ QVERIFY(config.previousCurrentDir().isEmpty());
+}
+
+void tst_Config::includePathsFromCommandLine()
+{
+ const auto mockIncludePath1 = QString("-I" + QDir().absoluteFilePath("/qt5/qtdoc/doc/."));
+ const auto mockIncludePath2 = QString("-I" + QDir().absoluteFilePath("/qt5/qtbase/mkspecs/linux-g++"));
+ const QStringList commandLineArgs = {
+ QStringLiteral("./qdoc"),
+ mockIncludePath1,
+ mockIncludePath2
+ };
+
+ Config::instance().init("QDoc Test", commandLineArgs);
+ auto &config = Config::instance();
+
+ const QStringList expected = { mockIncludePath1, mockIncludePath2 };
+ const QStringList actual = config.includePaths();
+
+ QCOMPARE(actual, expected);
+}
+
+QTEST_APPLESS_MAIN(tst_Config)
+
+#include "tst_config.moc"
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 1ab15056a..59ed97a01 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
@@ -135,6 +135,9 @@
<db:section xml:id="completed-signal">
<db:title>completed(<db:emphasis>status</db:emphasis>)</db:title>
<db:para>This signal is emitted when the operation completed with <db:code role="parameter">status</db:code>.</db:para>
+<db:note>
+<db:para>The corresponding handler is <db:code>onCompleted</db:code>.</db:para>
+</db:note>
</db:section>
</db:section>
<db:section xml:id="attached-signal-documentation">
@@ -142,6 +145,9 @@
<db:section xml:id="configured-signal">
<db:title>configured()</db:title>
<db:para>This attached signal is emitted when the type was configured.</db:para>
+<db:note>
+<db:para>The corresponding handler is <db:code>onConfigured</db:code>.</db:para>
+</db:note>
</db:section>
</db:section>
<db:section xml:id="method-documentation">
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml
index 2b442d1dd..48496733b 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml
@@ -10,29 +10,29 @@
</db:info>
<db:para>This example demonstrates one of the ways to document QML types.</db:para>
<db:para>In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types and their public interfaces. The types are grouped into a module, the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module.</db:para>
-<db:para>The <db:link xlink:href="">uicomponents.qdoc</db:link> file generates the overview page for the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module page.</db:para>
+<db:para>The uicomponents.qdoc file generates the overview page for the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module page.</db:para>
<db:para>The generated documentation is available in the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module.</db:para>
<db:section xml:id="qml-class">
<db:title>QML Class</db:title>
-<db:para>The QML types use the <db:link xlink:href="">\qmltype</db:link> to document the type. In addition, they have the <db:link xlink:href="">\inmodule</db:link> command in order for QDoc to associate them to the <db:code>UIComponents</db:code> module.</db:para>
-<db:para>QDoc uses the <db:link xlink:href="">\brief</db:link> command to place a basic description when listing the types.</db:para>
+<db:para>The QML types use the \qmltype to document the type. In addition, they have the \inmodule command in order for QDoc to associate them to the <db:code>UIComponents</db:code> module.</db:para>
+<db:para>QDoc uses the \brief command to place a basic description when listing the types.</db:para>
</db:section>
<db:section xml:id="properties-signals-handlers-and-methods">
<db:title>Properties, Signals, Handlers, and Methods</db:title>
<db:para>The types have their properties, signals, handlers, and methods defined in their respective QML files. QDoc associates the properties and methods to the types, therefore, you only need to place the documentation above the property, method, or signal.</db:para>
-<db:para>To document the type of a <db:emphasis>property alias</db:emphasis>, you must use the <db:link xlink:href="">\qmlproperty</db:link> command to specify the data type.</db:para>
+<db:para>To document the type of a <db:emphasis>property alias</db:emphasis>, you must use the \qmlproperty command to specify the data type.</db:para>
<db:programlisting language="cpp">\qmlproperty &lt;@type&gt;int&lt;/@type&gt; anAliasedProperty
An aliased property of type &lt;@type&gt;int&lt;/@type&gt;&lt;@op&gt;.&lt;/@op&gt;
</db:programlisting>
<db:section xml:id="internal-documentation">
<db:title>Internal Documentation</db:title>
-<db:para>You may declare that a documentation is for internal use by placing the <db:link xlink:href="">\internal</db:link> command after the beginning QDoc comment <db:code>/*</db:code>. QDoc will prevent the internal documentation from appearing in the public API.</db:para>
-<db:para>If you wish to omit certain parts of the documentation, you may use the <db:link xlink:href="">\omit</db:link> and <db:link xlink:href="">\endomit</db:link> command.</db:para>
+<db:para>You may declare that a documentation is for internal use by placing the \internal command after the beginning QDoc comment <db:code>/*</db:code>. QDoc will prevent the internal documentation from appearing in the public API.</db:para>
+<db:para>If you wish to omit certain parts of the documentation, you may use the \omit and \endomit command.</db:para>
</db:section>
</db:section>
<db:section xml:id="qml-types-with-c-implementation">
<db:title>QML Types with C++ Implementation</db:title>
-<db:para>This example only demonstrates the documentation for types in QML files, but the regular <db:link xlink:href="">QML commands</db:link> may be placed inside C++ classes to define the public API of the QML type.</db:para>
+<db:para>This example only demonstrates the documentation for types in QML files, but the regular QML commands may be placed inside C++ classes to define the public API of the QML type.</db:para>
</db:section>
<db:para>Files:</db:para>
<db:itemizedlist><db:listitem>
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 0cfeb1724..ad6a4f30f 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml
@@ -45,6 +45,7 @@
<db:synopsisinfo db:role="module">TestCPP</db:synopsisinfo>
</db:synopsis>
<db:para>Overloads that share a documentation comment, optionally taking a parameter <db:code role="parameter">b</db:code>.</db:para>
+<db:para>This function was introduced in Test 1.2.</db:para>
</db:section>
<db:section xml:id="inlineFunction">
<db:title>Test::void inlineFunction()</db:title>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
index f43890289..f00b3d3f7 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
@@ -9,7 +9,7 @@
</db:abstract>
</db:info>
<db:anchor xml:id="details"/>
-<db:para>This is a listing of a list of UI components implemented by QML types. These files are available for general import and they are based on the <db:link xlink:href="">Qt Quick Code Samples</db:link>.</db:para>
+<db:para>This is a listing of a list of UI components implemented by QML types. These files are available for general import and they are based on the Qt Quick Code Samples.</db:para>
<db:para>This module is part of the <db:link xlink:href="test-componentset-example.xml">UIComponents</db:link> example.</db:para>
<db:variablelist role="members">
<db:varlistentry>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html
index 71c54c2e9..52a10f706 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html
@@ -61,6 +61,7 @@
<div class="fngroup">
<h3 class="fn fngroupitem" id="overload"><a name="overload"></a><code>[protected] </code><span class="type">void</span> Test::<span class="name">overload</span>()</h3><h3 class="fn fngroupitem" id="overload-1"><a name="overload-1"></a><code>[protected] </code><span class="type">void</span> Test::<span class="name">overload</span>(<span class="type">bool</span> <i>b</i>)</h3></div>
<p>Overloads that share a documentation comment, optionally taking a parameter <i>b</i>.</p>
+<p>This function was introduced in Test 1.2.</p>
<!-- @@@ -->
<!-- $$$inlineFunction[overload1]$$$inlineFunction -->
<h3 class="fn" id="inlineFunction"><a name="inlineFunction"></a><span class="type">void</span> Test::<span class="name">inlineFunction</span>()</h3>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html
index d1fb02484..fd9fdd50a 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html
@@ -20,6 +20,8 @@
<h2 id="qml-types">QML Types</h2>
<div class="table"><table class="annotated">
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-qdoc-test-abstractparent.html">AbstractParent</a></p></td><td class="tblDescr"><p>Abstract base QML type</p></td></tr>
+<tr class="even topAlign"><td class="tblName"><p><a href="qml-qdoc-test-child.html">Child</a></p></td><td class="tblDescr"><p>A Child inheriting its parent</p></td></tr>
+<tr class="odd topAlign"><td class="tblName"><p><a href="qml-int.html">int</a></p></td><td class="tblDescr"><p>An integer basic type</p></td></tr>
</table></div>
<p>Test include file that is part of the sourcedirs.</p>
</div>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html
index 48c8fa485..f9d64de75 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
-<!-- parent.qdoc -->
+<!-- includefromparent.qdoc -->
<title>List of All Members for AbstractParent | Test</title>
</head>
<body>
@@ -11,7 +11,6 @@
<p>This is the complete list of members for <a href="qml-qdoc-test-abstractparent.html">AbstractParent</a>, including inherited members.</p>
<ul>
<li class="fn"><b><b><a href="qml-qdoc-test-abstractparent.html#children-prop">children</a></b></b> : list&lt;Child&gt; [default]</li>
-<li class="fn">void <b><b><a href="qml-qdoc-test-abstractparent.html#rear-method-1">rear</a></b></b>(<i>child</i>)</li>
<li class="fn">void <b><b><a href="qml-qdoc-test-abstractparent.html#rear-method">rear</a></b></b>(<i>child</i>)</li>
</ul>
</body>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html
index cbb0f36aa..f7c294ae0 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
-<!-- parent.qdoc -->
+<!-- includefromparent.qdoc -->
<title>AbstractParent QML Type | Test</title>
</head>
<body>
@@ -34,12 +34,12 @@
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
-<li class="fn">void <b><b><a href="qml-qdoc-test-abstractparent.html#rear-method-1">rear</a></b></b>(<i>child</i>)</li>
<li class="fn">void <b><b><a href="qml-qdoc-test-abstractparent.html#rear-method">rear</a></b></b>(<i>child</i>)</li>
</ul>
<!-- $$$AbstractParent-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
+<p>Test include file that is part of the sourcedirs.</p>
<!-- @@@AbstractParent -->
<h2>Property Documentation</h2>
<!-- $$$children -->
@@ -54,16 +54,6 @@
</div></div><!-- @@@children -->
<br/>
<h2>Method Documentation</h2>
-<!-- $$$rear$$$rear -->
-<div class="qmlitem"><div class="qmlproto">
-<div class="table"><table class="qmlname">
-<tr valign="top" class="odd" id="rear-method-1">
-<td class="tblQmlFuncNode"><p>
-<a name="rear-method-1"></a><span class="type">void</span> <span class="name">rear</span>(<i>child</i>)</p></td></tr>
-</table></div></div>
-<div class="qmldoc"><p>Do some abstract parenting on <i>child</i>.</p>
-</div></div><!-- @@@rear -->
-<br/>
<!-- $$$rear[overload1]$$$rear -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html
index 166cbee81..f18e97082 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html
@@ -143,6 +143,7 @@
<a name="completed-signal"></a><span class="name">completed</span>(<i>status</i>)</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This signal is emitted when the operation completed with <i>status</i>.</p>
+<p><b>Note: </b>The corresponding handler is <code>onCompleted</code>.</p>
</div></div><!-- @@@completed -->
<br/>
<h2>Attached Signal Documentation</h2>
@@ -154,6 +155,7 @@
<a name="configured-signal"></a><span class="name">configured</span>()</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>This attached signal is emitted when the type was configured.</p>
+<p><b>Note: </b>The corresponding handler is <code>onConfigured</code>.</p>
</div></div><!-- @@@configured -->
<br/>
<h2>Method Documentation</h2>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html
index 145fc724a..3fc1f2bc7 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html
@@ -78,6 +78,7 @@
<div class="fngroup">
<h3 class="fn fngroupitem" id="overload"><a name="overload"></a><code>[protected] </code><span class="type">void</span> Test::<span class="name">overload</span>()</h3><h3 class="fn fngroupitem" id="overload-1"><a name="overload-1"></a><code>[protected] </code><span class="type">void</span> Test::<span class="name">overload</span>(<span class="type">bool</span> <i>b</i>)</h3></div>
<p>Overloads that share a documentation comment, optionally taking a parameter <i>b</i>.</p>
+<p>This function was introduced in Test 1.2.</p>
<!-- @@@ -->
<!-- $$$inlineFunction[overload1]$$$inlineFunction -->
<h3 class="fn" id="inlineFunction"><a name="inlineFunction"></a><span class="type">void</span> Test::<span class="name">inlineFunction</span>()</h3>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html
index d19d15535..4ec52916a 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html
@@ -62,6 +62,7 @@
<div class="fngroup">
<h3 class="fn fngroupitem" id="overload"><a name="overload"></a><code>[protected] </code><span class="type">void</span> Test::<span class="name">overload</span>()</h3><h3 class="fn fngroupitem" id="overload-1"><a name="overload-1"></a><code>[protected] </code><span class="type">void</span> Test::<span class="name">overload</span>(<span class="type">bool</span> <i>b</i>)</h3></div>
<p>Overloads that share a documentation comment, optionally taking a parameter <i>b</i>.</p>
+<p>This function was introduced in Test 1.2.</p>
<!-- @@@ -->
<!-- $$$funcTemplate[overload1]$$$funcTemplateT1T2 -->
<h3 class="fn" id="funcTemplate"><a name="funcTemplate"></a><code>[protected] </code>template &lt;typename T1, typename T2&gt; <span class="type">void</span> Test::<span class="name">funcTemplate</span>(<span class="type">T1</span> <i>a</i>, <span class="type">T2</span> <i>b</i>)</h3>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/test.qhp b/tests/auto/qdoc/generatedoutput/expected_output/test.qhp
new file mode 100644
index 000000000..4816ef1d5
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/test.qhp
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<QtHelpProject version="1.0">
+ <namespace>org.qt-project.test.001</namespace>
+ <virtualFolder>test</virtualFolder>
+ <metaData name="version" value="0.0.1"/>
+ <filterSection>
+ <toc>
+ <section ref="uicomponents-qmlmodule.html" title="UI Components">
+ <section ref="uicomponents-qmlmodule.html" title="Test">
+ <section ref="qdoc-test-qmlmodule.html" title=""/>
+ <section ref="testcpp-module.html" title="QDoc Test C++ Classes"/>
+ <section ref="test-componentset-example.html" title="QML Documentation Example"/>
+ <section ref="uicomponents-qmlmodule.html" title="UI Components"/>
+ </section>
+ <section ref="testcpp-module.html" title="Classes">
+ <section ref="testqdoc.html" title="TestQDoc"/>
+ <section ref="testqdoc-test.html" title="TestQDoc::Test Class Reference">
+ <section ref="testqdoc-test-members.html" title="List of all members"/>
+ <section ref="testqdoc-test-obsolete.html" title="Obsolete members"/>
+ </section>
+ <section ref="testqdoc-testderived.html" title="TestQDoc::TestDerived Class Reference">
+ <section ref="testqdoc-testderived-members.html" title="List of all members"/>
+ </section>
+ </section>
+ <section ref="uicomponents-qmlmodule.html" title="QML Types">
+ <section ref="qml-qdoc-test-abstractparent.html" title="AbstractParent Type Reference">
+ <section ref="qml-qdoc-test-abstractparent-members.html" title="List of all members"/>
+ </section>
+ <section ref="qml-qdoc-test-child.html" title="Child Type Reference">
+ <section ref="qml-qdoc-test-child-members.html" title="List of all members"/>
+ </section>
+ <section ref="qml-qdoc-test-doctest.html" title="DocTest Type Reference">
+ <section ref="qml-qdoc-test-doctest-members.html" title="List of all members"/>
+ </section>
+ <section ref="qml-qdoc-test-type.html" title="Type Type Reference">
+ <section ref="qml-qdoc-test-type-members.html" title="List of all members"/>
+ </section>
+ <section ref="qml-uicomponents-progressbar.html" title="ProgressBar Type Reference">
+ <section ref="qml-uicomponents-progressbar-members.html" title="List of all members"/>
+ </section>
+ <section ref="qml-uicomponents-switch.html" title="Switch Type Reference">
+ <section ref="qml-uicomponents-switch-members.html" title="List of all members"/>
+ </section>
+ <section ref="qml-uicomponents-tabwidget.html" title="TabWidget Type Reference">
+ <section ref="qml-uicomponents-tabwidget-members.html" title="List of all members"/>
+ </section>
+ <section ref="qml-int.html" title="int Type Reference"/>
+ </section>
+ </section>
+ </toc>
+ <keywords>
+ <keyword name="AbstractParent" id="QML.AbstractParent" ref="qml-qdoc-test-abstractparent.html"/>
+ <keyword name="Child" id="QML.Child" ref="qml-qdoc-test-child.html"/>
+ <keyword name="DocTest" id="QML.DocTest" ref="qml-qdoc-test-doctest.html"/>
+ <keyword name="ProgressBar" id="QML.ProgressBar" ref="qml-uicomponents-progressbar.html"/>
+ <keyword name="QDOCTEST_MACRO" id="QDOCTEST_MACRO" ref="testqdoc.html#QDOCTEST_MACRO"/>
+ <keyword name="QDOCTEST_MACRO2" id="QDOCTEST_MACRO2" ref="testqdoc-test.html#QDOCTEST_MACRO2"/>
+ <keyword name="QDoc Test C++ Classes" id="QDoc Test C++ Classes" ref="testcpp-module.html"/>
+ <keyword name="Switch" id="QML.Switch" ref="qml-uicomponents-switch.html"/>
+ <keyword name="TabWidget" id="QML.TabWidget" ref="qml-uicomponents-tabwidget.html"/>
+ <keyword name="Test" id="TestQDoc::Test" ref="testqdoc-test.html"/>
+ <keyword name="TestDerived" id="TestQDoc::TestDerived" ref="testqdoc-testderived.html"/>
+ <keyword name="TestQDoc" id="TestQDoc" ref="testqdoc.html"/>
+ <keyword name="Type" id="QML.Type" ref="qml-qdoc-test-type.html"/>
+ <keyword name="UI Components" id="UI Components" ref="uicomponents-qmlmodule.html"/>
+ <keyword name="abs" id="int::abs" ref="qml-int.html#abs-method"/>
+ <keyword name="active" id="DocTest::active" ref="qml-qdoc-test-doctest.html#active-prop"/>
+ <keyword name="anotherObsoleteMember" id="Test::anotherObsoleteMember" ref="testqdoc-test-obsolete.html#anotherObsoleteMember"/>
+ <keyword name="children" id="AbstractParent::children" ref="qml-qdoc-test-abstractparent.html#children-prop"/>
+ <keyword name="color" id="ProgressBar::color" ref="qml-uicomponents-progressbar.html#color-prop"/>
+ <keyword name="completed" id="Type::completed" ref="qml-qdoc-test-type.html#completed-signal"/>
+ <keyword name="configured" id="Type::configured" ref="qml-qdoc-test-type.html#configured-signal"/>
+ <keyword name="copy" id="Type::copy" ref="qml-qdoc-test-type.html#copy-method"/>
+ <keyword name="current" id="TabWidget::current" ref="qml-uicomponents-tabwidget.html#current-prop"/>
+ <keyword name="deprecatedMember" id="Test::deprecatedMember" ref="testqdoc-test-obsolete.html#deprecatedMember"/>
+ <keyword name="disable" id="Type::disable" ref="qml-qdoc-test-type.html#disable-method"/>
+ <keyword name="enable" id="Type::enable" ref="qml-qdoc-test-type.html#enable-method"/>
+ <keyword name="fail" id="DocTest::fail" ref="qml-qdoc-test-doctest.html#fail-method"/>
+ <keyword name="fifth" id="Type::fifth" ref="qml-qdoc-test-type.html#fifth-prop"/>
+ <keyword name="fourth" id="Type::fourth" ref="qml-qdoc-test-type.html#fourth-prop"/>
+ <keyword name="group.first" id="Type::group.first" ref="qml-qdoc-test-type.html#group.first-prop"/>
+ <keyword name="group.second" id="Type::group.second" ref="qml-qdoc-test-type.html#group.second-prop"/>
+ <keyword name="group.third" id="Type::group.third" ref="qml-qdoc-test-type.html#group.third-prop"/>
+ <keyword name="id" id="Type::id" ref="qml-qdoc-test-type.html#id-prop"/>
+ <keyword name="inlineFunction" id="Test::inlineFunction" ref="testqdoc-test.html#inlineFunction"/>
+ <keyword name="int" id="QML.int" ref="qml-int.html"/>
+ <keyword name="maximum" id="ProgressBar::maximum" ref="qml-uicomponents-progressbar.html#maximum-prop"/>
+ <keyword name="minimum" id="ProgressBar::minimum" ref="qml-uicomponents-progressbar.html#minimum-prop"/>
+ <keyword name="name" id="DocTest::name" ref="qml-qdoc-test-doctest.html#name-prop"/>
+ <keyword name="name" id="Type::name" ref="qml-qdoc-test-type.html#name-prop"/>
+ <keyword name="obsoleteMember" id="Test::obsoleteMember" ref="testqdoc-test-obsolete.html#obsoleteMember"/>
+ <keyword name="on" id="Switch::on" ref="qml-uicomponents-switch.html#on-prop"/>
+ <keyword name="overload" id="Test::overload" ref="testqdoc-test.html#overload"/>
+ <keyword name="rear" id="AbstractParent::rear" ref="qml-qdoc-test-abstractparent.html#rear-method"/>
+ <keyword name="sampleReadOnlyProperty" id="TabWidget::sampleReadOnlyProperty" ref="qml-uicomponents-tabwidget.html#sampleReadOnlyProperty-prop"/>
+ <keyword name="secondColor" id="ProgressBar::secondColor" ref="qml-uicomponents-progressbar.html#secondColor-prop"/>
+ <keyword name="someFunction" id="Test::someFunction" ref="testqdoc-test.html#someFunction"/>
+ <keyword name="someFunctionDefaultArg" id="Test::someFunctionDefaultArg" ref="testqdoc-test.html#someFunctionDefaultArg"/>
+ <keyword name="toggle" id="Switch::toggle" ref="qml-uicomponents-switch.html#toggle-method"/>
+ <keyword name="type" id="Type::type" ref="qml-qdoc-test-type.html#type-attached-prop"/>
+ <keyword name="value" id="ProgressBar::value" ref="qml-uicomponents-progressbar.html#value-prop"/>
+ <keyword name="virtualFun" id="Test::virtualFun" ref="testqdoc-test.html#virtualFun"/>
+ <keyword name="virtualFun" id="TestDerived::virtualFun" ref="testqdoc-testderived.html#virtualFun"/>
+ </keywords>
+ <files>
+ <file>qdoc-test-qmlmodule.html</file>
+ <file>qml-int.html</file>
+ <file>qml-qdoc-test-abstractparent-members.html</file>
+ <file>qml-qdoc-test-abstractparent.html</file>
+ <file>qml-qdoc-test-child-members.html</file>
+ <file>qml-qdoc-test-child.html</file>
+ <file>qml-qdoc-test-doctest-members.html</file>
+ <file>qml-qdoc-test-doctest.html</file>
+ <file>qml-qdoc-test-type-members.html</file>
+ <file>qml-qdoc-test-type.html</file>
+ <file>qml-uicomponents-progressbar-members.html</file>
+ <file>qml-uicomponents-progressbar.html</file>
+ <file>qml-uicomponents-switch-members.html</file>
+ <file>qml-uicomponents-switch.html</file>
+ <file>qml-uicomponents-tabwidget-members.html</file>
+ <file>qml-uicomponents-tabwidget.html</file>
+ <file>test-componentset-componentset-pro.html</file>
+ <file>test-componentset-example.html</file>
+ <file>test-componentset-progressbar-qml.html</file>
+ <file>test-componentset-switch-qml.html</file>
+ <file>test-componentset-tabwidget-qml.html</file>
+ <file>testcpp-module.html</file>
+ <file>testqdoc-test-members.html</file>
+ <file>testqdoc-test-obsolete.html</file>
+ <file>testqdoc-test.html</file>
+ <file>testqdoc-testderived-members.html</file>
+ <file>testqdoc-testderived.html</file>
+ <file>testqdoc.html</file>
+ <file>uicomponents-qmlmodule.html</file>
+ </files>
+ </filterSection>
+</QtHelpProject>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testcpp.index b/tests/auto/qdoc/generatedoutput/expected_output/testcpp.index
new file mode 100644
index 000000000..ae997fa52
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/testcpp.index
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QDOCINDEX>
+<INDEX url="" title="TestCPP Reference Documentation" version="" project="TestCPP">
+ <namespace name="" status="active" access="public" module="testcpp">
+ <function name="QDOCTEST_MACRO" href="testqdoc.html#QDOCTEST_MACRO" status="active" access="public" documented="true" related="true" meta="macrowithoutparams" virtual="non" const="false" static="false" final="false" override="false" type="" signature="QDOCTEST_MACRO"/>
+ <function name="QDOCTEST_MACRO2" href="testqdoc-test.html#QDOCTEST_MACRO2" status="active" access="public" documented="true" related="true" since="Test 1.1" meta="macrowithparams" virtual="non" const="false" static="false" final="false" override="false" type="" brief="A macro with argument x" signature="QDOCTEST_MACRO2( x)">
+ <parameter type="" name="x" default=""/>
+ </function>
+ <namespace name="TestQDoc" href="testqdoc.html" status="active" access="public" location="testcpp.h" documented="true" module="TestCPP" brief="A namespace">
+ <contents name="usage" title="Usage" level="1"/>
+ <function name="QDOCTEST_MACRO" href="testqdoc.html#QDOCTEST_MACRO" status="active" access="public" documented="true" related="true" meta="macrowithoutparams" virtual="non" const="false" static="false" final="false" override="false" type="" signature="QDOCTEST_MACRO"/>
+ <class name="Test" fullname="TestQDoc::Test" href="testqdoc-test.html" status="active" access="public" location="testcpp.h" documented="true" module="TestCPP" brief="A class in a namespace">
+ <function name="QDOCTEST_MACRO2" href="testqdoc-test.html#QDOCTEST_MACRO2" status="active" access="public" documented="true" related="true" since="Test 1.1" meta="macrowithparams" virtual="non" const="false" static="false" final="false" override="false" type="" brief="A macro with argument x" signature="QDOCTEST_MACRO2( x)">
+ <parameter type="" name="x" default=""/>
+ </function>
+ <function name="anotherObsoleteMember" fullname="TestQDoc::Test::anotherObsoleteMember" href="testqdoc-test-obsolete.html#anotherObsoleteMember" status="obsolete" access="public" location="testcpp.h" documented="true" meta="plain" virtual="non" const="false" static="false" final="false" override="false" type="void" signature="void anotherObsoleteMember()"/>
+ <function name="deprecatedMember" fullname="TestQDoc::Test::deprecatedMember" href="testqdoc-test-obsolete.html#deprecatedMember" status="obsolete" access="public" location="testcpp.h" documented="true" meta="plain" virtual="non" const="false" static="false" final="false" override="false" type="void" signature="void deprecatedMember()"/>
+ <function name="inlineFunction" fullname="TestQDoc::Test::inlineFunction" href="testqdoc-test.html#inlineFunction" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="non" const="false" static="false" final="false" override="false" type="void" brief="An inline function, documented using the \fn QDoc command" signature="void inlineFunction()"/>
+ <function name="obsoleteMember" fullname="TestQDoc::Test::obsoleteMember" href="testqdoc-test-obsolete.html#obsoleteMember" status="obsolete" access="public" location="testcpp.h" documented="true" meta="plain" virtual="non" const="false" static="false" final="false" override="false" type="void" signature="void obsoleteMember()"/>
+ <function name="overload" fullname="TestQDoc::Test::overload" href="testqdoc-test.html#overload" status="active" access="protected" location="testcpp.h" meta="plain" virtual="non" const="false" static="false" final="false" override="false" type="void" signature="void overload()"/>
+ <function name="overload" fullname="TestQDoc::Test::overload" href="testqdoc-test.html#overload-1" status="active" access="protected" location="testcpp.h" meta="plain" virtual="non" const="false" static="false" final="false" override="false" overload="true" overload-number="1" type="void" signature="void overload(bool b)">
+ <parameter type="bool" name="b" default=""/>
+ </function>
+ <function name="someFunction" fullname="TestQDoc::Test::someFunction" href="testqdoc-test.html#someFunction" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="non" const="false" static="false" final="false" override="false" type="int" signature="int someFunction(int v)">
+ <parameter type="int" name="v" default=""/>
+ </function>
+ <function name="someFunctionDefaultArg" fullname="TestQDoc::Test::someFunctionDefaultArg" href="testqdoc-test.html#someFunctionDefaultArg" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="non" const="false" static="false" final="false" override="false" type="void" signature="void someFunctionDefaultArg(int i, bool b)">
+ <parameter type="int" name="i" default=""/>
+ <parameter type="bool" name="b" default="false"/>
+ </function>
+ <function name="virtualFun" fullname="TestQDoc::Test::virtualFun" href="testqdoc-test.html#virtualFun" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="virtual" const="false" static="false" final="false" override="false" type="void" signature="void virtualFun()"/>
+ </class>
+ <class name="TestDerived" fullname="TestQDoc::TestDerived" href="testqdoc-testderived.html" status="active" access="public" location="testcpp.h" documented="true" bases="TestQDoc::Test" module="TestCPP" brief="A derived class in a namespace">
+ <function name="virtualFun" fullname="TestQDoc::TestDerived::virtualFun" href="testqdoc-testderived.html#virtualFun" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="virtual" const="false" static="false" final="false" override="true" type="void" signature="void virtualFun() override"/>
+ </class>
+ </namespace>
+ <module name="TestCPP" href="testcpp-module.html" status="active" documented="true" seen="true" title="QDoc Test C++ Classes" module="TestCPP" members="TestQDoc,Test,TestDerived" brief="A test module page"/>
+ </namespace>
+</INDEX>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html
index f3c8d55d0..84c0c4fe3 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html
@@ -61,6 +61,7 @@
<div class="fngroup">
<h3 class="fn fngroupitem" id="overload"><a name="overload"></a><code>[protected] </code><span class="type">void</span> Test::<span class="name">overload</span>()</h3><h3 class="fn fngroupitem" id="overload-1"><a name="overload-1"></a><code>[protected] </code><span class="type">void</span> Test::<span class="name">overload</span>(<span class="type">bool</span> <i>b</i>)</h3></div>
<p>Overloads that share a documentation comment, optionally taking a parameter <i>b</i>.</p>
+<p>This function was introduced in Test 1.2.</p>
<!-- @@@ -->
<!-- $$$inlineFunction[overload1]$$$inlineFunction -->
<h3 class="fn" id="inlineFunction"><a name="inlineFunction"></a><span class="type">void</span> Test::<span class="name">inlineFunction</span>()</h3>
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
index 6fe708176..68afd29e8 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
@@ -1,3 +1,7 @@
outputformats = DocBook
DocBook.nosubdirs = true
DocBook.outputsubdir = docbook
+
+# TODO: DocBook generator has trouble handling shared comment nodes
+# allow two warnings related to these
+warninglimit = 2
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/examples-qhp.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/examples-qhp.qdocconf
index b4598476e..a1ed619a3 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/examples-qhp.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/examples-qhp.qdocconf
@@ -1,5 +1,6 @@
# QML test includes a documented example
include(testqml.qdocconf)
+version = 0.0.1
examplesinstallpath = test
@@ -12,6 +13,22 @@ qhp.Test.virtualFolder = test
qhp.Test.indexTitle = UI Components
qhp.Test.indexRoot =
+qhp.Test.subprojects = test classes qmltypes undefined
+qhp.Test.subprojects.test.title = Test
+qhp.Test.subprojects.test.indexTitle = UI Components
+qhp.Test.subprojects.test.selectors = doc:page fake:example module qmlmodule
+qhp.Test.subprojects.test.sortPages = true
+
+qhp.Test.subprojects.classes.title = Classes
+qhp.Test.subprojects.classes.indexTitle = QDoc Test C++ Classes
+qhp.Test.subprojects.classes.selectors = class namespace doc:headerfile boop:whatever
+qhp.Test.subprojects.classes.sortPages = true
+
+qhp.Test.subprojects.qmltypes.title = QML Types
+qhp.Test.subprojects.qmltypes.indexTitle = UI Components
+qhp.Test.subprojects.qmltypes.selectors = qmlmodule:UIComponents,QDoc.Test
+qhp.Test.subprojects.qmltypes.sortPages = true
+
# Add some meta-data to the example
manifestmeta.filters = test
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf
index f6473ccf7..e4cef822e 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf
@@ -6,3 +6,7 @@ sources = ../outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
macro.beginqdoc = "\\c {/*!}"
macro.endqdoc = "\\c */"
+
+# zero warning tolerance
+warninglimit = 0
+warninglimit.enabled = true
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf
index 80ac58475..b07aa71c0 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf
@@ -5,3 +5,9 @@ headers = ../testcpp/testcpp.h
sources = ../testcpp/testcpp.cpp
macro.CMDFN = \\\\fn
+macro.nothing = \\dontdocument ()
+locationinfo = false
+
+# zero warning tolerance
+warninglimit = 0
+warninglimit.enabled = true
diff --git a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc
index c95e22125..4933bc4bd 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc
@@ -29,6 +29,7 @@
/*!
//! abstract-type
\qmltype AbstractParent
+ \inqmlmodule QDoc.Test
\ingroup qmltypes
\qmlabstract
\brief Abstract base QML type.
@@ -49,16 +50,3 @@
\brief Do some abstract parenting on \a child.
//! rear-qmlmethod
*/
-
-/*!
- \qmltype Child
- \ingroup qmltypes
- \inherits AbstractParent
- \brief A Child inheriting its parent.
-*/
-
-/*!
- \qmlbasictype int
- \ingroup qmltypes
- \brief An integer basic type.
-*/
diff --git a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf
index 1d981deb2..d64985942 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf
@@ -5,6 +5,8 @@ sourcedirs += src
excludedirs += excludes \
../qml/componentset
+excludefiles += ../qml/parent.qdoc
+
exampledirs += excludes
HTML.nosubdirs = true
diff --git a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc
index 7b4c00b76..a9a526c64 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc
@@ -49,3 +49,18 @@
\include parent.qdocinc
*/
+
+/*!
+ \qmltype Child
+ \inqmlmodule QDoc.Test
+ \ingroup qmltypes
+ \inherits AbstractParent
+ \brief A Child inheriting its parent.
+*/
+
+/*!
+ \qmlbasictype int
+ \inqmlmodule QDoc.Test
+ \ingroup qmltypes
+ \brief An integer basic type.
+*/
diff --git a/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc b/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc
index 2f56c221c..0816e624c 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc
@@ -40,18 +40,18 @@
and their public interfaces. The types are grouped into a module, the
\l{UI Components} module.
- The \l{componentset/uicomponents.qdoc.sample}{uicomponents.qdoc} file generates
+ The uicomponents.qdoc file generates
the overview page for the \l{UI Components} module page.
The generated documentation is available in the \l{UI Components} module.
\section1 QML Class
- The QML types use the \l{qmltype-command}{\\qmltype} to document the
- type. In addition, they have the \l{inmodule-command}{\\inmodule}
+ The QML types use the \\qmltype to document the
+ type. In addition, they have the \\inmodule
command in order for QDoc to associate them to the \c UIComponents module.
- QDoc uses the \l{brief-command}{\\brief} command to place a basic
+ QDoc uses the \\brief command to place a basic
description when listing the types.
\section1 Properties, Signals, Handlers, and Methods
@@ -62,7 +62,7 @@
documentation above the property, method, or signal.
To document the type of a \e {property alias}, you must use the
- \l{qmlproperty-command}{\\qmlproperty} command to specify the data type.
+ \\qmlproperty command to specify the data type.
\code
\qmlproperty int anAliasedProperty
@@ -72,17 +72,17 @@
\section2 Internal Documentation
You may declare that a documentation is for internal use by placing the
- \l{internal-command}{\\internal} command after the beginning QDoc comment
+ \\internal command after the beginning QDoc comment
\begincomment. QDoc will prevent the internal documentation from appearing
in the public API.
If you wish to omit certain parts of the documentation, you may use the
- \l{omit-command}{\\omit} and \l{omit-command}{\\endomit} command.
+ \\omit and \\endomit command.
\section1 QML Types with C++ Implementation
This example only demonstrates the documentation for types in QML
- files, but the regular \l{qml-documentation}{QML commands} may be placed
+ files, but the regular QML commands may be placed
inside C++ classes to define the public API of the QML type.
*/
@@ -95,7 +95,7 @@
This is a listing of a list of UI components implemented by QML types. These
files are available for general import and they are based on the
- \l{Qt Quick Examples and Tutorials}{Qt Quick Code Samples}.
+ Qt Quick Code Samples.
This module is part of the \l{componentset}{UIComponents} example.
*/
diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp
index c8b3f2f46..b1acdccf0 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp
+++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp
@@ -155,6 +155,7 @@ void TestDerived::virtualFun()
/*!
\fn TestQDoc::Test::overload()
\fn Test::overload(bool b)
+ \since Test 1.2
//! The second overload should match even without the fully qualified path
Overloads that share a documentation comment, optionally taking
@@ -166,7 +167,7 @@ void TestDerived::virtualFun()
\fn template <typename T1, typename T2> void TestQDoc::Test::funcTemplate(T1 a, T2 b)
\brief Function template with two parameters, \a a and \a b.
\else
- //! nothing
+ \nothing
\endif
*/
diff --git a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
index b3509dfff..5449a50e2 100644
--- a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
+++ b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
@@ -56,7 +56,7 @@ private slots:
void docBookFromQml();
// Output format independent tests
- void examplesManifestXml();
+ void examplesManifestXmlAndQhp();
void ignoresinceVariable();
void templateParameters();
void scopedEnum();
@@ -65,6 +65,8 @@ private slots:
void crossModuleLinking();
void includeFromExampleDirs();
void singleExec();
+ void preparePhase();
+ void generatePhase();
private:
QScopedPointer<QTemporaryDir> m_outputDir;
@@ -286,9 +288,11 @@ void tst_generatedOutput::docBookFromQml()
"docbook/qml-int.xml");
}
-void tst_generatedOutput::examplesManifestXml()
+void tst_generatedOutput::examplesManifestXmlAndQhp()
{
- testAndCompare("testdata/configs/examples-qhp.qdocconf", "examples-manifest.xml");
+ testAndCompare("testdata/configs/examples-qhp.qdocconf",
+ "examples-manifest.xml "
+ "test.qhp");
}
void tst_generatedOutput::ignoresinceVariable()
@@ -357,6 +361,22 @@ void tst_generatedOutput::singleExec()
"-single-exec");
}
+void tst_generatedOutput::preparePhase()
+{
+ testAndCompare("testdata/configs/testcpp.qdocconf",
+ "testcpp.index",
+ "-prepare");
+}
+
+void tst_generatedOutput::generatePhase()
+{
+ testAndCompare("testdata/configs/testcpp.qdocconf",
+ "testcpp-module.html "
+ "testqdoc-test.html "
+ "testqdoc-test-members.html "
+ "testqdoc.html",
+ "-generate");
+}
QTEST_APPLESS_MAIN(tst_generatedOutput)
diff --git a/tests/auto/qdoc/qdoc.pro b/tests/auto/qdoc/qdoc.pro
index 64a89cb14..c7af516ae 100644
--- a/tests/auto/qdoc/qdoc.pro
+++ b/tests/auto/qdoc/qdoc.pro
@@ -1,5 +1,6 @@
TEMPLATE = subdirs
SUBDIRS = \
+ config \
generatedoutput \
- qdoccommandlineparser
+ utilities
diff --git a/tests/auto/qdoc/utilities/tst_utilities.cpp b/tests/auto/qdoc/utilities/tst_utilities.cpp
new file mode 100644
index 000000000..0f63b1daf
--- /dev/null
+++ b/tests/auto/qdoc/utilities/tst_utilities.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "utilities.h"
+
+#include <QtTest/QtTest>
+
+QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(lcQdoc, "qt.test")
+QT_END_NAMESPACE
+
+class tst_Utilities : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void loggingCategoryName();
+ void loggingCategoryDefaults();
+ void startDebugging();
+ void stopDebugging();
+ void debugging();
+};
+
+void tst_Utilities::loggingCategoryName()
+{
+ const QString expected = "qt.test";
+ QCOMPARE(lcQdoc().categoryName(), expected);
+}
+
+void tst_Utilities::loggingCategoryDefaults()
+{
+ QVERIFY(lcQdoc().isCriticalEnabled());
+ QVERIFY(lcQdoc().isWarningEnabled());
+ QVERIFY(!lcQdoc().isDebugEnabled());
+ QVERIFY(lcQdoc().isInfoEnabled());
+}
+
+void tst_Utilities::startDebugging()
+{
+ QVERIFY(!lcQdoc().isDebugEnabled());
+ Utilities::startDebugging("test");
+ QVERIFY(lcQdoc().isDebugEnabled());
+}
+
+void tst_Utilities::stopDebugging()
+{
+ Utilities::startDebugging("test");
+ QVERIFY(lcQdoc().isDebugEnabled());
+ Utilities::stopDebugging("test");
+ QVERIFY(!lcQdoc().isDebugEnabled());
+}
+
+void tst_Utilities::debugging()
+{
+ QVERIFY(!lcQdoc().isDebugEnabled());
+ QVERIFY(!Utilities::debugging());
+ Utilities::startDebugging("test");
+ QVERIFY(lcQdoc().isDebugEnabled());
+ QVERIFY(Utilities::debugging());
+}
+
+QTEST_APPLESS_MAIN(tst_Utilities)
+
+#include "tst_utilities.moc"
diff --git a/tests/auto/qdoc/utilities/utilities.pro b/tests/auto/qdoc/utilities/utilities.pro
new file mode 100644
index 000000000..57489f2b1
--- /dev/null
+++ b/tests/auto/qdoc/utilities/utilities.pro
@@ -0,0 +1,12 @@
+CONFIG += testcase
+QT = core testlib
+TARGET = tst_utilities
+INCLUDEPATH += $$PWD/../../../../src/qdoc
+
+HEADERS += \
+ $$PWD/../../../../src/qdoc/loggingcategory.h \
+ $$PWD/../../../../src/qdoc/utilities.h
+
+SOURCES += \
+ tst_utilities.cpp \
+ $$PWD/../../../../src/qdoc/utilities.cpp