summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-18 03:02:10 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-18 03:02:10 +0100
commit60be66f17939ccbc6fcc73a16de45af6822851b8 (patch)
treedaae9ecc1f7e3a0ebc6b76e6baa27fd37d3e67ff
parent4092c74db6043d70caca36050c356cc5f2d46c86 (diff)
parentfab885ac1b5e5d3c130c033e4a1234e985179486 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
-rw-r--r--examples/assistant/remotecontrol/remotecontrol.h2
-rw-r--r--src/assistant/assistant/bookmarkdialog.cpp2
-rw-r--r--src/assistant/assistant/preferencesdialog.cpp4
-rw-r--r--src/assistant/help/qhelpfiltersettings.cpp2
-rw-r--r--src/assistant/help/qhelpfiltersettings_p.h2
-rw-r--r--src/assistant/help/qhelpfiltersettingswidget.cpp6
-rw-r--r--src/assistant/help/qhelpfiltersettingswidget.h11
-rw-r--r--src/designer/src/components/formeditor/dpi_chooser.cpp2
-rw-r--r--src/designer/src/components/formeditor/embeddedoptionspage.cpp2
-rw-r--r--src/designer/src/designer/qdesigner_appearanceoptions.cpp2
-rw-r--r--src/designer/src/lib/shared/formlayoutmenu.cpp2
-rw-r--r--src/designer/src/lib/shared/newformwidget.cpp2
-rw-r--r--src/designer/src/lib/shared/previewconfigurationwidget.cpp2
-rw-r--r--src/linguist/shared/formats.pri2
-rw-r--r--src/linguist/shared/proitems.h1
-rw-r--r--src/linguist/shared/qmakeparser.h1
-rw-r--r--src/qdoc/clangcodeparser.cpp7
-rw-r--r--src/qdoc/codemarker.cpp4
-rw-r--r--src/qdoc/config.cpp16
-rw-r--r--src/qdoc/config.h3
-rw-r--r--src/qdoc/doc.cpp4
-rw-r--r--src/qdoc/doc/qa-pages.qdoc2
-rw-r--r--src/qdoc/doc/qdoc-manual-DITA.qdoc164
-rw-r--r--src/qdoc/doc/qdoc-manual-contextcmds.qdoc10
-rw-r--r--src/qdoc/doc/qdoc-manual-markupcmds.qdoc151
-rw-r--r--src/qdoc/doc/qdoc-manual-qdocconf.qdoc75
-rw-r--r--src/qdoc/doc/qdoc-manual-topiccmds.qdoc24
-rw-r--r--src/qdoc/doc/qdoc-manual.qdoc2
-rw-r--r--src/qdoc/doc/qtgui-qdocconf.qdoc8
-rw-r--r--src/qdoc/docbookgenerator.cpp2610
-rw-r--r--src/qdoc/docbookgenerator.h173
-rw-r--r--src/qdoc/generator.cpp14
-rw-r--r--src/qdoc/htmlgenerator.cpp116
-rw-r--r--src/qdoc/htmlgenerator.h3
-rw-r--r--src/qdoc/location.cpp14
-rw-r--r--src/qdoc/location.h3
-rw-r--r--src/qdoc/main.cpp47
-rw-r--r--src/qdoc/node.cpp43
-rw-r--r--src/qdoc/node.h13
-rw-r--r--src/qdoc/qdocdatabase.cpp8
-rw-r--r--src/qdoc/qdoctagfiles.cpp25
-rw-r--r--src/qdoc/qmlmarkupvisitor.cpp3
-rw-r--r--src/qdoc/quoter.cpp2
-rw-r--r--src/qdoc/sections.cpp4
-rw-r--r--src/shared/fontpanel/fontpanel.cpp6
-rw-r--r--tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml13
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml26
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html28
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qdoc-test-qmlmodule.html23
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-int.html23
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html18
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html79
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-child-members.html18
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-child.html79
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-doctest-members.html18
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-doctest.html86
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-type-members.html31
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-type.html185
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/test.index75
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testcpp-module.html42
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test-members.html22
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test-obsolete.html36
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test.html91
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-testderived-members.html22
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-testderived.html48
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc.html64
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-abstractparent.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-child.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html28
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-progressbar.html10
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-switch.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-tabwidget.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html10
-rw-r--r--tests/auto/qdoc/generatedoutput/generatedoutput.pro2
-rw-r--r--tests/auto/qdoc/generatedoutput/includefromexampledirs/excludes/anotherindex.qdoc39
-rw-r--r--tests/auto/qdoc/generatedoutput/includefromexampledirs/excludes/parentinclude.qdoc64
-rw-r--r--tests/auto/qdoc/generatedoutput/includefromexampledirs/includefromexampledirs.qdocconf12
-rw-r--r--tests/auto/qdoc/generatedoutput/includefromexampledirs/src/includefromparent.qdoc51
-rw-r--r--tests/auto/qdoc/generatedoutput/includefromexampledirs/src/parent.qdocinc1
-rw-r--r--tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc4
-rw-r--r--tests/auto/qdoc/generatedoutput/testqml.qdocconf2
-rw-r--r--tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp9
85 files changed, 2906 insertions, 1982 deletions
diff --git a/examples/assistant/remotecontrol/remotecontrol.h b/examples/assistant/remotecontrol/remotecontrol.h
index 40e370f71..f59ffb7aa 100644
--- a/examples/assistant/remotecontrol/remotecontrol.h
+++ b/examples/assistant/remotecontrol/remotecontrol.h
@@ -64,7 +64,7 @@ class RemoteControl : public QMainWindow
Q_OBJECT
public:
- RemoteControl(QWidget *parent = nullptr, Qt::WindowFlags flags = 0);
+ RemoteControl(QWidget *parent = nullptr, Qt::WindowFlags flags = {});
~RemoteControl();
private:
diff --git a/src/assistant/assistant/bookmarkdialog.cpp b/src/assistant/assistant/bookmarkdialog.cpp
index 8207da04e..1ffe6dc84 100644
--- a/src/assistant/assistant/bookmarkdialog.cpp
+++ b/src/assistant/assistant/bookmarkdialog.cpp
@@ -60,7 +60,7 @@ BookmarkDialog::BookmarkDialog(BookmarkModel *sourceModel, const QString &title,
bookmarkProxyModel = new BookmarkFilterModel(this);
bookmarkProxyModel->setSourceModel(bookmarkModel);
ui.bookmarkFolders->setModel(bookmarkProxyModel);
- connect(ui.bookmarkFolders, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(ui.bookmarkFolders, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, QOverload<int>::of(&BookmarkDialog::currentIndexChanged));
bookmarkTreeModel = new BookmarkTreeModel(this);
diff --git a/src/assistant/assistant/preferencesdialog.cpp b/src/assistant/assistant/preferencesdialog.cpp
index ebd2a96e8..5dd24a102 100644
--- a/src/assistant/assistant/preferencesdialog.cpp
+++ b/src/assistant/assistant/preferencesdialog.cpp
@@ -200,13 +200,13 @@ void PreferencesDialog::updateFontSettingsPage()
const QList<QComboBox*> &appCombos = m_appFontPanel->findChildren<QComboBox*>();
for (QComboBox* box : appCombos) {
- connect(box, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(box, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &PreferencesDialog::appFontSettingChanged);
}
const QList<QComboBox*> &browserCombos = m_browserFontPanel->findChildren<QComboBox*>();
for (QComboBox* box : browserCombos) {
- connect(box, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(box, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &PreferencesDialog::browserFontSettingChanged);
}
}
diff --git a/src/assistant/help/qhelpfiltersettings.cpp b/src/assistant/help/qhelpfiltersettings.cpp
index e9a1c3f4e..206692179 100644
--- a/src/assistant/help/qhelpfiltersettings.cpp
+++ b/src/assistant/help/qhelpfiltersettings.cpp
@@ -107,7 +107,7 @@ QString QHelpFilterSettings::currentFilter() const
return d->m_currentFilter;
}
-QHelpFilterSettings QHelpFilterSettings::readSettings(QHelpFilterEngine *filterEngine)
+QHelpFilterSettings QHelpFilterSettings::readSettings(const QHelpFilterEngine *filterEngine)
{
QHelpFilterSettings filterSettings;
diff --git a/src/assistant/help/qhelpfiltersettings_p.h b/src/assistant/help/qhelpfiltersettings_p.h
index 50e30e492..da25d300e 100644
--- a/src/assistant/help/qhelpfiltersettings_p.h
+++ b/src/assistant/help/qhelpfiltersettings_p.h
@@ -73,7 +73,7 @@ public:
void setCurrentFilter(const QString &filterName);
QString currentFilter() const;
- static QHelpFilterSettings readSettings(QHelpFilterEngine *filterEngine);
+ static QHelpFilterSettings readSettings(const QHelpFilterEngine *filterEngine);
static bool applySettings(QHelpFilterEngine *filterEngine, const QHelpFilterSettings &settings);
private:
diff --git a/src/assistant/help/qhelpfiltersettingswidget.cpp b/src/assistant/help/qhelpfiltersettingswidget.cpp
index 15cc4f475..51c66c269 100644
--- a/src/assistant/help/qhelpfiltersettingswidget.cpp
+++ b/src/assistant/help/qhelpfiltersettingswidget.cpp
@@ -407,7 +407,7 @@ void QHelpFilterSettingsWidget::setAvailableVersions(const QList<QVersionNumber>
Reads the filter settings stored inside \a filterEngine and sets up
this filter settings widget accordingly.
*/
-void QHelpFilterSettingsWidget::readSettings(QHelpFilterEngine *filterEngine)
+void QHelpFilterSettingsWidget::readSettings(const QHelpFilterEngine *filterEngine)
{
Q_D(QHelpFilterSettingsWidget);
const QHelpFilterSettings settings = QHelpFilterSettings::readSettings(filterEngine);
@@ -419,9 +419,9 @@ void QHelpFilterSettingsWidget::readSettings(QHelpFilterEngine *filterEngine)
widget, to the \a filterEngine. The old settings stored in the filter
engine will be overwritten.
*/
-bool QHelpFilterSettingsWidget::applySettings(QHelpFilterEngine *filterEngine)
+bool QHelpFilterSettingsWidget::applySettings(QHelpFilterEngine *filterEngine) const
{
- Q_D(QHelpFilterSettingsWidget);
+ Q_D(const QHelpFilterSettingsWidget);
return QHelpFilterSettings::applySettings(filterEngine, d->filterSettings());
}
diff --git a/src/assistant/help/qhelpfiltersettingswidget.h b/src/assistant/help/qhelpfiltersettingswidget.h
index 1b6606054..c3c77305f 100644
--- a/src/assistant/help/qhelpfiltersettingswidget.h
+++ b/src/assistant/help/qhelpfiltersettingswidget.h
@@ -42,7 +42,7 @@
#include <QtHelp/qhelp_global.h>
-#include <QtWidgets/QWidget>
+#include <QtWidgets/qwidget.h>
QT_BEGIN_NAMESPACE
@@ -55,7 +55,7 @@ class QHELP_EXPORT QHelpFilterSettingsWidget : public QWidget
{
Q_OBJECT
public:
- QHelpFilterSettingsWidget(QWidget *parent);
+ explicit QHelpFilterSettingsWidget(QWidget *parent = nullptr);
~QHelpFilterSettingsWidget();
@@ -63,8 +63,8 @@ public:
void setAvailableVersions(const QList<QVersionNumber> &versions);
// TODO: filterEngine may be moved to c'tor or to setFilterEngine() setter
- void readSettings(QHelpFilterEngine *filterEngine);
- bool applySettings(QHelpFilterEngine *filterEngine);
+ void readSettings(const QHelpFilterEngine *filterEngine);
+ bool applySettings(QHelpFilterEngine *filterEngine) const;
private:
QScopedPointer<class QHelpFilterSettingsWidgetPrivate> d_ptr;
@@ -74,5 +74,4 @@ private:
QT_END_NAMESPACE
-#endif
-
+#endif // QHELPFILTERSETTINGSWIDGET_H
diff --git a/src/designer/src/components/formeditor/dpi_chooser.cpp b/src/designer/src/components/formeditor/dpi_chooser.cpp
index 5e2f9f605..a254bf12a 100644
--- a/src/designer/src/components/formeditor/dpi_chooser.cpp
+++ b/src/designer/src/components/formeditor/dpi_chooser.cpp
@@ -94,7 +94,7 @@ DPI_Chooser::DPI_Chooser(QWidget *parent) :
setFocusProxy(m_predefinedCombo);
m_predefinedCombo->setEditable(false);
m_predefinedCombo->setCurrentIndex(0);
- connect(m_predefinedCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(m_predefinedCombo, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &DPI_Chooser::syncSpinBoxes);
// top row with predefined settings
QVBoxLayout *vBoxLayout = new QVBoxLayout;
diff --git a/src/designer/src/components/formeditor/embeddedoptionspage.cpp b/src/designer/src/components/formeditor/embeddedoptionspage.cpp
index 85cc1f930..062fc6e4f 100644
--- a/src/designer/src/components/formeditor/embeddedoptionspage.cpp
+++ b/src/designer/src/components/formeditor/embeddedoptionspage.cpp
@@ -145,7 +145,7 @@ void EmbeddedOptionsControlPrivate::init(EmbeddedOptionsControl *q)
m_profileCombo->setEditable(false);
hLayout->addWidget(m_profileCombo);
m_profileCombo->addItem(EmbeddedOptionsControl::tr("None"));
- EmbeddedOptionsControl::connect(m_profileCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ EmbeddedOptionsControl::connect(m_profileCombo, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
m_q, &EmbeddedOptionsControl::slotProfileIndexChanged);
m_addButton->setIcon(createIconSet(QString::fromUtf8("plus.png")));
diff --git a/src/designer/src/designer/qdesigner_appearanceoptions.cpp b/src/designer/src/designer/qdesigner_appearanceoptions.cpp
index 66eb49c9f..fbcfacc6e 100644
--- a/src/designer/src/designer/qdesigner_appearanceoptions.cpp
+++ b/src/designer/src/designer/qdesigner_appearanceoptions.cpp
@@ -65,7 +65,7 @@ QDesignerAppearanceOptionsWidget::QDesignerAppearanceOptionsWidget(QWidget *pare
m_ui->m_uiModeCombo->addItem(tr("Docked Window"), QVariant(DockedMode));
m_ui->m_uiModeCombo->addItem(tr("Multiple Top-Level Windows"), QVariant(TopLevelMode));
- connect(m_ui->m_uiModeCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(m_ui->m_uiModeCombo, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &QDesignerAppearanceOptionsWidget::slotUiModeComboChanged);
m_ui->m_fontPanel->setCheckable(true);
diff --git a/src/designer/src/lib/shared/formlayoutmenu.cpp b/src/designer/src/lib/shared/formlayoutmenu.cpp
index 48d6ee488..58631b5db 100644
--- a/src/designer/src/lib/shared/formlayoutmenu.cpp
+++ b/src/designer/src/lib/shared/formlayoutmenu.cpp
@@ -154,7 +154,7 @@ FormLayoutRowDialog::FormLayoutRowDialog(QDesignerFormEditorInterface *core,
m_ui.fieldClassComboBox->addItems(fieldWidgetClasses(core));
m_ui.fieldClassComboBox->setCurrentIndex(0);
connect(m_ui.fieldClassComboBox,
- QOverload<int>::of(&QComboBox::currentIndexChanged),
+ QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &FormLayoutRowDialog::fieldClassChanged);
updateOkButton();
diff --git a/src/designer/src/lib/shared/newformwidget.cpp b/src/designer/src/lib/shared/newformwidget.cpp
index dda60fd16..67e08c475 100644
--- a/src/designer/src/lib/shared/newformwidget.cpp
+++ b/src/designer/src/lib/shared/newformwidget.cpp
@@ -179,7 +179,7 @@ NewFormWidget::NewFormWidget(QDesignerFormEditorInterface *core, QWidget *parent
m_deviceProfiles = settings.deviceProfiles();
m_ui->profileComboBox->addItem(tr("None"));
connect(m_ui->profileComboBox,
- QOverload<int>::of(&QComboBox::currentIndexChanged),
+ QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &NewFormWidget::slotDeviceProfileIndexChanged);
if (m_deviceProfiles.isEmpty()) {
m_ui->profileComboBox->setEnabled(false);
diff --git a/src/designer/src/lib/shared/previewconfigurationwidget.cpp b/src/designer/src/lib/shared/previewconfigurationwidget.cpp
index 4aa68d083..1f7649975 100644
--- a/src/designer/src/lib/shared/previewconfigurationwidget.cpp
+++ b/src/designer/src/lib/shared/previewconfigurationwidget.cpp
@@ -317,7 +317,7 @@ PreviewConfigurationWidget::PreviewConfigurationWidget(QDesignerFormEditorInterf
this, &PreviewConfigurationWidget::slotEditAppStyleSheet);
connect(m_impl->skinRemoveButton(), &QAbstractButton::clicked,
this, &PreviewConfigurationWidget::slotDeleteSkinEntry);
- connect(m_impl->skinCombo(), QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(m_impl->skinCombo(), QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &PreviewConfigurationWidget::slotSkinChanged);
m_impl->retrieveSettings();
diff --git a/src/linguist/shared/formats.pri b/src/linguist/shared/formats.pri
index d77dacac5..876fe50cc 100644
--- a/src/linguist/shared/formats.pri
+++ b/src/linguist/shared/formats.pri
@@ -9,7 +9,7 @@ SOURCES += \
HEADERS += \
$$PWD/translator.h \
$$PWD/translatormessage.h \
- $$PWF/xmlparser.h
+ $$PWD/xmlparser.h
# "real" formats readers and writers
SOURCES += \
diff --git a/src/linguist/shared/proitems.h b/src/linguist/shared/proitems.h
index c7af53b1c..37a25196a 100644
--- a/src/linguist/shared/proitems.h
+++ b/src/linguist/shared/proitems.h
@@ -67,6 +67,7 @@ class ProString {
public:
ProString();
ProString(const ProString &other);
+ ProString &operator=(const ProString &) = default;
PROITEM_EXPLICIT ProString(const QString &str);
PROITEM_EXPLICIT ProString(const QStringRef &str);
PROITEM_EXPLICIT ProString(const char *str);
diff --git a/src/linguist/shared/qmakeparser.h b/src/linguist/shared/qmakeparser.h
index ae76d8c46..22da3c69f 100644
--- a/src/linguist/shared/qmakeparser.h
+++ b/src/linguist/shared/qmakeparser.h
@@ -111,7 +111,6 @@ private:
struct BlockScope {
BlockScope() : start(nullptr), braceLevel(0), special(false), inBranch(false), nest(NestNone) {}
- BlockScope(const BlockScope &other) { *this = other; }
ushort *start; // Where this block started; store length here
int braceLevel; // Nesting of braces in scope
bool special; // Single-line conditionals inside loops, etc. cannot have else branches
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp
index 6768c3a1a..366e2671e 100644
--- a/src/qdoc/clangcodeparser.cpp
+++ b/src/qdoc/clangcodeparser.cpp
@@ -155,8 +155,7 @@ static QStringList getTemplateParameters(CXCursor cursor)
static QString templateDecl(CXCursor cursor)
{
QStringList params = getTemplateParameters(cursor);
- return QLatin1String("template <") + params.join(QLatin1String(", ")) +
- QLatin1Char('>');
+ return QLatin1String("template <") + params.join(QLatin1String(", ")) + QLatin1Char('>');
}
/*!
@@ -690,8 +689,8 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
auto classe = static_cast<ClassNode *>(parent_);
if (baseNode == nullptr || !baseNode->isClassNode()) {
QString bcName = reconstructQualifiedPathForCursor(baseCursor);
- classe->addUnresolvedBaseClass(access,
- bcName.split(QLatin1String("::"), QString::SkipEmptyParts), bcName);
+ classe->addUnresolvedBaseClass(
+ access, bcName.split(QLatin1String("::"), QString::SkipEmptyParts), bcName);
return CXChildVisit_Continue;
}
auto baseClasse = static_cast<ClassNode *>(baseNode);
diff --git a/src/qdoc/codemarker.cpp b/src/qdoc/codemarker.cpp
index ab8b53039..070218b6e 100644
--- a/src/qdoc/codemarker.cpp
+++ b/src/qdoc/codemarker.cpp
@@ -66,9 +66,7 @@ CodeMarker::~CodeMarker()
A code market performs no initialization by default. Marker-specific
initialization is performed in subclasses.
*/
-void CodeMarker::initializeMarker()
-{
-}
+void CodeMarker::initializeMarker() {}
/*!
Terminating a code marker is trivial.
diff --git a/src/qdoc/config.cpp b/src/qdoc/config.cpp
index 04c39281b..f6df0823b 100644
--- a/src/qdoc/config.cpp
+++ b/src/qdoc/config.cpp
@@ -276,7 +276,7 @@ Config::~Config()
*/
void Config::clear()
{
- loc = lastLocation_ = Location::null;
+ loc = lastLocation_ = Location();
configVars_.clear();
includeFilesMap_.clear();
}
@@ -329,12 +329,12 @@ void Config::load(const QString &fileName)
if (configVars_.contains(CONFIG_PROJECT))
reset();
- load(Location::null, fileName);
+ load(Location(), fileName);
if (loc.isEmpty())
loc = Location(fileName);
else
loc.setEtc(true);
- lastLocation_ = Location::null;
+ lastLocation_ = Location();
// Add defines and includepaths from command line to their
// respective configuration variables. Values set here are
@@ -728,8 +728,12 @@ QString Config::getIncludeFilePath(const QString &fileName) const
if (!includeFilesMap_.contains(ext)) {
QSet<QString> t;
QStringList result;
- const QStringList dirs = getCanonicalPathList(CONFIG_SOURCEDIRS);
- for (const auto &dir : dirs)
+ const auto sourceDirs = getCanonicalPathList(CONFIG_SOURCEDIRS);
+ for (const auto &dir : sourceDirs)
+ result += getFilesHere(dir, ext, location(), t, t);
+ // Append the include files from the exampledirs as well
+ const auto exampleDirs = getCanonicalPathList(CONFIG_EXAMPLEDIRS);
+ for (const auto &dir : exampleDirs)
result += getFilesHere(dir, ext, location(), t, t);
includeFilesMap_.insert(ext, result);
}
@@ -969,7 +973,7 @@ bool Config::isMetaKeyChar(QChar ch)
*/
QStringList Config::loadMaster(const QString &fileName)
{
- Location location = Location::null;
+ Location location;
QFile fin(fileName);
if (!fin.open(QFile::ReadOnly | QFile::Text)) {
if (!Config::installDir.isEmpty()) {
diff --git a/src/qdoc/config.h b/src/qdoc/config.h
index 36023b38a..151a8caee 100644
--- a/src/qdoc/config.h
+++ b/src/qdoc/config.h
@@ -50,7 +50,8 @@ class Singleton
public:
Singleton(const Singleton &) = delete;
Singleton &operator=(const Singleton &) = delete;
- static T &instance() {
+ static T &instance()
+ {
static T instance;
return instance;
}
diff --git a/src/qdoc/doc.cpp b/src/qdoc/doc.cpp
index 1720fbaeb..d6dc2871e 100644
--- a/src/qdoc/doc.cpp
+++ b/src/qdoc/doc.cpp
@@ -328,7 +328,7 @@ typedef QMap<QString, ArgList> CommandMap;
class DocPrivate : public Shared
{
public:
- DocPrivate(const Location &start = Location::null, const Location &end = Location::null,
+ DocPrivate(const Location &start = Location(), const Location &end = Location(),
const QString &source = QString());
~DocPrivate();
@@ -1375,7 +1375,7 @@ void DocParser::parse(const QString &source, DocPrivate *docPrivate,
// The QML and JS property group commands are no longer required
// for grouping QML and JS properties. They are allowed but ignored.
location().warning(tr("Unknown command '\\%1'").arg(cmdStr),
- detailsUnknownCommand(metaCommandSet,cmdStr));
+ detailsUnknownCommand(metaCommandSet, cmdStr));
}
enterPara();
append(Atom::UnknownCommand, cmdStr);
diff --git a/src/qdoc/doc/qa-pages.qdoc b/src/qdoc/doc/qa-pages.qdoc
index 5602ba3e0..c69b1cdc6 100644
--- a/src/qdoc/doc/qa-pages.qdoc
+++ b/src/qdoc/doc/qa-pages.qdoc
@@ -27,7 +27,7 @@
/*!
\page 28-qdoc-qa-pages.html
- \previouspage Generating DITA XML Output
+ \previouspage The QDoc Configuration File
\contentspage QDoc Manual
\nextpage QDoc Manual
diff --git a/src/qdoc/doc/qdoc-manual-DITA.qdoc b/src/qdoc/doc/qdoc-manual-DITA.qdoc
deleted file mode 100644
index 116082628..000000000
--- a/src/qdoc/doc/qdoc-manual-DITA.qdoc
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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 Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page 21-0-qdoc-creating-dita-maps.html
- \previouspage Miscellaneous
- \contentspage QDoc Manual
- \nextpage The QDoc Configuration File
-
- \title Creating DITA Maps
-
- You can create DITA map files using three new qdoc commands, the \l{ditamap-command}
- {ditamap} command, the \l{topicref-command} {topicref} command, and the \l{mapref-command}
- {mapref} command. How these DITA maps will be used automatically or manually by the
- documentation build process is still under consideration. This section will be updated
- as the decisions are made.
-
- \section1 What is a DITA Map?
-
- A complete description of DITA can be found at the
- \l{http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=dita}
- {OASIS Darwin Information Typing Architecture} site.
-
- An explanation of the DITA map is found at that site
- \l{http://docs.oasis-open.org/dita/v1.2/os/spec/langref/map.html}{here}.
-
- \target ditamap-command
- \section1 \\ditamap
-
- The \\ditamap command is for creating a DITA map using qdoc commands.
- The \\ditamap command is a kind of \\page command that produces a
- \e{.ditamap} instead of a \e{.html} or \e{.xml} file. The file that
- is created actually contains XML text, but the \e{.ditamap} suffix is
- used to identify the file as containing a DITA MAP.
-
- The argument is the name of the file to be created. In the following
- example, the file \e{creator.ditamap} is output:
- \code
- \ditamap creator.ditamap
- \endcode
-
- \target topicref-command
- \section1 \\topicref \\endtopicref
-
- The \\topicref \\endtopicref commands are for creating a topicref
- in the ditamap. The \\endtopicref command is required because
- \\topicref commands can be nested.
-
- \\topicref has two arguments. The first argument becomes the value
- of the \e navtitle attribute. Normally, you use the title of the
- topic being referenced. This title is often what will appear in a
- table of contents constructed from the ditamap.
-
- The second argument is the name of the page being referenced. The
- second argument is actually optional, for example if you are using
- a topicref as a container for other topicrefs and maprefs. It is
- also optional if you want qdoc to find the page name for you by
- looking up the title in its internal data structure. It is recommended
- that you provide the second parameter if you know the page name.
-
- \code
- \topicref {QML Module QtQuick 2} {qtquick-2.xml}
- \mapref {Creator Manual} {creator-manual.ditamap} \endmapref
- \topicref {QML Mouse Events} {qtquick2-mouseevents.xml} \endtopicref
- \topicref {Property Binding} {qtquick2-propertybinding.xml} \endtopicref
- \endtopicref
- \endcode
-
- \target mapref-command
- \section1 \\mapref
-
- The \\mapref command is for creating a mapref in the ditamap. A
- mapref refers to another ditamap, which you want to include in
- your ditamap. Like the \\topicref command, the \\mapref command
- has two arguments, but for the \\mapref command, both arguments
- are required. The arguments are essentially the same as described
- for \\topicref, but for \\mapref, the second command must be the
- name of another ditamap, i.e. it must have the \e{.ditamap}
- suffix. You must provide the file name. qdoc can't look up the
- file name for you.
-
- \code
- \mapref {Creator Manual} {creator-manual.ditamap} \endmapref
- \endcode
-
- \section1 An Example Ditamap Page
-
- The following example uses the three qdoc ditamap commands described above.
-
- \code
- \ditamap creator.ditamap
- \title The DITA Map for Creator
-
- \topicref {QML Module QtQuick 1}
- \topicref {QML Mouse Events} \endtopicref
- \topicref {Property Binding} \endtopicref
- \endtopicref
-
- \topicref {QML Module QtQuick 2} {qtquick-2.xml}
- \mapref {Creator Manual} {creator-manual.ditamap} \endmapref
- \topicref {QML Mouse Events} {qtquick2-mouseevents.xml} \endtopicref
- \topicref {Property Binding} {qtquick2-propertybinding.xml} \endtopicref
- \endtopicref
-
- \topicref {QML Module QtQuick.Particles 2} {qtquick-particles-2.xml}
- \topicref {Age} {qml-qtquick-particles2-age.xml} \endtopicref
- \endtopicref
- \endcode
-
- \section1 The Resulting Ditamap File
-
- This is the \e{.ditamap} file you get when you input the qdoc
- ditamap page shown above. Note that you can write ditamap files
- directly in XML just as easily as you can write them using the
- qdoc commands. The choice is yours.
-
- \code
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
- <map>
- <topicmeta>
- <shortdesc>The DITA Map for Creator</shortdesc>
- </topicmeta>
- <topicref navtitle="QML Module QtQuick 1" href="qtquick-1.xml">
- <topicref navtitle="QML Mouse Events" href="qtquick2-mouseevents.xml"/>
- <topicref navtitle="Property Binding" href="qtquick2-propertybinding.xml"/>
- </topicref>
- <topicref navtitle="QML Module QtQuick 2" href="qtquick-2.xml">
- <mapref navtitle="Creator Manual" href="creator-manual.ditamap"/>
- <topicref navtitle="QML Mouse Events" href="qtquick2-mouseevents.xml"/>
- <topicref navtitle="Property Binding" href="qtquick2-propertybinding.xml"/>
- </topicref>
- <topicref navtitle="QML Module QtQuick.Particles 2" href="qtquick-particles-2.xml">
- <topicref navtitle="Age" href="qml-qtquick-particles2-age.xml"/>
- </topicref>
- </map>
- \endcode
-
-*/
-
diff --git a/src/qdoc/doc/qdoc-manual-contextcmds.qdoc b/src/qdoc/doc/qdoc-manual-contextcmds.qdoc
index 2c42493e8..d3cf23b76 100644
--- a/src/qdoc/doc/qdoc-manual-contextcmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-contextcmds.qdoc
@@ -672,11 +672,11 @@
\endcode
QDoc includes this line on the reference page for the
- \l{http://qt-project.org/doc/qt-4.7/qml-pauseanimation.html} {PauseAnimation}
+ \l [QML] PauseAnimation
element:
\quotation
- Inherits \l{http://qt-project.org/doc/qt-4.7/qml-animation.html} {Animation}
+ Inherits \l [QML] Animation
\endquotation
\target overload-command
@@ -693,9 +693,9 @@
should be fully documented. Each overload can have whatever extra
documentation you want to add for just that overloaded version.
- From Qt 4.5, you can include the function name plus '()' as a
- parameter to the \b{\\overload} command, which will include a
- standard \e{This function overloads...} line of text with a link
+ You can include the function name plus '()' as a parameter to
+ the \b{\\overload} command, which will include a standard
+ \e{This function overloads...} line of text with a link
to the documentation for the primary version of the function.
\code
diff --git a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
index 9c11fdd49..386501cd3 100644
--- a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
@@ -240,21 +240,6 @@
}
\endcode
- If qdoc is generating DITA XML, it will translate the commands to:
-
- \code
- <sectiondiv outputclass="float-right">
- <p>
- <fig>
- <image href="images/qml-column.png" placement="inline"/>
- </fig>
- </p>
- </sectiondiv>
- \endcode
-
- Your DITA XML publishing program must then recognize the \e
- {outputclass} attribute value.
-
\note Note that the \b {\\div} command can be nested.
Below you can find an example taken from the index.qdoc file used to
@@ -320,53 +305,6 @@
\enddiv
\enddiv
- When generating DITA XML, qdoc outputs the nested \e {div} commands as:
-
- \code
- <sectiondiv outputclass="indexbox guide">
- <sectiondiv outputclass="heading">
- <p>Qt Developer Guide</p>
- </sectiondiv>
- <sectiondiv outputclass="indexboxcont indexboxbar">
- <sectiondiv outputclass="section indexIcon"/>
- <sectiondiv outputclass="section">
- <p>Qt is a cross-platform application and UI
- framework. Using Qt, you can write
- web-enabled applications once and deploy
- them across desktop, mobile and embedded
- operating systems without rewriting the
- source code.
- </p>
- </sectiondiv>
- <sectiondiv outputclass="section sectionlist">
- <ul>
- <li>
- <xref href="gettingstarted.xml#id-606ee7a8-219b-47b7-8f94-91bc8c76e54c">Getting started</xref>
- </li>
- <li>
- <xref href="installation.xml#id-075c20e2-aa1e-4f88-a316-a46517e50443">Installation</xref>
- </li>
- <li>
- <xref href="how-to-learn-qt.xml#id-49f509b5-52f9-4cd9-9921-74217b9a5182">How to learn Qt</xref>
- </li>
- <li>
- <xref href="tutorials.xml#id-a737f955-a904-455f-b4aa-0dc69ed5a64f">Tutorials</xref>
- </li>
- <li>
- <xref href="all-examples.xml#id-98d95159-d65b-4706-b08f-13d80080448d">Examples</xref>
- </li>
- <li>
- <xref href="qt4-7-intro.xml#id-519ae0e3-4242-4c2a-b2be-e05d1e95f177">What's new in Qt 4.7</xref>
- </li>
- </ul>
- </sectiondiv>
- </sectiondiv>
- </sectiondiv>
- \endcode
-
- Your DITA XML publishing program must recognize the values of the
- \e {outputclass} attribute.
-
See also \l {span-command} {\\span}.
\target span-command
@@ -640,7 +578,6 @@
The \\uicontrol command is used to mark content as being used for UI
control elements. When using HTML, the output is rendered in bold.
- When using DITA XML the content is enclosed in a \c{uicontrol} tag.
\sa \\b
@@ -2837,13 +2774,6 @@
* /
\endcode
- \note This doesn't work in DITA XML, so don't use it because it
- produces a DITA XML file that doesn't validate. There probably is
- a way to do this in DITA, so if we figure it out, we will put it
- in. But this capability is not used anywhere other than right
- here, so it probably isn't important. For now, if you use this
- option, qdoc will ignore it and produce a list without it.
-
QDoc renders this as:
\list G
@@ -3363,7 +3293,7 @@
\page 12-0-qdoc-commands-miscellaneous.html
\previouspage Special Content
\contentspage QDoc Manual
- \nextpage Creating DITA Maps
+ \nextpage The QDoc Configuration File
\title Miscellaneous
@@ -3725,16 +3655,16 @@
The command is useful when some snippet of commands or text is to
be used in multiple places in the documentation. Use the \\include
command wherever you want to insert a snippet into the documentation.
- The file containing the snippet to include must be located under the
- path(s) listed in the \l{sourcedirs-variable}{sourcedirs} QDoc
- configuration variable. It can be either any source file parsed
- by QDoc (or even the same one where \\include command is used), or
- any other text file. To store snippets in a separate file that is
- not meant to be parsed by QDoc, use a file extension that is not
- listed in \l {sources.fileextensions-variable}{sources.fileextensions};
+ The file containing the snippet to include, must be located under the
+ path(s) listed in the \l{sourcedirs-variable}{sourcedirs} or
+ \l{exampledirs-variable}{exampledirs} QDoc configuration variable.
+ It can be either any source file parsed by QDoc (or even the same one
+ where \\include command is used), or any other text file. To store
+ snippets in a separate file that is not meant to be parsed by QDoc,
+ use a file extension that is not listed in
+ \l{sources.fileextensions-variable}{sources.fileextensions};
for example, \c .qdocinc.
-
The command can have either one or two arguments. The first
argument is always a file name. The contents of the file must be
QDoc input, in other words, a sequence of QDoc commands and text, but
@@ -3799,8 +3729,7 @@
\target meta-command
\section1 \\meta
- The \\meta command is mainly used for including metadata in DITA
- XML files. It is also used for adding metadata to example documentation,
+ The \\meta command is used for adding metadata to example documentation,
and when generating HTML output for specifying the \e maintainer(s) of a
C++ class.
@@ -3826,46 +3755,7 @@
\endcode
When running QDoc to generate HTML, the example above will have no
- effect on the generated output, but if you run QDoc to generate
- DITA XML, the example will generate the following:
-
- \code
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE cxxClass PUBLIC "-//NOKIA//DTD DITA C++ API Class Reference Type v0.6.0//EN" "dtd/cxxClass.dtd">
- <!--qwidget.cpp-->
- <cxxClass id="id-9a14268e-6b09-4eee-b940-21a00a0961df">
- <apiName>QWidget</apiName>
- <shortdesc>the QWidget class is the base class of all user interface objects.</shortdesc>
- <prolog>
- <author>Qt Development Frameworks</author>
- <publisher>Qt Project</publisher>
- <copyright>
- <copyryear year="2020"/>
- <copyrholder>Qt Project</copyrholder>
- </copyright>
- <permissions view="all"/>
- <metadata>
- <audience type="designer"/>
- <audience type="programmer"/>
- <audience type="user"/>
- <category>Class reference</category>
- <prodinfo>
- <prodname>Qt Reference Documentation</prodname>
- <vrmlist>
- <vrm version="4" release="7" modification="3"/>
- </vrmlist>
- <component>QtGui</component>
- </prodinfo>
- <othermeta name="platform" content="MeeGo"/>
- <othermeta name="platform" content="macOS 10.6"/>
- <othermeta name="technology" content="User Interface"/>
- </metadata>
- </prolog>
- \endcode
-
- In the example output, several values have been set using default
- values obtained from the QDoc configuration file. See \l
- {Generating DITA XML Output} for details.
+ effect on the generated output.
\b {Example Metadata}
@@ -3888,6 +3778,22 @@
This would result in the following tags: \e {tutorial,basic,hello,world}.
Common words such as \e example are ignored.
+ \b {Example Install Paths}
+
+ The \\meta command combined with an argument \c installpath specifies the
+ location of an installed example. This value overrides the one that is set
+ using the \c examplesinstallpath configuration variable.
+
+ \badcode
+ / *!
+ \example helloworld
+ \title Hello World Example
+ \meta {installpath} {tutorials}
+ * /
+ \endcode
+
+ See also \l {examplesinstallpath}.
+
\target noautolist-command
\section1 \\noautolist
@@ -3968,8 +3874,7 @@
The \\raw command and the corresponding
\\endraw command delimit a block of raw mark-up language code.
- \note Avoid using this command if possible, because it generates
- DITA XML code that causes problems. If you are trying to generate
+ \note Avoid using this command if possible. If you are trying to generate
special table or list behavior, try to get the behavior you want
using the \l {span-command} {\\span} and \l {div-command} {\\div}
commands in your \l {table-command} {\\table} or \l {list-command}
diff --git a/src/qdoc/doc/qdoc-manual-qdocconf.qdoc b/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
index 98a84fe26..62ac13c28 100644
--- a/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
+++ b/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
@@ -27,7 +27,7 @@
/*!
\page 21-0-qdoc-configuration.html
- \previouspage Creating DITA Maps
+ \previouspage Miscellaneous
\contentspage QDoc Manual
\nextpage Generic Configuration Variables
@@ -821,9 +821,7 @@
A macro variable can be restricted for use in one type of output
generation. By appending \c {.HTML} to the macro name, for
- example, the macro is only used when generating HTML output. By
- appending \c {.DITAXML} to the macro name, the macro is only used
- when generating DITA XML.
+ example, the macro is only used when generating HTML output.
\badcode
macro.gui = "\\b"
@@ -1277,7 +1275,7 @@
QT_VERSION_STR is defined in qglobal.h as follows
\badcode
- #define QT_VERSION_STR "4.0.1"
+ #define QT_VERSION_STR "5.14.1"
\endcode
When a version number is specified (using the \tt{\l version} or
@@ -1782,14 +1780,14 @@
\badcode
project = Qt
description = Qt Reference Documentation
- url = http://doc.qt.io/qt-4.8/
+ url = https://doc.qt.io/qt/
...
\endcode
This makes sure that whenever \c qt.index is used to generate
references to for example Qt classes, the base URL is \c
- http://doc.qt.io/qt-4.8/.
+ https://doc.qt.io/qt/.
See also \l indexes and \l {url.examples}.
@@ -1857,7 +1855,7 @@
\badcode
project = Qt
description = Qt Reference Documentation
- url = http://doc.qt.io/qt-4.8/
+ url = http://doc.qt.io/qt/
...
\endcode
@@ -1951,71 +1949,12 @@
another tag is applied to all examples by using just \c {*} as the
match string.
*/
-/*!
- \page 21-3-qt-dita-xml-output.html
- \previouspage minimum.qdocconf
- \contentspage QDoc Manual
- \nextpage QA Pages
-
- \title Generating DITA XML Output
-
- QDoc can generate \l {http://dita.xml.org} {DITA XML output}.
-
- In your configuration file, set your \c {outputformats} variable
- to \c {DITAXML}, and send the output to an appropriate directory:
-
- \badcode
- outputdir = $QTDIR/doc/ditaxml
- outputformats = DITAXML
- \endcode
-
- And include these macros in your configuration file to prevent
- QDoc from doing some escaping that doesn't validate in XML:
-
- \badcode
- macro.aacute.DITAXML = "&aacute;"
- macro.Aring.DITAXML = "&Aring;"
- macro.aring.DITAXML = "&aring;"
- macro.Auml.DITAXML = "&Auml;"
- macro.br.DITAXML = " "
- macro.BR.DITAXML = " "
- macro.copyright.DITAXML = "&copy;"
- macro.eacute.DITAXML = "&eacute;"
- macro.hr.DITAXML = " "
- macro.iacute.DITAXML = "&iacute;"
- macro.oslash.DITAXML = "&oslash;"
- macro.ouml.DITAXML = "&ouml;"
- macro.raisedaster.DITAXML = "<sup>*</sup>"
- macro.rarrow.DITAXML = "&rarr;"
- macro.reg.DITAXML = "<sup>&reg;</sup>"
- macro.uuml.DITAXML = "&uuml;"
- macro.mdash.DITAXML = "&mdash;"
- macro.emptyspan.DITAXML = " "
- \endcode
-
- You can also set default values for some of the tags in the DITA
- \c {<prolog>} and \c {<metadata>} elements:
-
- \badcode
- dita.metadata.default.author = Qt Development Frameworks
- dita.metadata.default.permissions = all
- dita.metadata.default.publisher = Qt Project
- dita.metadata.default.copyryear = 2020
- dita.metadata.default.copyrholder = Qt Project
- dita.metadata.default.audience = programmer
- \endcode
-
- See the \l {meta-command}
- {\\meta} command for more details on DITA metadata.
-
-*/
-
/*!
\page 21-1-minimum-qdocconf.html
\previouspage qtgui.qdocconf
\contentspage QDoc Manual
- \nextpage Generating DITA XML Output
+ \nextpage The QDoc Configuration File
\title minimum.qdocconf
diff --git a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
index 28737809a..5902d376e 100644
--- a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
@@ -812,21 +812,13 @@
<table width="100%">
<tr valign="top" bgcolor="#d0d0d0">
<td><b>
- <a href="http://doc.qt.io/qt-5/qabstractsocket.html">QAbstractSocket</a>
+ <a href="https://doc.qt.io/qt-5/qabstractsocket.html">QAbstractSocket</a>
</b></td>
<td>
The base functionality common to all socket types
</td></tr>
<tr valign="top" bgcolor="#d0d0d0">
- <td><b>
- <a href="http://doc.qt.io/archives/qt-4.7/qftp.html">QFtp</a>
- </b></td>
- <td>
- Implementation of the FTP protocol
- </td></tr>
-
- <tr valign="top" bgcolor="#d0d0d0">
<td>...</td>
<td>...</td>
</tr>
@@ -884,7 +876,7 @@
\quotation
\raw HTML
- <center><h1>Qt Namespace Reference</h1></center>
+ <center><h1>Qt Namespace</h1></center>
<p>The Qt namespace contains miscellaneous
identifiers used throughout the Qt library.
<a href="13-qdoc-commands-topics.html#name">More...</a>
@@ -893,15 +885,15 @@
<pre>#include &lt;Qt&gt;</pre>
<ul>
<li>
- <a href="http://doc.qt.io/archives/qt-4.7/qt-qt3.html">
- Qt 3 support members</a></li>
+ <a href="https://doc.qt.io/qt-5/qt-obsolete.html">
+ Obsolete members</a></li>
</ul>
<h3>Types</h3>
<ul>
<li>flags
- <a href="http://doc.qt.io/archives/qt-4.7/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
+ <a href="https://doc.qt.io/qt-5/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
<li>...</li></ul>
<hr />
\endraw
@@ -1206,7 +1198,7 @@
\endcode
This example generates the
- \l {http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
+ \l {https://doc.qt.io/qt-5/qml-qtquick-transform.html} {QML Transform}
page. The \\qmlclass comment should include the \l
{since-command} {\\since} command, because all QML types are
new. It should also include the \l{brief-command} {\\brief}
@@ -1279,7 +1271,7 @@
\endcode
The example generates the \l
- {http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
+ {https://doc.qt.io/qt-5/qml-qtquick-transform.html} {QML Transform}
page. The \e{\\qmltype} comment includes \l{instantiates-command}
{\\instantiates} to specify that a Transform is instantiated by
the C++ class QGraphicsTransform. A \\qmltype comment should
@@ -1412,7 +1404,7 @@
\endcode
The example generates the \l
- {http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
+ {https://doc.qt.io/qt-5/qml-qtquick-transform.html} {QML Transform}
page. The \e{\\qmltype} comment includes \l{instantiates-command}
{\\instantiates} to specify that a Transform is instantiated by
the C++ class QGraphicsTransform. A \\qmltype comment should
diff --git a/src/qdoc/doc/qdoc-manual.qdoc b/src/qdoc/doc/qdoc-manual.qdoc
index 716f8c73f..a03fe91ff 100644
--- a/src/qdoc/doc/qdoc-manual.qdoc
+++ b/src/qdoc/doc/qdoc-manual.qdoc
@@ -57,7 +57,6 @@
\li \l {Special Content}
\li \l {Miscellaneous}
\endlist
- \li \l{Creating DITA Maps}
\li \l {The QDoc Configuration File}
\list
\li \l {Generic Configuration Variables}
@@ -68,7 +67,6 @@
\li \l {Example Manifest Files}
\li \l {qtgui.qdocconf}
\li \l {minimum.qdocconf}
- \li \l {Generating DITA XML Output}
\endlist
\li \l {QA Pages}
\endlist
diff --git a/src/qdoc/doc/qtgui-qdocconf.qdoc b/src/qdoc/doc/qtgui-qdocconf.qdoc
index eaed76c67..4161c2917 100644
--- a/src/qdoc/doc/qtgui-qdocconf.qdoc
+++ b/src/qdoc/doc/qtgui-qdocconf.qdoc
@@ -137,7 +137,7 @@ to content listed in the index.
\note QDoc omits this value when the -installdir argument
is specified when running QDoc.
-\keyword examplesinstallpath
+\target examplesinstallpath
\badcode
examplesinstallpath = gui
@@ -150,7 +150,11 @@ installed in the \e gui directory under the parent examples directory
\note The examplepath variable has to match the example directory specified in
\c exampledirs.
-\b {See also}: \l {exampledirs}.
+\note It is possible to override the \c exampleinstallpath for a specific
+ \l {example-command}{\\example} using the \l {meta-command}{\\meta}
+ command.
+
+\b {See also}: \l {exampledirs} and \l {meta-command}{\\meta}.
\badcode
qhp.projects = QtGui
diff --git a/src/qdoc/docbookgenerator.cpp b/src/qdoc/docbookgenerator.cpp
index 2344428f2..8e2292211 100644
--- a/src/qdoc/docbookgenerator.cpp
+++ b/src/qdoc/docbookgenerator.cpp
@@ -49,50 +49,50 @@ QT_BEGIN_NAMESPACE
static const char dbNamespace[] = "http://docbook.org/ns/docbook";
static const char xlinkNamespace[] = "http://www.w3.org/1999/xlink";
-static void newLine(QXmlStreamWriter &writer)
+inline void DocBookGenerator::newLine()
{
- writer.writeCharacters("\n");
+ writer->writeCharacters("\n");
}
-static void startSectionBegin(QXmlStreamWriter &writer)
+void DocBookGenerator::startSectionBegin()
{
- writer.writeStartElement(dbNamespace, "section");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "title");
+ writer->writeStartElement(dbNamespace, "section");
+ newLine();
+ writer->writeStartElement(dbNamespace, "title");
}
-static void startSectionBegin(QXmlStreamWriter &writer, const QString &id)
+void DocBookGenerator::startSectionBegin(const QString &id)
{
- writer.writeStartElement(dbNamespace, "section");
- writer.writeAttribute("xml:id", id);
- newLine(writer);
- writer.writeStartElement(dbNamespace, "title");
+ writer->writeStartElement(dbNamespace, "section");
+ writer->writeAttribute("xml:id", id);
+ newLine();
+ writer->writeStartElement(dbNamespace, "title");
}
-static void startSectionEnd(QXmlStreamWriter &writer)
+void DocBookGenerator::startSectionEnd()
{
- writer.writeEndElement(); // title
- newLine(writer);
+ writer->writeEndElement(); // title
+ newLine();
}
-static void startSection(QXmlStreamWriter &writer, const QString &id, const QString &title)
+void DocBookGenerator::startSection(const QString &id, const QString &title)
{
- startSectionBegin(writer, id);
- writer.writeCharacters(title);
- startSectionEnd(writer);
+ startSectionBegin(id);
+ writer->writeCharacters(title);
+ startSectionEnd();
}
-static void endSection(QXmlStreamWriter &writer)
+void DocBookGenerator::endSection()
{
- writer.writeEndElement(); // section
- newLine(writer);
+ writer->writeEndElement(); // section
+ newLine();
}
-static void writeAnchor(QXmlStreamWriter &writer, QString id)
+void DocBookGenerator::writeAnchor(const QString &id)
{
- writer.writeEmptyElement(dbNamespace, "anchor");
- writer.writeAttribute("xml:id", id);
- newLine(writer);
+ writer->writeEmptyElement(dbNamespace, "anchor");
+ writer->writeAttribute("xml:id", id);
+ newLine();
}
/*!
@@ -103,19 +103,19 @@ void DocBookGenerator::initializeGenerator()
{
// Excerpts from HtmlGenerator::initializeGenerator.
Generator::initializeGenerator();
- Config &config = Config::instance();
+ config = &Config::instance();
- project = config.getString(CONFIG_PROJECT);
+ project = config->getString(CONFIG_PROJECT);
- projectDescription = config.getString(CONFIG_DESCRIPTION);
+ projectDescription = config->getString(CONFIG_DESCRIPTION);
if (projectDescription.isEmpty() && !project.isEmpty())
projectDescription = project + QLatin1String(" Reference Documentation");
- naturalLanguage = config.getString(CONFIG_NATURALLANGUAGE);
+ naturalLanguage = config->getString(CONFIG_NATURALLANGUAGE);
if (naturalLanguage.isEmpty())
naturalLanguage = QLatin1String("en");
- buildversion = config.getString(CONFIG_BUILDVERSION);
+ buildversion = config->getString(CONFIG_BUILDVERSION);
}
QString DocBookGenerator::format()
@@ -136,17 +136,17 @@ QString DocBookGenerator::fileExtension() const
is the node that represents the entity where a qdoc comment
was found, and \a text represents the qdoc comment.
*/
-bool DocBookGenerator::generateText(QXmlStreamWriter &writer, const Text &text,
- const Node *relative)
+bool DocBookGenerator::generateText(const Text &text, const Node *relative, CodeMarker *marker)
{
+ Q_UNUSED(marker);
// From Generator::generateText.
if (!text.firstAtom())
return false;
int numAtoms = 0;
initializeTextOutput();
- generateAtomList(writer, text.firstAtom(), relative, true, numAtoms);
- closeTextSections(writer);
+ generateAtomList(text.firstAtom(), relative, true, numAtoms);
+ closeTextSections();
return true;
}
@@ -157,21 +157,22 @@ bool DocBookGenerator::generateText(QXmlStreamWriter &writer, const Text &text,
\a numAtoms. The returned value is the first atom that was not
generated.
*/
-const Atom *DocBookGenerator::generateAtomList(QXmlStreamWriter &writer, const Atom *atom,
- const Node *relative, bool generate, int &numAtoms)
+const Atom *DocBookGenerator::generateAtomList(const Atom *atom, const Node *relative,
+ bool generate, int &numAtoms)
{
+ Q_ASSERT(writer);
// From Generator::generateAtomList.
while (atom) {
switch (atom->type()) {
case Atom::FormatIf: {
int numAtoms0 = numAtoms;
- atom = generateAtomList(writer, atom->next(), relative, generate, numAtoms);
+ atom = generateAtomList(atom->next(), relative, generate, numAtoms);
if (!atom)
return nullptr;
if (atom->type() == Atom::FormatElse) {
++numAtoms;
- atom = generateAtomList(writer, atom->next(), relative, false, numAtoms);
+ atom = generateAtomList(atom->next(), relative, false, numAtoms);
if (!atom)
return nullptr;
}
@@ -181,7 +182,7 @@ const Atom *DocBookGenerator::generateAtomList(QXmlStreamWriter &writer, const A
relative->location().warning(
tr("Output format %1 not handled %2").arg(format()).arg(outFileName()));
Atom unhandledFormatAtom(Atom::UnhandledFormat, format());
- generateAtomList(writer, &unhandledFormatAtom, relative, generate, numAtoms);
+ generateAtomList(&unhandledFormatAtom, relative, generate, numAtoms);
}
atom = atom->next();
}
@@ -192,7 +193,7 @@ const Atom *DocBookGenerator::generateAtomList(QXmlStreamWriter &writer, const A
default:
int n = 1;
if (generate) {
- n += generateAtom(writer, atom, relative);
+ n += generateAtom(atom, relative);
numAtoms += n;
}
while (n-- > 0)
@@ -205,10 +206,13 @@ const Atom *DocBookGenerator::generateAtomList(QXmlStreamWriter &writer, const A
/*!
Generate DocBook from an instance of Atom.
*/
-int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, const Node *relative)
+int DocBookGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker)
{
+ Q_ASSERT(writer);
+ Q_UNUSED(marker);
// From HtmlGenerator::generateAtom, without warning generation.
- int idx, skipAhead = 0;
+ int idx = 0;
+ int skipAhead = 0;
static bool inPara = false;
switch (atom->type()) {
@@ -222,14 +226,14 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
link.clear();
}
if (link.isEmpty()) {
- writer.writeCharacters(atom->string());
+ writer->writeCharacters(atom->string());
} else {
- beginLink(writer, link, node, relative);
- generateLink(writer, atom);
- endLink(writer);
+ beginLink(link, node, relative);
+ generateLink(atom);
+ endLink();
}
} else {
- writer.writeCharacters(atom->string());
+ writer->writeCharacters(atom->string());
}
break;
case Atom::BaseName:
@@ -239,84 +243,84 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
skipAhead = skipAtoms(atom, Atom::BriefRight);
break;
}
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "para");
rewritePropertyBrief(atom, relative);
break;
case Atom::BriefRight:
if (hasBrief(relative)) {
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
}
break;
case Atom::C:
// This may at one time have been used to mark up C++ code but it is
// now widely used to write teletype text. As a result, text marked
// with the \c command is not passed to a code marker.
- writer.writeTextElement(dbNamespace, "code", plainCode(atom->string()));
+ writer->writeTextElement(dbNamespace, "code", plainCode(atom->string()));
break;
case Atom::CaptionLeft:
- writer.writeStartElement(dbNamespace, "title");
+ writer->writeStartElement(dbNamespace, "title");
break;
case Atom::CaptionRight:
- endLink(writer);
- writer.writeEndElement(); // title
- newLine(writer);
+ endLink();
+ writer->writeEndElement(); // title
+ newLine();
break;
case Atom::Qml:
- writer.writeStartElement(dbNamespace, "programlisting");
- writer.writeAttribute("language", "qml");
- writer.writeCharacters(atom->string());
- writer.writeEndElement(); // programlisting
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "programlisting");
+ writer->writeAttribute("language", "qml");
+ writer->writeCharacters(atom->string());
+ writer->writeEndElement(); // programlisting
+ newLine();
break;
case Atom::JavaScript:
- writer.writeStartElement(dbNamespace, "programlisting");
- writer.writeAttribute("language", "js");
- writer.writeCharacters(atom->string());
- writer.writeEndElement(); // programlisting
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "programlisting");
+ writer->writeAttribute("language", "js");
+ writer->writeCharacters(atom->string());
+ writer->writeEndElement(); // programlisting
+ newLine();
break;
case Atom::CodeNew:
- writer.writeTextElement(dbNamespace, "para", "you can rewrite it as");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "programlisting");
- writer.writeAttribute("language", "cpp");
- writer.writeAttribute("role", "new");
- writer.writeCharacters(atom->string());
- writer.writeEndElement(); // programlisting
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "para", "you can rewrite it as");
+ newLine();
+ writer->writeStartElement(dbNamespace, "programlisting");
+ writer->writeAttribute("language", "cpp");
+ writer->writeAttribute("role", "new");
+ writer->writeCharacters(atom->string());
+ writer->writeEndElement(); // programlisting
+ newLine();
break;
case Atom::Code:
- writer.writeStartElement(dbNamespace, "programlisting");
- writer.writeAttribute("language", "cpp");
- writer.writeCharacters(atom->string());
- writer.writeEndElement(); // programlisting
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "programlisting");
+ writer->writeAttribute("language", "cpp");
+ writer->writeCharacters(atom->string());
+ writer->writeEndElement(); // programlisting
+ newLine();
break;
case Atom::CodeOld:
- writer.writeTextElement(dbNamespace, "para", "For example, if you have code like");
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "para", "For example, if you have code like");
+ newLine();
Q_FALLTHROUGH();
case Atom::CodeBad:
- writer.writeStartElement(dbNamespace, "programlisting");
- writer.writeAttribute("language", "cpp");
- writer.writeAttribute("role", "bad");
- writer.writeCharacters(atom->string());
- writer.writeEndElement(); // programlisting
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "programlisting");
+ writer->writeAttribute("language", "cpp");
+ writer->writeAttribute("role", "bad");
+ writer->writeCharacters(atom->string());
+ writer->writeEndElement(); // programlisting
+ newLine();
break;
case Atom::DivLeft:
case Atom::DivRight:
break;
case Atom::FootnoteLeft:
- writer.writeStartElement(dbNamespace, "footnote");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "footnote");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
break;
case Atom::FootnoteRight:
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // footnote
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // footnote
break;
case Atom::FormatElse:
case Atom::FormatEndif:
@@ -324,22 +328,23 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
break;
case Atom::FormattingLeft:
if (atom->string() == ATOM_FORMATTING_BOLD) {
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
} else if (atom->string() == ATOM_FORMATTING_ITALIC) {
- writer.writeStartElement(dbNamespace, "emphasis");
+ writer->writeStartElement(dbNamespace, "emphasis");
} else if (atom->string() == ATOM_FORMATTING_UNDERLINE) {
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "underline");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "underline");
} else if (atom->string() == ATOM_FORMATTING_SUBSCRIPT) {
- writer.writeStartElement(dbNamespace, "sub");
+ writer->writeStartElement(dbNamespace, "sub");
} else if (atom->string() == ATOM_FORMATTING_SUPERSCRIPT) {
- writer.writeStartElement(dbNamespace, "sup");
- } else if (atom->string() == ATOM_FORMATTING_TELETYPE || atom->string() == ATOM_FORMATTING_PARAMETER) {
- writer.writeStartElement(dbNamespace, "code");
+ writer->writeStartElement(dbNamespace, "sup");
+ } else if (atom->string() == ATOM_FORMATTING_TELETYPE
+ || atom->string() == ATOM_FORMATTING_PARAMETER) {
+ writer->writeStartElement(dbNamespace, "code");
if (atom->string() == ATOM_FORMATTING_PARAMETER)
- writer.writeAttribute("role", "parameter");
+ writer->writeAttribute("role", "parameter");
}
break;
case Atom::FormattingRight:
@@ -349,14 +354,14 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
|| atom->string() == ATOM_FORMATTING_SUPERSCRIPT
|| atom->string() == ATOM_FORMATTING_TELETYPE
|| atom->string() == ATOM_FORMATTING_PARAMETER) {
- writer.writeEndElement();
+ writer->writeEndElement();
}
if (atom->string() == ATOM_FORMATTING_LINK)
- endLink(writer);
+ endLink();
break;
case Atom::AnnotatedList:
if (const CollectionNode *cn = qdb_->getCollectionNode(atom->string(), Node::Group))
- generateList(writer, cn, atom->string());
+ generateList(cn, atom->string());
break;
case Atom::GeneratedList:
if (atom->string() == QLatin1String("annotatedclasses")
@@ -366,13 +371,13 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
? qdb_->getCppClasses()
: atom->string() == QLatin1String("attributions") ? qdb_->getAttributions()
: qdb_->getNamespaces();
- generateAnnotatedList(writer, relative, things, atom->string());
+ generateAnnotatedList(relative, things, atom->string());
} else if (atom->string() == QLatin1String("annotatedexamples")
|| atom->string() == QLatin1String("annotatedattributions")) {
const NodeMultiMap things = atom->string() == QLatin1String("annotatedexamples")
? qdb_->getAttributions()
: qdb_->getExamples();
- generateAnnotatedLists(writer, relative, things, atom->string());
+ generateAnnotatedLists(relative, things, atom->string());
} else if (atom->string() == QLatin1String("classes")
|| atom->string() == QLatin1String("qmlbasictypes")
|| atom->string() == QLatin1String("qmltypes")) {
@@ -380,11 +385,10 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
? qdb_->getCppClasses()
: atom->string() == QLatin1String("qmlbasictypes") ? qdb_->getQmlBasicTypes()
: qdb_->getQmlTypes();
- generateCompactList(writer, Generic, relative, things, QString(), atom->string());
+ generateCompactList(Generic, relative, things, QString(), atom->string());
} else if (atom->string().contains("classes ")) {
QString rootName = atom->string().mid(atom->string().indexOf("classes") + 7).trimmed();
- generateCompactList(writer, Generic, relative, qdb_->getCppClasses(), rootName,
- atom->string());
+ generateCompactList(Generic, relative, qdb_->getCppClasses(), rootName, atom->string());
} else if ((idx = atom->string().indexOf(QStringLiteral("bymodule"))) != -1) {
QString moduleName = atom->string().mid(idx + 8).trimmed();
Node::NodeType type = typeFromString(atom);
@@ -394,9 +398,9 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
NodeMap m;
cn->getMemberClasses(m);
if (!m.isEmpty())
- generateAnnotatedList(writer, relative, m, atom->string());
+ generateAnnotatedList(relative, m, atom->string());
} else {
- generateAnnotatedList(writer, relative, cn->members(), atom->string());
+ generateAnnotatedList(relative, cn->members(), atom->string());
}
}
} else if (atom->string().startsWith("examplefiles")
@@ -404,7 +408,7 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
if (relative->isExample())
qDebug() << "GENERATE FILE LIST CALLED" << relative->name() << atom->string();
} else if (atom->string() == QLatin1String("classhierarchy")) {
- generateClassHierarchy(writer, relative, qdb_->getCppClasses());
+ generateClassHierarchy(relative, qdb_->getCppClasses());
} else if (atom->string().startsWith("obsolete")) {
ListType type = atom->string().endsWith("members") ? Obsolete : Generic;
QString prefix = atom->string().contains("cpp") ? QStringLiteral("Q") : QString();
@@ -415,16 +419,16 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
: atom->string() == QLatin1String("obsoletecppmembers")
? qdb_->getClassesWithObsoleteMembers()
: qdb_->getQmlTypesWithObsoleteMembers();
- generateCompactList(writer, type, relative, things, prefix, atom->string());
+ generateCompactList(type, relative, things, prefix, atom->string());
} else if (atom->string() == QLatin1String("functionindex")) {
- generateFunctionIndex(writer, relative);
+ generateFunctionIndex(relative);
} else if (atom->string() == QLatin1String("legalese")) {
- generateLegaleseList(writer, relative);
+ generateLegaleseList(relative);
} else if (atom->string() == QLatin1String("overviews")
|| atom->string() == QLatin1String("cpp-modules")
|| atom->string() == QLatin1String("qml-modules")
|| atom->string() == QLatin1String("related")) {
- generateList(writer, relative, atom->string());
+ generateList(relative, atom->string());
}
break;
case Atom::SinceList:
@@ -438,54 +442,54 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
case Atom::Image: // mediaobject
case Atom::InlineImage: { // inlinemediaobject
QString tag = atom->type() == Atom::Image ? "mediaobject" : "inlinemediaobject";
- writer.writeStartElement(dbNamespace, tag);
- newLine(writer);
+ writer->writeStartElement(dbNamespace, tag);
+ newLine();
QString fileName = imageFileName(relative, atom->string());
if (fileName.isEmpty()) {
- writer.writeStartElement(dbNamespace, "textobject");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- writer.writeTextElement(dbNamespace, "emphasis",
- "[Missing image " + atom->string() + "]");
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // textobject
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "textobject");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeTextElement(dbNamespace, "emphasis",
+ "[Missing image " + atom->string() + "]");
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // textobject
+ newLine();
} else {
if (atom->next() && !atom->next()->string().isEmpty())
- writer.writeTextElement(dbNamespace, "alt", atom->next()->string());
+ writer->writeTextElement(dbNamespace, "alt", atom->next()->string());
- writer.writeStartElement(dbNamespace, "imageobject");
- newLine(writer);
- writer.writeEmptyElement(dbNamespace, "imagedata");
- writer.writeAttribute("fileref", fileName);
- newLine(writer);
- writer.writeEndElement(); // imageobject
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "imageobject");
+ newLine();
+ writer->writeEmptyElement(dbNamespace, "imagedata");
+ writer->writeAttribute("fileref", fileName);
+ newLine();
+ writer->writeEndElement(); // imageobject
+ newLine();
setImageFileName(relative, fileName);
}
- writer.writeEndElement(); // [inline]mediaobject
+ writer->writeEndElement(); // [inline]mediaobject
if (atom->type() == Atom::Image)
- newLine(writer);
+ newLine();
} break;
case Atom::ImageText:
break;
case Atom::ImportantLeft:
case Atom::NoteLeft: {
QString tag = atom->type() == Atom::ImportantLeft ? "important" : "note";
- writer.writeStartElement(dbNamespace, tag);
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, tag);
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
} break;
case Atom::ImportantRight:
case Atom::NoteRight:
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // note/important
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // note/important
+ newLine();
break;
case Atom::LegaleseLeft:
case Atom::LegaleseRight:
@@ -494,156 +498,156 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
case Atom::NavLink: {
const Node *node = nullptr;
QString link = getLink(atom, relative, &node);
- beginLink(writer, link, node, relative); // Ended at Atom::FormattingRight
+ beginLink(link, node, relative); // Ended at Atom::FormattingRight
skipAhead = 1;
} break;
case Atom::LinkNode: {
const Node *node = CodeMarker::nodeForString(atom->string());
- beginLink(writer, linkForNode(node, relative), node, relative);
+ beginLink(linkForNode(node, relative), node, relative);
skipAhead = 1;
} break;
case Atom::ListLeft:
if (inPara) {
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
inPara = false;
}
if (atom->string() == ATOM_LIST_BULLET) {
- writer.writeStartElement(dbNamespace, "itemizedlist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "itemizedlist");
+ newLine();
} else if (atom->string() == ATOM_LIST_TAG) {
- writer.writeStartElement(dbNamespace, "variablelist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "variablelist");
+ newLine();
} else if (atom->string() == ATOM_LIST_VALUE) {
- writer.writeStartElement(dbNamespace, "informaltable");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "thead");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "tr");
- newLine(writer);
- writer.writeTextElement(dbNamespace, "th", "Constant");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "informaltable");
+ newLine();
+ writer->writeStartElement(dbNamespace, "thead");
+ newLine();
+ writer->writeStartElement(dbNamespace, "tr");
+ newLine();
+ writer->writeTextElement(dbNamespace, "th", "Constant");
+ newLine();
threeColumnEnumValueTable_ = isThreeColumnEnumValueTable(atom);
if (threeColumnEnumValueTable_ && relative->nodeType() == Node::Enum) {
// If not in \enum topic, skip the value column
- writer.writeTextElement(dbNamespace, "th", "Value");
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "th", "Value");
+ newLine();
}
- writer.writeTextElement(dbNamespace, "th", "Description");
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "th", "Description");
+ newLine();
- writer.writeEndElement(); // tr
- newLine(writer);
- writer.writeEndElement(); // thead
- newLine(writer);
+ writer->writeEndElement(); // tr
+ newLine();
+ writer->writeEndElement(); // thead
+ newLine();
} else {
- writer.writeStartElement(dbNamespace, "orderedlist");
+ writer->writeStartElement(dbNamespace, "orderedlist");
if (atom->next() != nullptr && atom->next()->string().toInt() > 1)
- writer.writeAttribute("startingnumber", atom->next()->string());
+ writer->writeAttribute("startingnumber", atom->next()->string());
if (atom->string() == ATOM_LIST_UPPERALPHA)
- writer.writeAttribute("numeration", "upperalpha");
+ writer->writeAttribute("numeration", "upperalpha");
else if (atom->string() == ATOM_LIST_LOWERALPHA)
- writer.writeAttribute("numeration", "loweralpha");
+ writer->writeAttribute("numeration", "loweralpha");
else if (atom->string() == ATOM_LIST_UPPERROMAN)
- writer.writeAttribute("numeration", "upperroman");
+ writer->writeAttribute("numeration", "upperroman");
else if (atom->string() == ATOM_LIST_LOWERROMAN)
- writer.writeAttribute("numeration", "lowerroman");
+ writer->writeAttribute("numeration", "lowerroman");
else // (atom->string() == ATOM_LIST_NUMERIC)
- writer.writeAttribute("numeration", "arabic");
+ writer->writeAttribute("numeration", "arabic");
- newLine(writer);
+ newLine();
}
break;
case Atom::ListItemNumber:
break;
case Atom::ListTagLeft:
if (atom->string() == ATOM_LIST_TAG) {
- writer.writeStartElement(dbNamespace, "varlistentry");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "item");
+ writer->writeStartElement(dbNamespace, "varlistentry");
+ newLine();
+ writer->writeStartElement(dbNamespace, "item");
} else { // (atom->string() == ATOM_LIST_VALUE)
QPair<QString, int> pair = getAtomListValue(atom);
skipAhead = pair.second;
- writer.writeStartElement(dbNamespace, "tr");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "td");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- generateEnumValue(writer, pair.first, relative);
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // td
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "tr");
+ newLine();
+ writer->writeStartElement(dbNamespace, "td");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ generateEnumValue(pair.first, relative);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // td
+ newLine();
if (relative->nodeType() == Node::Enum) {
const auto enume = static_cast<const EnumNode *>(relative);
QString itemValue = enume->itemValue(atom->next()->string());
- writer.writeStartElement(dbNamespace, "td");
+ writer->writeStartElement(dbNamespace, "td");
if (itemValue.isEmpty())
- writer.writeCharacters("?");
+ writer->writeCharacters("?");
else
- writer.writeTextElement(dbNamespace, "code", itemValue);
- writer.writeEndElement(); // td
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "code", itemValue);
+ writer->writeEndElement(); // td
+ newLine();
}
}
break;
case Atom::SinceTagRight:
case Atom::ListTagRight:
if (atom->string() == ATOM_LIST_TAG) {
- writer.writeEndElement(); // item
- newLine(writer);
+ writer->writeEndElement(); // item
+ newLine();
}
break;
case Atom::ListItemLeft:
inListItemLineOpen = false;
if (atom->string() == ATOM_LIST_TAG) {
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
} else if (atom->string() == ATOM_LIST_VALUE) {
if (threeColumnEnumValueTable_) {
if (matchAhead(atom, Atom::ListItemRight)) {
- writer.writeEmptyElement(dbNamespace, "td");
- newLine(writer);
+ writer->writeEmptyElement(dbNamespace, "td");
+ newLine();
inListItemLineOpen = false;
} else {
- writer.writeStartElement(dbNamespace, "td");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "td");
+ newLine();
inListItemLineOpen = true;
}
}
} else {
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
}
// Don't skip a paragraph, DocBook requires them within list items.
break;
case Atom::ListItemRight:
if (atom->string() == ATOM_LIST_TAG) {
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // listitem
- newLine(writer);
- writer.writeEndElement(); // varlistentry
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // listitem
+ newLine();
+ writer->writeEndElement(); // varlistentry
+ newLine();
} else if (atom->string() == ATOM_LIST_VALUE) {
if (inListItemLineOpen) {
- writer.writeEndElement(); // td
- newLine(writer);
+ writer->writeEndElement(); // td
+ newLine();
inListItemLineOpen = false;
}
- writer.writeEndElement(); // tr
- newLine(writer);
+ writer->writeEndElement(); // tr
+ newLine();
} else {
- writer.writeEndElement(); // listitem
- newLine(writer);
+ writer->writeEndElement(); // listitem
+ newLine();
}
break;
case Atom::ListRight:
@@ -652,33 +656,33 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
// - ATOM_LIST_TAG: variablelist
// - ATOM_LIST_VALUE: informaltable
// - ATOM_LIST_NUMERIC: orderedlist
- writer.writeEndElement();
- newLine(writer);
+ writer->writeEndElement();
+ newLine();
break;
case Atom::Nop:
break;
case Atom::ParaLeft:
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "para");
inPara = true;
break;
case Atom::ParaRight:
- endLink(writer);
+ endLink();
if (inPara) {
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
inPara = false;
}
break;
case Atom::QuotationLeft:
- writer.writeStartElement(dbNamespace, "blockquote");
+ writer->writeStartElement(dbNamespace, "blockquote");
inPara = true;
break;
case Atom::QuotationRight:
- writer.writeEndElement(); // blockquote
- newLine(writer);
+ writer->writeEndElement(); // blockquote
+ newLine();
break;
case Atom::RawString:
- writer.writeCharacters(atom->string());
+ writer->writeCharacters(atom->string());
break;
case Atom::SectionLeft:
currentSectionLevel = atom->string().toInt() + hOffset(relative);
@@ -688,15 +692,16 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
// i.e. going to a new section, even deeper.
while (!sectionLevels.empty() && sectionLevels.top() >= currentSectionLevel) {
sectionLevels.pop();
- writer.writeEndElement(); // section
- newLine(writer);
+ writer->writeEndElement(); // section
+ newLine();
}
sectionLevels.push(currentSectionLevel);
- writer.writeStartElement(dbNamespace, "section");
- writer.writeAttribute("xml:id", Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "section");
+ writer->writeAttribute("xml:id",
+ Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
+ newLine();
// Unlike startSectionBegin, don't start a title here.
}
break;
@@ -707,30 +712,30 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
case Atom::SectionHeadingLeft:
// Level 1 is dealt with at the header level (info tag).
if (currentSectionLevel > 1) {
- writer.writeStartElement(dbNamespace, "title");
+ writer->writeStartElement(dbNamespace, "title");
inSectionHeading_ = true;
}
break;
case Atom::SectionHeadingRight:
// Level 1 is dealt with at the header level (info tag).
if (currentSectionLevel > 1) {
- writer.writeEndElement(); // title
- newLine(writer);
+ writer->writeEndElement(); // title
+ newLine();
inSectionHeading_ = false;
}
break;
case Atom::SidebarLeft:
- writer.writeStartElement(dbNamespace, "sidebar");
+ writer->writeStartElement(dbNamespace, "sidebar");
break;
case Atom::SidebarRight:
- writer.writeEndElement(); // sidebar
- newLine(writer);
+ writer->writeEndElement(); // sidebar
+ newLine();
break;
case Atom::String:
if (inLink && !inContents_ && !inSectionHeading_)
- generateLink(writer, atom);
+ generateLink(atom);
else
- writer.writeCharacters(atom->string());
+ writer->writeCharacters(atom->string());
break;
case Atom::TableLeft: {
QPair<QString, QString> pair = getTableWidthAttr(atom);
@@ -738,46 +743,46 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
QString width = pair.first;
if (inPara) {
- writer.writeEndElement(); // para or blockquote
- newLine(writer);
+ writer->writeEndElement(); // para or blockquote
+ newLine();
inPara = false;
}
- writer.writeStartElement(dbNamespace, "informaltable");
- writer.writeAttribute("style", attr);
+ writer->writeStartElement(dbNamespace, "informaltable");
+ writer->writeAttribute("style", attr);
if (!width.isEmpty())
- writer.writeAttribute("width", width);
- newLine(writer);
+ writer->writeAttribute("width", width);
+ newLine();
numTableRows_ = 0;
} break;
case Atom::TableRight:
- writer.writeEndElement(); // table
- newLine(writer);
+ writer->writeEndElement(); // table
+ newLine();
break;
case Atom::TableHeaderLeft:
- writer.writeStartElement(dbNamespace, "thead");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "tr");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "thead");
+ newLine();
+ writer->writeStartElement(dbNamespace, "tr");
+ newLine();
inTableHeader_ = true;
break;
case Atom::TableHeaderRight:
- writer.writeEndElement(); // tr
- newLine(writer);
+ writer->writeEndElement(); // tr
+ newLine();
if (matchAhead(atom, Atom::TableHeaderLeft)) {
skipAhead = 1;
- writer.writeStartElement(dbNamespace, "tr");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "tr");
+ newLine();
} else {
- writer.writeEndElement(); // thead
- newLine(writer);
+ writer->writeEndElement(); // thead
+ newLine();
inTableHeader_ = false;
}
break;
case Atom::TableRowLeft:
- writer.writeStartElement(dbNamespace, "tr");
+ writer->writeStartElement(dbNamespace, "tr");
if (atom->string().isEmpty()) {
- writer.writeAttribute("valign", "top");
+ writer->writeAttribute("valign", "top");
} else {
// Basic parsing of attributes, should be enough. The input string (atom->string())
// looks like:
@@ -792,60 +797,60 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
.arg(atom->string()));
}
for (int i = 0; i + 1 < args.size(); i += 2)
- writer.writeAttribute(args.at(i).chopped(1), args.at(i + 1));
+ writer->writeAttribute(args.at(i).chopped(1), args.at(i + 1));
}
- newLine(writer);
+ newLine();
break;
case Atom::TableRowRight:
- writer.writeEndElement(); // tr
- newLine(writer);
+ writer->writeEndElement(); // tr
+ newLine();
break;
case Atom::TableItemLeft:
- writer.writeStartElement(dbNamespace, inTableHeader_ ? "th" : "td");
+ writer->writeStartElement(dbNamespace, inTableHeader_ ? "th" : "td");
for (int i = 0; i < atom->count(); ++i) {
const QString &p = atom->string(i);
if (p.contains('=')) {
QStringList lp = p.split(QLatin1Char('='));
- writer.writeAttribute(lp.at(0), lp.at(1));
+ writer->writeAttribute(lp.at(0), lp.at(1));
} else {
QStringList spans = p.split(QLatin1Char(','));
if (spans.size() == 2) {
if (spans.at(0) != "1")
- writer.writeAttribute("colspan", spans.at(0));
+ writer->writeAttribute("colspan", spans.at(0));
if (spans.at(1) != "1")
- writer.writeAttribute("rowspan", spans.at(1));
+ writer->writeAttribute("rowspan", spans.at(1));
}
}
}
- newLine(writer);
+ newLine();
// No skipahead, as opposed to HTML: in DocBook, the text must be wrapped in paragraphs.
break;
case Atom::TableItemRight:
- writer.writeEndElement(); // th if inTableHeader_, otherwise td
- newLine(writer);
+ writer->writeEndElement(); // th if inTableHeader_, otherwise td
+ newLine();
break;
case Atom::TableOfContents:
break;
case Atom::Keyword:
break;
case Atom::Target:
- writeAnchor(writer, Doc::canonicalTitle(atom->string()));
+ writeAnchor(Doc::canonicalTitle(atom->string()));
break;
case Atom::UnhandledFormat:
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
- writer.writeCharacters("&lt;Missing DocBook&gt;");
- writer.writeEndElement(); // emphasis
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
+ writer->writeCharacters("&lt;Missing DocBook&gt;");
+ writer->writeEndElement(); // emphasis
break;
case Atom::UnknownCommand:
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
- writer.writeCharacters("&lt;Unknown command&gt;");
- writer.writeStartElement(dbNamespace, "code");
- writer.writeCharacters(atom->string());
- writer.writeEndElement(); // code
- writer.writeEndElement(); // emphasis
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
+ writer->writeCharacters("&lt;Unknown command&gt;");
+ writer->writeStartElement(dbNamespace, "code");
+ writer->writeCharacters(atom->string());
+ writer->writeEndElement(); // code
+ writer->writeEndElement(); // emphasis
break;
case Atom::QmlText:
case Atom::EndQmlText:
@@ -864,8 +869,7 @@ int DocBookGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, c
return skipAhead;
}
-void DocBookGenerator::generateClassHierarchy(QXmlStreamWriter &writer, const Node *relative,
- NodeMap &classMap)
+void DocBookGenerator::generateClassHierarchy(const Node *relative, NodeMap &classMap)
{
// From HtmlGenerator::generateClassHierarchy.
if (classMap.isEmpty())
@@ -883,23 +887,23 @@ void DocBookGenerator::generateClassHierarchy(QXmlStreamWriter &writer, const No
QStack<NodeMap> stack;
stack.push(topLevel);
- writer.writeStartElement(dbNamespace, "itemizedlist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "itemizedlist");
+ newLine();
while (!stack.isEmpty()) {
if (stack.top().isEmpty()) {
stack.pop();
- writer.writeEndElement(); // listitem
- newLine(writer);
- writer.writeEndElement(); // itemizedlist
- newLine(writer);
+ writer->writeEndElement(); // listitem
+ newLine();
+ writer->writeEndElement(); // itemizedlist
+ newLine();
} else {
ClassNode *child = static_cast<ClassNode *>(*stack.top().begin());
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- generateFullName(writer, child, relative);
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ generateFullName(child, relative);
+ writer->writeEndElement(); // para
+ newLine();
// Don't close the listitem now, as DocBook requires sublists to reside in items.
stack.top().erase(stack.top().begin());
@@ -910,26 +914,26 @@ void DocBookGenerator::generateClassHierarchy(QXmlStreamWriter &writer, const No
}
if (!newTop.isEmpty()) {
stack.push(newTop);
- writer.writeStartElement(dbNamespace, "itemizedlist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "itemizedlist");
+ newLine();
}
}
}
}
-void DocBookGenerator::generateLink(QXmlStreamWriter &writer, const Atom *atom)
+void DocBookGenerator::generateLink(const Atom *atom)
{
// From HtmlGenerator::generateLink.
QRegExp funcLeftParen("\\S(\\()");
if (funcLeftParen.indexIn(atom->string()) != -1) {
// hack for C++: move () outside of link
int k = funcLeftParen.pos(1);
- writer.writeCharacters(atom->string().left(k));
- writer.writeEndElement(); // link
+ writer->writeCharacters(atom->string().left(k));
+ writer->writeEndElement(); // link
inLink = false;
- writer.writeCharacters(atom->string().mid(k));
+ writer->writeCharacters(atom->string().mid(k));
} else {
- writer.writeCharacters(atom->string());
+ writer->writeCharacters(atom->string());
}
}
@@ -937,28 +941,26 @@ void DocBookGenerator::generateLink(QXmlStreamWriter &writer, const Atom *atom)
This version of the function is called when the \a link is known
to be correct.
*/
-void DocBookGenerator::beginLink(QXmlStreamWriter &writer, const QString &link, const Node *node,
- const Node *relative)
+void DocBookGenerator::beginLink(const QString &link, const Node *node, const Node *relative)
{
// From HtmlGenerator::beginLink.
- writer.writeStartElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "href", link);
+ writer->writeStartElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "href", link);
if (node && !(relative && node->status() == relative->status())
&& node->status() == Node::Obsolete)
- writer.writeAttribute("role", "obsolete");
+ writer->writeAttribute("role", "obsolete");
inLink = true;
}
-void DocBookGenerator::endLink(QXmlStreamWriter &writer)
+void DocBookGenerator::endLink()
{
// From HtmlGenerator::endLink.
if (inLink)
- writer.writeEndElement(); // link
+ writer->writeEndElement(); // link
inLink = false;
}
-void DocBookGenerator::generateList(QXmlStreamWriter &writer, const Node *relative,
- const QString &selector)
+void DocBookGenerator::generateList(const Node *relative, const QString &selector)
{
// From HtmlGenerator::generateList, without warnings, changing prototype.
CNMap cnm;
@@ -979,7 +981,7 @@ void DocBookGenerator::generateList(QXmlStreamWriter &writer, const Node *relati
nodeList.reserve(collectionList.size());
for (auto *collectionNode : collectionList)
nodeList.append(collectionNode);
- generateAnnotatedList(writer, relative, nodeList, selector);
+ generateAnnotatedList(relative, nodeList, selector);
} else {
/*
\generatelist {selector} is only allowed in a
@@ -989,7 +991,7 @@ void DocBookGenerator::generateList(QXmlStreamWriter &writer, const Node *relati
Node *n = const_cast<Node *>(relative);
auto *cn = static_cast<CollectionNode *>(n);
qdb_->mergeCollections(cn);
- generateAnnotatedList(writer, cn, cn->members(), selector);
+ generateAnnotatedList(cn, cn->members(), selector);
}
}
@@ -997,60 +999,60 @@ void DocBookGenerator::generateList(QXmlStreamWriter &writer, const Node *relati
Output an annotated list of the nodes in \a nodeMap.
A two-column table is output.
*/
-void DocBookGenerator::generateAnnotatedList(QXmlStreamWriter &writer, const Node *relative,
- const NodeMultiMap &nmm, const QString &selector)
+void DocBookGenerator::generateAnnotatedList(const Node *relative, const NodeMultiMap &nmm,
+ const QString &selector)
{
// From HtmlGenerator::generateAnnotatedList
if (nmm.isEmpty())
return;
- generateAnnotatedList(writer, relative, nmm.values(), selector);
+ generateAnnotatedList(relative, nmm.values(), selector);
}
-void DocBookGenerator::generateAnnotatedList(QXmlStreamWriter &writer, const Node *relative,
- const NodeList &nodeList, const QString &selector)
+void DocBookGenerator::generateAnnotatedList(const Node *relative, const NodeList &nodeList,
+ const QString &selector)
{
// From WebXMLGenerator::generateAnnotatedList.
- writer.writeStartElement(dbNamespace, "variablelist");
- writer.writeAttribute("role", selector);
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "variablelist");
+ writer->writeAttribute("role", selector);
+ newLine();
for (auto node : nodeList) {
- writer.writeStartElement(dbNamespace, "varlistentry");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "term");
- generateFullName(writer, node, relative);
- writer.writeEndElement(); // term
- newLine(writer);
-
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters(node->doc().briefText().toString());
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // listitem
- newLine(writer);
- writer.writeEndElement(); // varlistentry
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "varlistentry");
+ newLine();
+ writer->writeStartElement(dbNamespace, "term");
+ generateFullName(node, relative);
+ writer->writeEndElement(); // term
+ newLine();
+
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters(node->doc().briefText().toString());
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // listitem
+ newLine();
+ writer->writeEndElement(); // varlistentry
+ newLine();
}
- writer.writeEndElement(); // variablelist
- newLine(writer);
+ writer->writeEndElement(); // variablelist
+ newLine();
}
/*!
Outputs a series of annotated lists from the nodes in \a nmm,
divided into sections based by the key names in the multimap.
*/
-void DocBookGenerator::generateAnnotatedLists(QXmlStreamWriter &writer, const Node *relative,
- const NodeMultiMap &nmm, const QString &selector)
+void DocBookGenerator::generateAnnotatedLists(const Node *relative, const NodeMultiMap &nmm,
+ const QString &selector)
{
// From HtmlGenerator::generateAnnotatedLists.
for (const QString &name : nmm.uniqueKeys()) {
if (!name.isEmpty())
- startSection(writer, registerRef(name.toLower()), name);
- generateAnnotatedList(writer, relative, nmm.values(name), selector);
+ startSection(registerRef(name.toLower()), name);
+ generateAnnotatedList(relative, nmm.values(name), selector);
if (!name.isEmpty())
- endSection(writer);
+ endSection();
}
}
@@ -1064,9 +1066,9 @@ void DocBookGenerator::generateAnnotatedLists(QXmlStreamWriter &writer, const No
the name of the first and last classes in the class map
\a nmm.
*/
-void DocBookGenerator::generateCompactList(QXmlStreamWriter &writer, ListType listType,
- const Node *relative, const NodeMultiMap &nmm,
- const QString &commonPrefix, const QString &selector)
+void DocBookGenerator::generateCompactList(ListType listType, const Node *relative,
+ const NodeMultiMap &nmm, const QString &commonPrefix,
+ const QString &selector)
{
// From HtmlGenerator::generateCompactList. No more "includeAlphabet", this should be handled by
// the DocBook toolchain afterwards.
@@ -1144,31 +1146,31 @@ void DocBookGenerator::generateCompactList(QXmlStreamWriter &writer, ListType li
*/
if (curParOffset == 0) {
if (i > 0) {
- writer.writeEndElement(); // variablelist
- newLine(writer);
+ writer->writeEndElement(); // variablelist
+ newLine();
}
- writer.writeStartElement(dbNamespace, "variablelist");
- writer.writeAttribute("role", selector);
- newLine(writer);
- writer.writeStartElement(dbNamespace, "varlistentry");
- newLine(writer);
-
- writer.writeStartElement(dbNamespace, "term");
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
- writer.writeCharacters(paragraphName[curParNr]);
- writer.writeEndElement(); // emphasis
- writer.writeEndElement(); // term
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "variablelist");
+ writer->writeAttribute("role", selector);
+ newLine();
+ writer->writeStartElement(dbNamespace, "varlistentry");
+ newLine();
+
+ writer->writeStartElement(dbNamespace, "term");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
+ writer->writeCharacters(paragraphName[curParNr]);
+ writer->writeEndElement(); // emphasis
+ writer->writeEndElement(); // term
+ newLine();
}
/*
Output a listitem for the current offset in the current paragraph.
*/
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
if ((curParNr < NumParagraphs) && !paragraphName[curParNr].isEmpty()) {
NodeMultiMap::Iterator it;
NodeMultiMap::Iterator next;
@@ -1177,10 +1179,10 @@ void DocBookGenerator::generateCompactList(QXmlStreamWriter &writer, ListType li
++it;
if (listType == Generic) {
- generateFullName(writer, it.value(), relative);
- writer.writeStartElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "href", fullDocumentLocation(*it));
- writer.writeAttribute("type", targetType(it.value()));
+ generateFullName(it.value(), relative);
+ writer->writeStartElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "href", fullDocumentLocation(*it));
+ writer->writeAttribute("type", targetType(it.value()));
} else if (listType == Obsolete) {
QString fn = fileName(it.value(), fileExtension());
QString link;
@@ -1188,9 +1190,9 @@ void DocBookGenerator::generateCompactList(QXmlStreamWriter &writer, ListType li
link = QString("../" + it.value()->outputSubdirectory() + QLatin1Char('/'));
link += fn;
- writer.writeStartElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "href", link);
- writer.writeAttribute("type", targetType(it.value()));
+ writer->writeStartElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "href", link);
+ writer->writeAttribute("type", targetType(it.value()));
}
QStringList pieces;
@@ -1210,109 +1212,109 @@ void DocBookGenerator::generateCompactList(QXmlStreamWriter &writer, ListType li
} else
pieces = it.value()->fullName(relative).split("::");
- writer.writeCharacters(pieces.last());
- writer.writeEndElement(); // link
+ writer->writeCharacters(pieces.last());
+ writer->writeEndElement(); // link
if (pieces.size() > 1) {
- writer.writeCharacters(" (");
- generateFullName(writer, it.value()->parent(), relative);
- writer.writeCharacters(")");
+ writer->writeCharacters(" (");
+ generateFullName(it.value()->parent(), relative);
+ writer->writeCharacters(")");
}
}
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // listitem
- newLine(writer);
- writer.writeEndElement(); // varlistentry
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // listitem
+ newLine();
+ writer->writeEndElement(); // varlistentry
+ newLine();
curParOffset++;
}
if (nmm.count() > 0) {
- writer.writeEndElement(); // variablelist
+ writer->writeEndElement(); // variablelist
}
}
-void DocBookGenerator::generateFunctionIndex(QXmlStreamWriter &writer, const Node *relative)
+void DocBookGenerator::generateFunctionIndex(const Node *relative)
{
// From HtmlGenerator::generateFunctionIndex.
- writer.writeStartElement(dbNamespace, "simplelist");
- writer.writeAttribute("role", "functionIndex");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "simplelist");
+ writer->writeAttribute("role", "functionIndex");
+ newLine();
for (int i = 0; i < 26; i++) {
QChar ch('a' + i);
- writer.writeStartElement(dbNamespace, "member");
- writer.writeAttribute(xlinkNamespace, "href", QString("#") + ch);
- writer.writeCharacters(ch.toUpper());
- writer.writeEndElement(); // member
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "member");
+ writer->writeAttribute(xlinkNamespace, "href", QString("#") + ch);
+ writer->writeCharacters(ch.toUpper());
+ writer->writeEndElement(); // member
+ newLine();
}
- writer.writeEndElement(); // simplelist
- newLine(writer);
+ writer->writeEndElement(); // simplelist
+ newLine();
char nextLetter = 'a';
char currentLetter;
- writer.writeStartElement(dbNamespace, "itemizedlist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "itemizedlist");
+ newLine();
NodeMapMap &funcIndex = qdb_->getFunctionIndex();
QMap<QString, NodeMap>::ConstIterator f = funcIndex.constBegin();
while (f != funcIndex.constEnd()) {
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters(f.key() + ": ");
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters(f.key() + ": ");
currentLetter = f.key()[0].unicode();
while (islower(currentLetter) && currentLetter >= nextLetter) {
- writeAnchor(writer, QString(nextLetter));
+ writeAnchor(QString(nextLetter));
nextLetter++;
}
NodeMap::ConstIterator s = (*f).constBegin();
while (s != (*f).constEnd()) {
- writer.writeCharacters(" ");
- generateFullName(writer, (*s)->parent(), relative);
+ writer->writeCharacters(" ");
+ generateFullName((*s)->parent(), relative);
++s;
}
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // listitem
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // listitem
+ newLine();
++f;
}
- writer.writeEndElement(); // itemizedlist
- newLine(writer);
+ writer->writeEndElement(); // itemizedlist
+ newLine();
}
-void DocBookGenerator::generateLegaleseList(QXmlStreamWriter &writer, const Node *relative)
+void DocBookGenerator::generateLegaleseList(const Node *relative)
{
// From HtmlGenerator::generateLegaleseList.
TextToNodeMap &legaleseTexts = qdb_->getLegaleseTexts();
QMap<Text, const Node *>::ConstIterator it = legaleseTexts.constBegin();
while (it != legaleseTexts.constEnd()) {
Text text = it.key();
- generateText(writer, text, relative);
- writer.writeStartElement(dbNamespace, "itemizedlist");
- newLine(writer);
+ generateText(text, relative);
+ writer->writeStartElement(dbNamespace, "itemizedlist");
+ newLine();
do {
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- generateFullName(writer, it.value(), relative);
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // listitem
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ generateFullName(it.value(), relative);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // listitem
+ newLine();
++it;
} while (it != legaleseTexts.constEnd() && it.key() == text);
- writer.writeEndElement(); // itemizedlist
- newLine(writer);
+ writer->writeEndElement(); // itemizedlist
+ newLine();
}
}
-void DocBookGenerator::generateBrief(QXmlStreamWriter &writer, const Node *node)
+void DocBookGenerator::generateBrief(const Node *node)
{
// From HtmlGenerator::generateBrief. Also see generateHeader, which is specifically dealing
// with the DocBook header (and thus wraps the brief in an abstract).
@@ -1322,24 +1324,24 @@ void DocBookGenerator::generateBrief(QXmlStreamWriter &writer, const Node *node)
if (!brief.lastAtom()->string().endsWith('.'))
brief << Atom(Atom::String, ".");
- writer.writeStartElement(dbNamespace, "para");
- generateText(writer, brief, node);
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "para");
+ generateText(brief, node);
+ writer->writeEndElement(); // para
+ newLine();
}
}
-bool DocBookGenerator::generateSince(QXmlStreamWriter &writer, const Node *node)
+bool DocBookGenerator::generateSince(const Node *node)
{
// From Generator::generateSince.
if (!node->since().isEmpty()) {
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters("This " + typeString(node) + " was introduced");
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters("This " + typeString(node) + " was introduced");
if (node->nodeType() == Node::Enum)
- writer.writeCharacters(" or modified");
- writer.writeCharacters(" in " + formatSince(node) + ".");
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeCharacters(" or modified");
+ writer->writeCharacters(" in " + formatSince(node) + ".");
+ writer->writeEndElement(); // para
+ newLine();
return true;
}
@@ -1347,36 +1349,36 @@ bool DocBookGenerator::generateSince(QXmlStreamWriter &writer, const Node *node)
return false;
}
-void DocBookGenerator::generateHeader(QXmlStreamWriter &writer, const QString &title,
- const QString &subTitle, const Node *node)
+void DocBookGenerator::generateHeader(const QString &title, const QString &subTitle,
+ const Node *node)
{
// From HtmlGenerator::generateHeader.
refMap.clear();
// Output the DocBook header.
- writer.writeStartElement(dbNamespace, "info");
- newLine(writer);
- writer.writeTextElement(dbNamespace, "title", title);
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "info");
+ newLine();
+ writer->writeTextElement(dbNamespace, "title", title);
+ newLine();
if (!subTitle.isEmpty()) {
- writer.writeTextElement(dbNamespace, "subtitle", subTitle);
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "subtitle", subTitle);
+ newLine();
}
if (!project.isEmpty()) {
- writer.writeTextElement(dbNamespace, "productname", project);
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "productname", project);
+ newLine();
}
if (!buildversion.isEmpty()) {
- writer.writeTextElement(dbNamespace, "edition", buildversion);
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "edition", buildversion);
+ newLine();
}
if (!projectDescription.isEmpty()) {
- writer.writeTextElement(dbNamespace, "titleabbrev", projectDescription);
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "titleabbrev", projectDescription);
+ newLine();
}
// Deal with links.
@@ -1396,15 +1398,15 @@ void DocBookGenerator::generateHeader(QXmlStreamWriter &writer, const QString &t
else
anchorPair = anchorForNode(linkNode);
- writer.writeStartElement(dbNamespace, "extendedlink");
- writer.writeEmptyElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "to", anchorPair.first);
- writer.writeAttribute(xlinkNamespace, "title", "prev");
+ writer->writeStartElement(dbNamespace, "extendedlink");
+ writer->writeEmptyElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "to", anchorPair.first);
+ writer->writeAttribute(xlinkNamespace, "title", "prev");
if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- writer.writeAttribute(xlinkNamespace, "label", anchorPair.second);
+ writer->writeAttribute(xlinkNamespace, "label", anchorPair.second);
else
- writer.writeAttribute(xlinkNamespace, "label", linkPair.second);
- writer.writeEndElement(); // extendedlink
+ writer->writeAttribute(xlinkNamespace, "label", linkPair.second);
+ writer->writeEndElement(); // extendedlink
}
if (node->links().contains(Node::NextLink)) {
linkPair = node->links()[Node::NextLink];
@@ -1414,15 +1416,15 @@ void DocBookGenerator::generateHeader(QXmlStreamWriter &writer, const QString &t
else
anchorPair = anchorForNode(linkNode);
- writer.writeStartElement(dbNamespace, "extendedlink");
- writer.writeEmptyElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "to", anchorPair.first);
- writer.writeAttribute(xlinkNamespace, "title", "prev");
+ writer->writeStartElement(dbNamespace, "extendedlink");
+ writer->writeEmptyElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "to", anchorPair.first);
+ writer->writeAttribute(xlinkNamespace, "title", "prev");
if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- writer.writeAttribute(xlinkNamespace, "label", anchorPair.second);
+ writer->writeAttribute(xlinkNamespace, "label", anchorPair.second);
else
- writer.writeAttribute(xlinkNamespace, "label", linkPair.second);
- writer.writeEndElement(); // extendedlink
+ writer->writeAttribute(xlinkNamespace, "label", linkPair.second);
+ writer->writeEndElement(); // extendedlink
}
if (node->links().contains(Node::StartLink)) {
linkPair = node->links()[Node::StartLink];
@@ -1432,15 +1434,15 @@ void DocBookGenerator::generateHeader(QXmlStreamWriter &writer, const QString &t
else
anchorPair = anchorForNode(linkNode);
- writer.writeStartElement(dbNamespace, "extendedlink");
- writer.writeEmptyElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "to", anchorPair.first);
- writer.writeAttribute(xlinkNamespace, "title", "start");
+ writer->writeStartElement(dbNamespace, "extendedlink");
+ writer->writeEmptyElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "to", anchorPair.first);
+ writer->writeAttribute(xlinkNamespace, "title", "start");
if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- writer.writeAttribute(xlinkNamespace, "label", anchorPair.second);
+ writer->writeAttribute(xlinkNamespace, "label", anchorPair.second);
else
- writer.writeAttribute(xlinkNamespace, "label", linkPair.second);
- writer.writeEndElement(); // extendedlink
+ writer->writeAttribute(xlinkNamespace, "label", linkPair.second);
+ writer->writeEndElement(); // extendedlink
}
}
@@ -1451,8 +1453,8 @@ void DocBookGenerator::generateHeader(QXmlStreamWriter &writer, const QString &t
// abstracts only happen in the header (info tag), slightly different tags must be used at
// other places. Also includes code from HtmlGenerator::generateCppReferencePage to handle
// the name spaces.
- writer.writeStartElement(dbNamespace, "abstract");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "abstract");
+ newLine();
bool generatedSomething = false;
@@ -1478,55 +1480,55 @@ void DocBookGenerator::generateHeader(QXmlStreamWriter &writer, const QString &t
if (!brief.lastAtom()->string().endsWith('.'))
brief << Atom(Atom::String, ".");
- writer.writeStartElement(dbNamespace, "para");
- generateText(writer, brief, node);
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "para");
+ generateText(brief, node);
+ writer->writeEndElement(); // para
+ newLine();
generatedSomething = true;
}
// Generate other paragraphs that should go into the abstract.
- generatedSomething |= generateStatus(writer, node);
- generatedSomething |= generateSince(writer, node);
- generatedSomething |= generateThreadSafeness(writer, node);
+ generatedSomething |= generateStatus(node);
+ generatedSomething |= generateSince(node);
+ generatedSomething |= generateThreadSafeness(node);
// An abstract cannot be empty, hence use the project description.
if (!generatedSomething)
- writer.writeTextElement(dbNamespace, "para", projectDescription + ".");
+ writer->writeTextElement(dbNamespace, "para", projectDescription + ".");
- writer.writeEndElement(); // abstract
- newLine(writer);
+ writer->writeEndElement(); // abstract
+ newLine();
}
// End of the DocBook header.
- writer.writeEndElement(); // info
- newLine(writer);
+ writer->writeEndElement(); // info
+ newLine();
}
-void DocBookGenerator::closeTextSections(QXmlStreamWriter &writer)
+void DocBookGenerator::closeTextSections()
{
while (!sectionLevels.isEmpty()) {
sectionLevels.pop();
- endSection(writer);
+ endSection();
}
}
-void DocBookGenerator::generateFooter(QXmlStreamWriter &writer)
+void DocBookGenerator::generateFooter()
{
- closeTextSections(writer);
- writer.writeEndElement(); // article
+ closeTextSections();
+ writer->writeEndElement(); // article
}
-static void generateSimpleLink(QXmlStreamWriter &writer, const QString &href, const QString &text)
+void DocBookGenerator::generateSimpleLink(const QString &href, const QString &text)
{
- writer.writeStartElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "href", href);
- writer.writeCharacters(text);
- writer.writeEndElement(); // link
+ writer->writeStartElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "href", href);
+ writer->writeCharacters(text);
+ writer->writeEndElement(); // link
}
-void DocBookGenerator::generateObsoleteMembers(QXmlStreamWriter &writer, const Sections &sections)
+void DocBookGenerator::generateObsoleteMembers(const Sections &sections)
{
// From HtmlGenerator::generateObsoleteMembersFile.
SectionPtrVector summary_spv; // Summaries are ignored in DocBook (table of contents).
@@ -1541,37 +1543,37 @@ void DocBookGenerator::generateObsoleteMembers(QXmlStreamWriter &writer, const S
link += fileName(aggregate, fileExtension());
aggregate->setObsoleteLink(link);
- startSection(writer, "obsolete", "Obsolete Members for " + aggregate->name());
+ startSection("obsolete", "Obsolete Members for " + aggregate->name());
- writer.writeStartElement(dbNamespace, "para");
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
- writer.writeCharacters("The following members of class ");
- generateSimpleLink(writer, linkForNode(aggregate, nullptr), aggregate->name());
- writer.writeCharacters(" are obsolete.");
- writer.writeEndElement(); // emphasis bold
- writer.writeCharacters(" They are provided to keep old source code working. "
- "We strongly advise against using them in new code.");
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
+ writer->writeCharacters("The following members of class ");
+ generateSimpleLink(linkForNode(aggregate, nullptr), aggregate->name());
+ writer->writeCharacters(" are obsolete.");
+ writer->writeEndElement(); // emphasis bold
+ writer->writeCharacters(" They are provided to keep old source code working. "
+ "We strongly advise against using them in new code.");
+ writer->writeEndElement(); // para
+ newLine();
for (int i = 0; i < details_spv.size(); ++i) {
QString title = details_spv.at(i)->title();
QString ref = registerRef(title.toLower());
- startSection(writer, ref, title);
+ startSection(ref, title);
const NodeVector &members = details_spv.at(i)->obsoleteMembers();
NodeVector::ConstIterator m = members.constBegin();
while (m != members.constEnd()) {
if ((*m)->access() != Node::Private)
- generateDetailedMember(writer, *m, aggregate);
+ generateDetailedMember(*m, aggregate);
++m;
}
- endSection(writer);
+ endSection();
}
- endSection(writer);
+ endSection();
}
/*!
@@ -1582,8 +1584,7 @@ void DocBookGenerator::generateObsoleteMembers(QXmlStreamWriter &writer, const S
Note that this function currently only handles correctly the
case where \a status is \c {Section::Obsolete}.
*/
-void DocBookGenerator::generateObsoleteQmlMembers(QXmlStreamWriter &writer,
- const Sections &sections)
+void DocBookGenerator::generateObsoleteQmlMembers(const Sections &sections)
{
// From HtmlGenerator::generateObsoleteQmlMembersFile.
SectionPtrVector summary_spv; // Summaries are not useful in DocBook.
@@ -1600,34 +1601,34 @@ void DocBookGenerator::generateObsoleteQmlMembers(QXmlStreamWriter &writer,
link += fn;
aggregate->setObsoleteLink(link);
- startSection(writer, "obsolete", "Obsolete Members for " + aggregate->name());
+ startSection("obsolete", "Obsolete Members for " + aggregate->name());
- writer.writeStartElement(dbNamespace, "para");
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
- writer.writeCharacters("The following members of QML type ");
- generateSimpleLink(writer, linkForNode(aggregate, nullptr), aggregate->name());
- writer.writeCharacters(" are obsolete.");
- writer.writeEndElement(); // emphasis bold
- writer.writeCharacters("They are provided to keep old source code working. "
- "We strongly advise against using them in new code.");
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
+ writer->writeCharacters("The following members of QML type ");
+ generateSimpleLink(linkForNode(aggregate, nullptr), aggregate->name());
+ writer->writeCharacters(" are obsolete.");
+ writer->writeEndElement(); // emphasis bold
+ writer->writeCharacters("They are provided to keep old source code working. "
+ "We strongly advise against using them in new code.");
+ writer->writeEndElement(); // para
+ newLine();
for (auto i : details_spv) {
QString ref = registerRef(i->title().toLower());
- startSection(writer, ref, i->title());
+ startSection(ref, i->title());
NodeVector::ConstIterator m = i->members().constBegin();
while (m != i->members().constEnd()) {
- generateDetailedQmlMember(writer, *m, aggregate);
+ generateDetailedQmlMember(*m, aggregate);
++m;
}
- endSection(writer);
+ endSection();
}
- endSection(writer);
+ endSection();
}
static QString nodeToSynopsisTag(const Node *node)
@@ -1661,36 +1662,35 @@ static QString nodeToSynopsisTag(const Node *node)
return QStringLiteral("synopsis");
}
-void generateStartRequisite(QXmlStreamWriter &writer, const QString &description)
+void DocBookGenerator::generateStartRequisite(const QString &description)
{
- writer.writeStartElement(dbNamespace, "varlistentry");
- newLine(writer);
- writer.writeTextElement(dbNamespace, "term", description);
- newLine(writer);
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "varlistentry");
+ newLine();
+ writer->writeTextElement(dbNamespace, "term", description);
+ newLine();
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
}
-void generateEndRequisite(QXmlStreamWriter &writer)
+void DocBookGenerator::generateEndRequisite()
{
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // listitem
- newLine(writer);
- writer.writeEndElement(); // varlistentry
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // listitem
+ newLine();
+ writer->writeEndElement(); // varlistentry
+ newLine();
}
-void generateRequisite(QXmlStreamWriter &writer, const QString &description, const QString &value)
+void DocBookGenerator::generateRequisite(const QString &description, const QString &value)
{
- generateStartRequisite(writer, description);
- writer.writeCharacters(value);
- generateEndRequisite(writer);
+ generateStartRequisite(description);
+ writer->writeCharacters(value);
+ generateEndRequisite();
}
-void DocBookGenerator::generateSortedNames(QXmlStreamWriter &writer, const ClassNode *cn,
- const QVector<RelatedClass> &rc)
+void DocBookGenerator::generateSortedNames(const ClassNode *cn, const QVector<RelatedClass> &rc)
{
// From Generator::appendSortedNames.
QMap<QString, ClassNode *> classMap;
@@ -1709,13 +1709,12 @@ void DocBookGenerator::generateSortedNames(QXmlStreamWriter &writer, const Class
int index = 0;
for (const QString &className : classNames) {
- generateFullName(writer, classMap.value(className), cn);
- writer.writeCharacters(comma(index++, classNames.count()));
+ generateFullName(classMap.value(className), cn);
+ writer->writeCharacters(comma(index++, classNames.count()));
}
}
-void DocBookGenerator::generateSortedQmlNames(QXmlStreamWriter &writer, const Node *base,
- const NodeList &subs)
+void DocBookGenerator::generateSortedQmlNames(const Node *base, const NodeList &subs)
{
// From Generator::appendSortedQmlNames.
QMap<QString, Node *> classMap;
@@ -1730,30 +1729,30 @@ void DocBookGenerator::generateSortedQmlNames(QXmlStreamWriter &writer, const No
names.sort();
for (const QString &name : names) {
- generateFullName(writer, classMap.value(name), base);
- writer.writeCharacters(comma(index++, names.count()));
+ generateFullName(classMap.value(name), base);
+ writer->writeCharacters(comma(index++, names.count()));
}
}
/*!
Lists the required imports and includes.
*/
-void DocBookGenerator::generateRequisites(QXmlStreamWriter &writer, const Aggregate *aggregate)
+void DocBookGenerator::generateRequisites(const Aggregate *aggregate)
{
// Adapted from HtmlGenerator::generateRequisites, but simplified: no need to store all the
// elements, they can be produced one by one.
- writer.writeStartElement(dbNamespace, "variablelist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "variablelist");
+ newLine();
// Includes.
if (!aggregate->includeFiles().isEmpty()) {
for (const QString &include : aggregate->includeFiles())
- generateRequisite(writer, "Header", include);
+ generateRequisite("Header", include);
}
// Since and project.
if (!aggregate->since().isEmpty())
- generateRequisite(writer, "Since", formatSince(aggregate));
+ generateRequisite("Since", formatSince(aggregate));
if (aggregate->isClassNode() || aggregate->isNamespace()) {
// QT variable.
@@ -1761,7 +1760,7 @@ void DocBookGenerator::generateRequisites(QXmlStreamWriter &writer, const Aggreg
const CollectionNode *cn =
qdb_->getCollectionNode(aggregate->physicalModuleName(), Node::Module);
if (cn && !cn->qtVariable().isEmpty()) {
- generateRequisite(writer, "qmake", "QT += " + cn->qtVariable());
+ generateRequisite("qmake", "QT += " + cn->qtVariable());
}
}
}
@@ -1770,60 +1769,59 @@ void DocBookGenerator::generateRequisites(QXmlStreamWriter &writer, const Aggreg
// Instantiated by.
auto *classe = const_cast<ClassNode *>(static_cast<const ClassNode *>(aggregate));
if (classe->qmlElement() != nullptr && classe->status() != Node::Internal) {
- generateStartRequisite(writer, "Inherited By");
- generateSortedNames(writer, classe, classe->derivedClasses());
- generateEndRequisite(writer);
- generateRequisite(writer, "Instantiated By",
- fullDocumentLocation(classe->qmlElement()));
+ generateStartRequisite("Inherited By");
+ generateSortedNames(classe, classe->derivedClasses());
+ generateEndRequisite();
+ generateRequisite("Instantiated By", fullDocumentLocation(classe->qmlElement()));
}
// Inherits.
QVector<RelatedClass>::ConstIterator r;
if (!classe->baseClasses().isEmpty()) {
- generateStartRequisite(writer, "Inherits");
+ generateStartRequisite("Inherits");
r = classe->baseClasses().constBegin();
int index = 0;
while (r != classe->baseClasses().constEnd()) {
if ((*r).node_) {
- generateFullName(writer, (*r).node_, classe);
+ generateFullName((*r).node_, classe);
if ((*r).access_ == Node::Protected)
- writer.writeCharacters(" (protected)");
+ writer->writeCharacters(" (protected)");
else if ((*r).access_ == Node::Private)
- writer.writeCharacters(" (private)");
- writer.writeCharacters(comma(index++, classe->baseClasses().count()));
+ writer->writeCharacters(" (private)");
+ writer->writeCharacters(comma(index++, classe->baseClasses().count()));
}
++r;
}
- generateEndRequisite(writer);
+ generateEndRequisite();
}
// Inherited by.
if (!classe->derivedClasses().isEmpty()) {
- generateStartRequisite(writer, "Inherited By");
- generateSortedNames(writer, classe, classe->derivedClasses());
- generateEndRequisite(writer);
+ generateStartRequisite("Inherited By");
+ generateSortedNames(classe, classe->derivedClasses());
+ generateEndRequisite();
}
}
- writer.writeEndElement(); // variablelist
- newLine(writer);
+ writer->writeEndElement(); // variablelist
+ newLine();
}
/*!
Lists the required imports and includes.
*/
-void DocBookGenerator::generateQmlRequisites(QXmlStreamWriter &writer, const QmlTypeNode *qcn)
+void DocBookGenerator::generateQmlRequisites(const QmlTypeNode *qcn)
{
// From HtmlGenerator::generateQmlRequisites, but simplified: no need to store all the elements,
// they can be produced one by one.
if (!qcn)
return;
- writer.writeStartElement(dbNamespace, "variablelist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "variablelist");
+ newLine();
// Module name and version (i.e. import).
QString logicalModuleVersion;
@@ -1832,24 +1830,24 @@ void DocBookGenerator::generateQmlRequisites(QXmlStreamWriter &writer, const Qml
// skip import statement for \internal collections
if (!collection || !collection->isInternal() || showInternal_) {
logicalModuleVersion =
- collection ? collection->logicalModuleVersion() : qcn->logicalModuleVersion();
+ collection ? collection->logicalModuleVersion() : qcn->logicalModuleVersion();
- generateRequisite(writer, "Import Statement",
+ generateRequisite("Import Statement",
"import " + qcn->logicalModuleName() + QLatin1Char(' ')
+ logicalModuleVersion);
}
// Since and project.
if (!qcn->since().isEmpty())
- generateRequisite(writer, "Since:", formatSince(qcn));
+ generateRequisite("Since:", formatSince(qcn));
// Inherited by.
NodeList subs;
QmlTypeNode::subclasses(qcn, subs);
if (!subs.isEmpty()) {
- generateStartRequisite(writer, "Inherited By:");
- generateSortedQmlNames(writer, qcn, subs);
- generateEndRequisite(writer);
+ generateStartRequisite("Inherited By:");
+ generateSortedQmlNames(qcn, subs);
+ generateEndRequisite();
}
// Inherits.
@@ -1862,9 +1860,9 @@ void DocBookGenerator::generateQmlRequisites(QXmlStreamWriter &writer, const Qml
Atom a = Atom(Atom::LinkNode, CodeMarker::stringForNode(base));
QString link = getAutoLink(&a, qcn, &otherNode);
- generateStartRequisite(writer, "Inherits:");
- generateSimpleLink(writer, link, base->name());
- generateEndRequisite(writer);
+ generateStartRequisite("Inherits:");
+ generateSimpleLink(link, base->name());
+ generateEndRequisite();
}
// Instantiates.
@@ -1874,16 +1872,16 @@ void DocBookGenerator::generateQmlRequisites(QXmlStreamWriter &writer, const Qml
Atom a = Atom(Atom::LinkNode, CodeMarker::stringForNode(qcn));
QString link = getAutoLink(&a, cn, &otherNode);
- generateStartRequisite(writer, "Instantiates:");
- generateSimpleLink(writer, fullDocumentLocation(cn), cn->name());
- generateEndRequisite(writer);
+ generateStartRequisite("Instantiates:");
+ generateSimpleLink(fullDocumentLocation(cn), cn->name());
+ generateEndRequisite();
}
- writer.writeEndElement(); // variablelist
- newLine(writer);
+ writer->writeEndElement(); // variablelist
+ newLine();
}
-bool DocBookGenerator::generateStatus(QXmlStreamWriter &writer, const Node *node)
+bool DocBookGenerator::generateStatus(const Node *node)
{
// From Generator::generateStatus.
switch (node->status()) {
@@ -1891,40 +1889,40 @@ bool DocBookGenerator::generateStatus(QXmlStreamWriter &writer, const Node *node
// Do nothing.
return false;
case Node::Preliminary:
- writer.writeStartElement(dbNamespace, "para");
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
- writer.writeCharacters("This " + typeString(node)
- + " is under development and is subject to change.");
- writer.writeEndElement(); // emphasis
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
+ writer->writeCharacters("This " + typeString(node)
+ + " is under development and is subject to change.");
+ writer->writeEndElement(); // emphasis
+ writer->writeEndElement(); // para
+ newLine();
return true;
case Node::Deprecated:
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "para");
if (node->isAggregate()) {
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
}
- writer.writeCharacters("This " + typeString(node) + " is deprecated.");
+ writer->writeCharacters("This " + typeString(node) + " is deprecated.");
if (node->isAggregate())
- writer.writeEndElement(); // emphasis
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeEndElement(); // emphasis
+ writer->writeEndElement(); // para
+ newLine();
return true;
case Node::Obsolete:
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "para");
if (node->isAggregate()) {
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
}
- writer.writeCharacters("This " + typeString(node) + " is obsolete.");
+ writer->writeCharacters("This " + typeString(node) + " is obsolete.");
if (node->isAggregate())
- writer.writeEndElement(); // emphasis
- writer.writeCharacters(" It is provided to keep old source code working. "
- "We strongly advise against using it in new code.");
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeEndElement(); // emphasis
+ writer->writeCharacters(" It is provided to keep old source code working. "
+ "We strongly advise against using it in new code.");
+ writer->writeEndElement(); // para
+ newLine();
return true;
case Node::Internal:
default:
@@ -1936,36 +1934,37 @@ bool DocBookGenerator::generateStatus(QXmlStreamWriter &writer, const Node *node
Generate a list of function signatures. The function nodes
are in \a nodes.
*/
-void DocBookGenerator::generateSignatureList(QXmlStreamWriter &writer, const NodeList &nodes)
+void DocBookGenerator::generateSignatureList(const NodeList &nodes)
{
// From Generator::signatureList and Generator::appendSignature.
- writer.writeStartElement(dbNamespace, "itemizedlist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "itemizedlist");
+ newLine();
NodeList::ConstIterator n = nodes.constBegin();
while (n != nodes.constEnd()) {
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
- generateSimpleLink(writer, currentGenerator()->fullDocumentLocation(*n), (*n)->signature(false, true));
+ generateSimpleLink(currentGenerator()->fullDocumentLocation(*n),
+ (*n)->signature(false, true));
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // itemizedlist
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // itemizedlist
+ newLine();
++n;
}
- writer.writeEndElement(); // itemizedlist
- newLine(writer);
+ writer->writeEndElement(); // itemizedlist
+ newLine();
}
/*!
Generates text that explains how threadsafe and/or reentrant
\a node is.
*/
-bool DocBookGenerator::generateThreadSafeness(QXmlStreamWriter &writer, const Node *node)
+bool DocBookGenerator::generateThreadSafeness(const Node *node)
{
// From Generator::generateThreadSafeness
Node::ThreadSafeness ts = node->threadSafeness();
@@ -1978,91 +1977,91 @@ bool DocBookGenerator::generateThreadSafeness(QXmlStreamWriter &writer, const No
QString linkThreadSafe = getAutoLink(&threadSafeAtom, node, &threadSafeNode);
if (ts == Node::NonReentrant) {
- writer.writeStartElement(dbNamespace, "warning");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters("This " + typeString(node) + " is not ");
- generateSimpleLink(writer, linkReentrant, "reentrant");
- writer.writeCharacters(".");
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // warning
+ writer->writeStartElement(dbNamespace, "warning");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters("This " + typeString(node) + " is not ");
+ generateSimpleLink(linkReentrant, "reentrant");
+ writer->writeCharacters(".");
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // warning
return true;
}
if (ts == Node::Reentrant || ts == Node::ThreadSafe) {
- writer.writeStartElement(dbNamespace, "note");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "note");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
if (node->isAggregate()) {
- writer.writeCharacters("All functions in this " + typeString(node) + " are ");
+ writer->writeCharacters("All functions in this " + typeString(node) + " are ");
if (ts == Node::ThreadSafe)
- generateSimpleLink(writer, linkThreadSafe, "thread-safe");
+ generateSimpleLink(linkThreadSafe, "thread-safe");
else
- generateSimpleLink(writer, linkReentrant, "reentrant");
+ generateSimpleLink(linkReentrant, "reentrant");
NodeList reentrant;
NodeList threadsafe;
NodeList nonreentrant;
bool exceptions = hasExceptions(node, reentrant, threadsafe, nonreentrant);
if (!exceptions || (ts == Node::Reentrant && !threadsafe.isEmpty())) {
- writer.writeCharacters(".");
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeCharacters(".");
+ writer->writeEndElement(); // para
+ newLine();
} else {
- writer.writeCharacters(" with the following exceptions:");
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeCharacters(" with the following exceptions:");
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
if (ts == Node::Reentrant) {
if (!nonreentrant.isEmpty()) {
- writer.writeCharacters("These functions are not ");
- generateSimpleLink(writer, linkReentrant, "reentrant");
- writer.writeCharacters(":");
- writer.writeEndElement(); // para
- newLine(writer);
- generateSignatureList(writer, nonreentrant);
+ writer->writeCharacters("These functions are not ");
+ generateSimpleLink(linkReentrant, "reentrant");
+ writer->writeCharacters(":");
+ writer->writeEndElement(); // para
+ newLine();
+ generateSignatureList(nonreentrant);
}
if (!threadsafe.isEmpty()) {
- writer.writeCharacters("These functions are also ");
- generateSimpleLink(writer, linkThreadSafe, "thread-safe");
- writer.writeCharacters(":");
- writer.writeEndElement(); // para
- newLine(writer);
- generateSignatureList(writer, threadsafe);
+ writer->writeCharacters("These functions are also ");
+ generateSimpleLink(linkThreadSafe, "thread-safe");
+ writer->writeCharacters(":");
+ writer->writeEndElement(); // para
+ newLine();
+ generateSignatureList(threadsafe);
}
} else { // thread-safe
if (!reentrant.isEmpty()) {
- writer.writeCharacters("These functions are only ");
- generateSimpleLink(writer, linkReentrant, "reentrant");
- writer.writeCharacters(":");
- writer.writeEndElement(); // para
- newLine(writer);
- generateSignatureList(writer, reentrant);
+ writer->writeCharacters("These functions are only ");
+ generateSimpleLink(linkReentrant, "reentrant");
+ writer->writeCharacters(":");
+ writer->writeEndElement(); // para
+ newLine();
+ generateSignatureList(reentrant);
}
if (!nonreentrant.isEmpty()) {
- writer.writeCharacters("These functions are not ");
- generateSimpleLink(writer, linkReentrant, "reentrant");
- writer.writeCharacters(":");
- writer.writeEndElement(); // para
- newLine(writer);
- generateSignatureList(writer, nonreentrant);
+ writer->writeCharacters("These functions are not ");
+ generateSimpleLink(linkReentrant, "reentrant");
+ writer->writeCharacters(":");
+ writer->writeEndElement(); // para
+ newLine();
+ generateSignatureList(nonreentrant);
}
}
}
} else {
- writer.writeCharacters("This " + typeString(node) + " is ");
+ writer->writeCharacters("This " + typeString(node) + " is ");
if (ts == Node::ThreadSafe)
- generateSimpleLink(writer, linkThreadSafe, "thread-safe");
+ generateSimpleLink(linkThreadSafe, "thread-safe");
else
- generateSimpleLink(writer, linkReentrant, "reentrant");
- writer.writeCharacters(".");
- writer.writeEndElement(); // para
- newLine(writer);
+ generateSimpleLink(linkReentrant, "reentrant");
+ writer->writeCharacters(".");
+ writer->writeEndElement(); // para
+ newLine();
}
- writer.writeEndElement(); // note
+ writer->writeEndElement(); // note
return true;
}
@@ -2074,7 +2073,7 @@ bool DocBookGenerator::generateThreadSafeness(QXmlStreamWriter &writer, const No
Generate the body of the documentation from the qdoc comment
found with the entity represented by the \a node.
*/
-void DocBookGenerator::generateBody(QXmlStreamWriter &writer, const Node *node)
+void DocBookGenerator::generateBody(const Node *node)
{
// From Generator::generateBody, without warnings.
if (!node->hasDoc() && !node->hasSharedDoc()) {
@@ -2102,16 +2101,16 @@ void DocBookGenerator::generateBody(QXmlStreamWriter &writer, const Node *node)
}
if (!t.isEmpty())
- writer.writeTextElement(dbNamespace, "para", t);
+ 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(writer, func);
+ generateReimplementsClause(func);
}
- if (!generateText(writer, node->doc().body(), node)) {
+ if (!generateText(node->doc().body(), node)) {
if (node->isMarkedReimp())
return;
}
@@ -2119,7 +2118,7 @@ void DocBookGenerator::generateBody(QXmlStreamWriter &writer, const Node *node)
// Warning generation skipped with respect to Generator::generateBody.
}
- generateRequiredLinks(writer, node);
+ generateRequiredLinks(node);
}
/*!
@@ -2128,7 +2127,7 @@ void DocBookGenerator::generateBody(QXmlStreamWriter &writer, const Node *node)
Does nothing for non-example nodes.
*/
-void DocBookGenerator::generateRequiredLinks(QXmlStreamWriter &writer, const Node *node)
+void DocBookGenerator::generateRequiredLinks(const Node *node)
{
// From Generator::generateRequiredLinks.
if (!node->isExample())
@@ -2139,11 +2138,11 @@ void DocBookGenerator::generateRequiredLinks(QXmlStreamWriter &writer, const Nod
if (exampleUrl.isEmpty()) {
if (!en->noAutoList()) {
- generateFileList(writer, en, false); // files
- generateFileList(writer, en, true); // images
+ generateFileList(en, false); // files
+ generateFileList(en, true); // images
}
} else {
- generateLinkToExample(writer, en, exampleUrl);
+ generateLinkToExample(en, exampleUrl);
}
}
@@ -2153,8 +2152,7 @@ void DocBookGenerator::generateRequiredLinks(QXmlStreamWriter &writer, const Nod
the path is appended to \a baseUrl, after a '/' character if \a baseUrl did
not already end in one.
*/
-void DocBookGenerator::generateLinkToExample(QXmlStreamWriter &writer, const ExampleNode *en,
- const QString &baseUrl)
+void DocBookGenerator::generateLinkToExample(const ExampleNode *en, const QString &baseUrl)
{
// From Generator::generateLinkToExample.
QString exampleUrl(baseUrl);
@@ -2179,14 +2177,14 @@ void DocBookGenerator::generateLinkToExample(QXmlStreamWriter &writer, const Exa
<< Config::instance().getString(CONFIG_EXAMPLESINSTALLPATH) << en->name();
path.removeAll({});
- writer.writeStartElement(dbNamespace, "para");
- writer.writeStartElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "href",
- exampleUrl.replace(placeholder, path.join(separator)));
- writer.writeCharacters(link);
- writer.writeEndElement(); // link
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "href",
+ exampleUrl.replace(placeholder, path.join(separator)));
+ writer->writeCharacters(link);
+ writer->writeEndElement(); // link
+ writer->writeEndElement(); // para
+ newLine();
}
/*!
@@ -2196,8 +2194,7 @@ void DocBookGenerator::generateLinkToExample(QXmlStreamWriter &writer, const Exa
example. The images are copied into a subtree of
\c{...doc/html/images/used-in-examples/...}
*/
-void DocBookGenerator::generateFileList(QXmlStreamWriter &writer, const ExampleNode *en,
- bool images)
+void DocBookGenerator::generateFileList(const ExampleNode *en, bool images)
{
// From Generator::generateFileList
QString tag;
@@ -2214,12 +2211,12 @@ void DocBookGenerator::generateFileList(QXmlStreamWriter &writer, const ExampleN
if (paths.isEmpty())
return;
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters(tag);
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters(tag);
+ writer->writeEndElement(); // para
+ newLine();
- writer.writeStartElement(dbNamespace, "itemizedlist");
+ writer->writeStartElement(dbNamespace, "itemizedlist");
for (const auto &file : qAsConst(paths)) {
if (images) {
@@ -2229,31 +2226,36 @@ void DocBookGenerator::generateFileList(QXmlStreamWriter &writer, const ExampleN
generateExampleFilePage(en, file);
}
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- generateSimpleLink(writer, file, file);
- writer.writeEndElement(); // para
- writer.writeEndElement(); // listitem
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ generateSimpleLink(file, file);
+ writer->writeEndElement(); // para
+ writer->writeEndElement(); // listitem
+ newLine();
}
- writer.writeEndElement(); // itemizedlist
- newLine(writer);
+ writer->writeEndElement(); // itemizedlist
+ newLine();
}
/*!
Generate a file with the contents of a C++ or QML source file.
*/
-void DocBookGenerator::generateExampleFilePage(const Node *node, const QString &file)
+void DocBookGenerator::generateExampleFilePage(const Node *node, const QString &file,
+ CodeMarker *marker)
{
+ Q_UNUSED(marker);
// From HtmlGenerator::generateExampleFilePage.
if (!node->isExample())
return;
const auto en = static_cast<const ExampleNode *>(node);
- QXmlStreamWriter *writer = startDocument(en, file);
- generateHeader(*writer, en->fullTitle(), en->subtitle(), en);
+
+ // Store current (active) writer
+ QXmlStreamWriter *currentWriter = writer;
+ writer = startDocument(en, file);
+ generateHeader(en->fullTitle(), en->subtitle(), en);
Text text;
Quoter quoter;
@@ -2262,12 +2264,14 @@ void DocBookGenerator::generateExampleFilePage(const Node *node, const QString &
CodeMarker *codeMarker = CodeMarker::markerForFileName(file);
text << Atom(codeMarker->atomType(), code);
Atom a(codeMarker->atomType(), code);
- generateText(*writer, text, en);
+ generateText(text, en);
- endDocument(writer);
+ endDocument();
+ // Restore writer
+ writer = currentWriter;
}
-void DocBookGenerator::generateReimplementsClause(QXmlStreamWriter &writer, const FunctionNode *fn)
+void DocBookGenerator::generateReimplementsClause(const FunctionNode *fn)
{
// From Generator::generateReimplementsClause, without warning generation.
if (!fn->overridesThis().isEmpty()) {
@@ -2276,85 +2280,87 @@ void DocBookGenerator::generateReimplementsClause(QXmlStreamWriter &writer, cons
const FunctionNode *overrides = cn->findOverriddenFunction(fn);
if (overrides && !overrides->isPrivate() && !overrides->parent()->isPrivate()) {
if (overrides->hasDoc()) {
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters("Reimplements: ");
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters("Reimplements: ");
QString fullName =
overrides->parent()->name() + "::" + overrides->signature(false, true);
- generateFullName(writer, overrides->parent(), fullName, overrides);
- writer.writeCharacters(".");
+ generateFullName(overrides->parent(), fullName, overrides);
+ writer->writeCharacters(".");
return;
}
}
const PropertyNode *sameName = cn->findOverriddenProperty(fn);
if (sameName && sameName->hasDoc()) {
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters("Reimplements an access function for property: ");
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters("Reimplements an access function for property: ");
QString fullName = sameName->parent()->name() + "::" + sameName->name();
- generateFullName(writer, sameName->parent(), fullName, overrides);
- writer.writeCharacters(".");
+ generateFullName(sameName->parent(), fullName, overrides);
+ writer->writeCharacters(".");
return;
}
}
}
}
-void DocBookGenerator::generateAlsoList(QXmlStreamWriter &writer, const Node *node)
+void DocBookGenerator::generateAlsoList(const Node *node, CodeMarker *marker)
{
+ Q_UNUSED(marker);
// From Generator::generateAlsoList.
QVector<Text> alsoList = node->doc().alsoList();
supplementAlsoList(node, alsoList);
if (!alsoList.isEmpty()) {
- writer.writeStartElement(dbNamespace, "para");
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeCharacters("See also ");
- writer.writeEndElement(); // emphasis
- newLine(writer);
-
- writer.writeStartElement(dbNamespace, "simplelist");
- writer.writeAttribute("type", "vert");
- writer.writeAttribute("role", "see-also");
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeCharacters("See also ");
+ writer->writeEndElement(); // emphasis
+ newLine();
+
+ writer->writeStartElement(dbNamespace, "simplelist");
+ writer->writeAttribute("type", "vert");
+ writer->writeAttribute("role", "see-also");
for (const Text &text : alsoList) {
- writer.writeStartElement(dbNamespace, "member");
- generateText(writer, text, node);
- writer.writeEndElement(); // member
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "member");
+ generateText(text, node);
+ writer->writeEndElement(); // member
+ newLine();
}
- writer.writeEndElement(); // simplelist
- newLine(writer);
+ writer->writeEndElement(); // simplelist
+ newLine();
- writer.writeEndElement(); // para
+ writer->writeEndElement(); // para
}
}
/*!
Generate a list of maintainers in the output
*/
-void DocBookGenerator::generateMaintainerList(QXmlStreamWriter &writer, const Aggregate *node)
+void DocBookGenerator::generateMaintainerList(const Aggregate *node, CodeMarker *marker)
{
+ Q_UNUSED(marker);
// From Generator::generateMaintainerList.
QStringList sl = getMetadataElements(node, "maintainer");
if (!sl.isEmpty()) {
- writer.writeStartElement(dbNamespace, "para");
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeCharacters("Maintained by: ");
- writer.writeEndElement(); // emphasis
- newLine(writer);
-
- writer.writeStartElement(dbNamespace, "simplelist");
- writer.writeAttribute("type", "vert");
- writer.writeAttribute("role", "maintainer");
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeCharacters("Maintained by: ");
+ writer->writeEndElement(); // emphasis
+ newLine();
+
+ writer->writeStartElement(dbNamespace, "simplelist");
+ writer->writeAttribute("type", "vert");
+ writer->writeAttribute("role", "maintainer");
for (int i = 0; i < sl.size(); ++i) {
- writer.writeStartElement(dbNamespace, "member");
- writer.writeCharacters(sl.at(i));
- writer.writeEndElement(); // member
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "member");
+ writer->writeCharacters(sl.at(i));
+ writer->writeEndElement(); // member
+ newLine();
}
- writer.writeEndElement(); // simplelist
- newLine(writer);
+ writer->writeEndElement(); // simplelist
+ newLine();
- writer.writeEndElement(); // para
+ writer->writeEndElement(); // para
}
}
@@ -2365,22 +2371,21 @@ void DocBookGenerator::generateMaintainerList(QXmlStreamWriter &writer, const Ag
QXmlStreamWriter *DocBookGenerator::startGenericDocument(const Node *node, const QString &fileName)
{
QFile *outFile = openSubPageFile(node, fileName);
- auto writer = new QXmlStreamWriter(outFile);
+ writer = new QXmlStreamWriter(outFile);
writer->setAutoFormatting(false); // We need a precise handling of line feeds.
writer->writeStartDocument();
- newLine(*writer);
+ newLine();
writer->writeNamespace(dbNamespace, "db");
writer->writeNamespace(xlinkNamespace, "xlink");
writer->writeStartElement(dbNamespace, "article");
writer->writeAttribute("version", "5.2");
if (!naturalLanguage.isEmpty())
writer->writeAttribute("xml:lang", naturalLanguage);
- newLine(*writer);
+ newLine();
// Empty the section stack for the new document.
sectionLevels.resize(0);
-// sectionLevels.push(1);
return writer;
}
@@ -2397,12 +2402,13 @@ QXmlStreamWriter *DocBookGenerator::startDocument(const ExampleNode *en, const Q
return startGenericDocument(en, fileName);
}
-void DocBookGenerator::endDocument(QXmlStreamWriter *writer)
+void DocBookGenerator::endDocument()
{
writer->writeEndElement(); // article
writer->writeEndDocument();
writer->device()->close();
delete writer;
+ writer = nullptr;
}
/*!
@@ -2438,26 +2444,26 @@ void DocBookGenerator::generateCppReferencePage(Node *node)
subtitleText = fullTitle;
// Start producing the DocBook file.
- QXmlStreamWriter &writer = *startDocument(node);
+ writer = startDocument(node);
// Info container.
- generateHeader(writer, title, subtitleText, aggregate);
+ generateHeader(title, subtitleText, aggregate);
- generateRequisites(writer, aggregate);
- generateStatus(writer, aggregate);
+ generateRequisites(aggregate);
+ generateStatus(aggregate);
// Element synopsis.
- generateDocBookSynopsis(writer, node);
+ generateDocBookSynopsis(node);
// Actual content.
if (!aggregate->doc().isEmpty()) {
- startSection(writer, registerRef("details"), "Detailed Description");
+ startSection(registerRef("details"), "Detailed Description");
- generateBody(writer, aggregate);
- generateAlsoList(writer, aggregate);
- generateMaintainerList(writer, aggregate);
+ generateBody(aggregate);
+ generateAlsoList(aggregate);
+ generateMaintainerList(aggregate);
- endSection(writer);
+ endSection();
}
Sections sections(const_cast<Aggregate *>(aggregate));
@@ -2475,54 +2481,54 @@ void DocBookGenerator::generateCppReferencePage(Node *node)
if (!headerGenerated) {
// Equivalent to h2
- startSection(writer, registerRef(section->title().toLower()), section->title());
+ startSection(registerRef(section->title().toLower()), section->title());
headerGenerated = true;
}
if ((*member)->nodeType() != Node::Class) {
// This function starts its own section.
- generateDetailedMember(writer, *member, aggregate);
+ generateDetailedMember(*member, aggregate);
} else {
- startSectionBegin(writer);
- writer.writeCharacters("class ");
- generateFullName(writer, *member, aggregate);
- startSectionEnd(writer);
- generateBrief(writer, *member);
- endSection(writer);
+ startSectionBegin();
+ writer->writeCharacters("class ");
+ generateFullName(*member, aggregate);
+ startSectionEnd();
+ generateBrief(*member);
+ endSection();
}
++member;
}
if (headerGenerated)
- endSection(writer);
+ endSection();
++section;
}
- generateObsoleteMembers(writer, sections);
+ generateObsoleteMembers(sections);
- endDocument(&writer);
+ endDocument();
}
-void generateSynopsisInfo(QXmlStreamWriter &writer, const QString &key, const QString &value)
+void DocBookGenerator::generateSynopsisInfo(const QString &key, const QString &value)
{
- writer.writeStartElement(dbNamespace, "synopsisinfo");
- writer.writeAttribute(dbNamespace, "role", key);
- writer.writeCharacters(value);
- writer.writeEndElement(); // synopsisinfo
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "synopsisinfo");
+ writer->writeAttribute(dbNamespace, "role", key);
+ writer->writeCharacters(value);
+ writer->writeEndElement(); // synopsisinfo
+ newLine();
}
-void generateModifier(QXmlStreamWriter &writer, const QString &value)
+void DocBookGenerator::generateModifier(const QString &value)
{
- writer.writeTextElement(dbNamespace, "modifier", value);
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "modifier", value);
+ newLine();
}
/*!
Generate the metadata for the given \a node in DocBook.
*/
-void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const Node *node)
+void DocBookGenerator::generateDocBookSynopsis(const Node *node)
{
if (!node)
return;
@@ -2559,132 +2565,132 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
// Start the synopsis tag.
QString synopsisTag = nodeToSynopsisTag(node);
- writer.writeStartElement(dbNamespace, synopsisTag);
- newLine(writer);
+ writer->writeStartElement(dbNamespace, synopsisTag);
+ newLine();
// Name and basic properties of each tag (like types and parameters).
if (node->isClass()) {
- writer.writeStartElement(dbNamespace, "ooclass");
- writer.writeTextElement(dbNamespace, "classname", node->plainName());
- writer.writeEndElement(); // ooclass
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "ooclass");
+ writer->writeTextElement(dbNamespace, "classname", node->plainName());
+ writer->writeEndElement(); // ooclass
+ newLine();
} else if (node->isNamespace()) {
- writer.writeTextElement(dbNamespace, "namespacename", node->plainName());
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "namespacename", node->plainName());
+ newLine();
} else if (node->isQmlType()) {
- writer.writeStartElement(dbNamespace, "ooclass");
- writer.writeTextElement(dbNamespace, "classname", node->plainName());
- writer.writeEndElement(); // ooclass
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "ooclass");
+ writer->writeTextElement(dbNamespace, "classname", node->plainName());
+ writer->writeEndElement(); // ooclass
+ newLine();
if (!qcn->groupNames().isEmpty())
- writer.writeAttribute("groups", qcn->groupNames().join(QLatin1Char(',')));
+ writer->writeAttribute("groups", qcn->groupNames().join(QLatin1Char(',')));
} else if (node->isProperty()) {
- writer.writeTextElement(dbNamespace, "modifier", "(Qt property)");
- newLine(writer);
- writer.writeTextElement(dbNamespace, "type", propertyNode->dataType());
- newLine(writer);
- writer.writeTextElement(dbNamespace, "varname", node->plainName());
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "modifier", "(Qt property)");
+ newLine();
+ writer->writeTextElement(dbNamespace, "type", propertyNode->dataType());
+ newLine();
+ writer->writeTextElement(dbNamespace, "varname", node->plainName());
+ newLine();
} else if (node->isVariable()) {
if (variableNode->isStatic()) {
- writer.writeTextElement(dbNamespace, "modifier", "static");
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "modifier", "static");
+ newLine();
}
- writer.writeTextElement(dbNamespace, "type", variableNode->dataType());
- newLine(writer);
- writer.writeTextElement(dbNamespace, "varname", node->plainName());
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "type", variableNode->dataType());
+ newLine();
+ writer->writeTextElement(dbNamespace, "varname", node->plainName());
+ newLine();
} else if (node->isEnumType()) {
- writer.writeTextElement(dbNamespace, "enumname", node->plainName());
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "enumname", node->plainName());
+ newLine();
} else if (node->isQmlProperty()) {
QString name = node->name();
if (qpn->isAttached())
name.prepend(qpn->element() + QLatin1Char('.'));
- writer.writeTextElement(dbNamespace, "type", qpn->dataType());
- newLine(writer);
- writer.writeTextElement(dbNamespace, "varname", name);
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "type", qpn->dataType());
+ newLine();
+ writer->writeTextElement(dbNamespace, "varname", name);
+ newLine();
if (qpn->isAttached()) {
- writer.writeTextElement(dbNamespace, "modifier", "attached");
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "modifier", "attached");
+ newLine();
}
if ((const_cast<QmlPropertyNode *>(qpn))->isWritable()) {
- writer.writeTextElement(dbNamespace, "modifier", "writable");
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "modifier", "writable");
+ newLine();
}
if (qpn->isReadOnly()) {
- generateModifier(writer, "[read-only]");
- newLine(writer);
+ generateModifier("[read-only]");
+ newLine();
}
if (qpn->isDefault()) {
- generateModifier(writer, "[default]");
- newLine(writer);
+ generateModifier("[default]");
+ newLine();
}
} else if (node->isFunction()) {
if (functionNode->virtualness() != "non")
- generateModifier(writer, "virtual");
+ generateModifier("virtual");
if (functionNode->isConst())
- generateModifier(writer, "const");
+ generateModifier("const");
if (functionNode->isStatic())
- generateModifier(writer, "static");
+ generateModifier("static");
if (!functionNode->isMacro()) {
if (functionNode->returnType() == "void")
- writer.writeEmptyElement(dbNamespace, "void");
+ writer->writeEmptyElement(dbNamespace, "void");
else
- writer.writeTextElement(dbNamespace, "type", functionNode->returnType());
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "type", functionNode->returnType());
+ newLine();
}
// Remove two characters from the plain name to only get the name
// of the method without parentheses.
- writer.writeTextElement(dbNamespace, "methodname", node->plainName().chopped(2));
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "methodname", node->plainName().chopped(2));
+ newLine();
if (functionNode->isOverload())
- generateModifier(writer, "overload");
+ generateModifier("overload");
if (functionNode->isDefault())
- generateModifier(writer, "default");
+ generateModifier("default");
if (functionNode->isFinal())
- generateModifier(writer, "final");
+ generateModifier("final");
if (functionNode->isOverride())
- generateModifier(writer, "override");
+ generateModifier("override");
if (!functionNode->isMacro() && functionNode->parameters().isEmpty()) {
- writer.writeEmptyElement(dbNamespace, "void");
- newLine(writer);
+ writer->writeEmptyElement(dbNamespace, "void");
+ newLine();
}
const Parameters &lp = functionNode->parameters();
for (int i = 0; i < lp.count(); ++i) {
const Parameter &parameter = lp.at(i);
- writer.writeStartElement(dbNamespace, "methodparam");
- newLine(writer);
- writer.writeTextElement(dbNamespace, "type", parameter.type());
- newLine(writer);
- writer.writeTextElement(dbNamespace, "parameter", parameter.name());
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "methodparam");
+ newLine();
+ writer->writeTextElement(dbNamespace, "type", parameter.type());
+ newLine();
+ writer->writeTextElement(dbNamespace, "parameter", parameter.name());
+ newLine();
if (!parameter.defaultValue().isEmpty()) {
- writer.writeTextElement(dbNamespace, "initializer", parameter.defaultValue());
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "initializer", parameter.defaultValue());
+ newLine();
}
- writer.writeEndElement(); // methodparam
- newLine(writer);
+ writer->writeEndElement(); // methodparam
+ newLine();
}
- generateSynopsisInfo(writer, "meta", functionNode->metanessString());
+ generateSynopsisInfo("meta", functionNode->metanessString());
if (functionNode->isOverload())
- generateSynopsisInfo(writer, "overload-number",
+ generateSynopsisInfo("overload-number",
QString::number(functionNode->overloadNumber()));
if (functionNode->isRef())
- generateSynopsisInfo(writer, "refness", QString::number(1));
+ generateSynopsisInfo("refness", QString::number(1));
else if (functionNode->isRefRef())
- generateSynopsisInfo(writer, "refness", QString::number(2));
+ generateSynopsisInfo("refness", QString::number(2));
if (functionNode->hasAssociatedProperties()) {
QStringList associatedProperties;
@@ -2694,7 +2700,7 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
associatedProperties << pn->name();
}
associatedProperties.sort();
- generateSynopsisInfo(writer, "associated-property",
+ generateSynopsisInfo("associated-property",
associatedProperties.join(QLatin1Char(',')));
}
@@ -2708,51 +2714,51 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
signature += " = 0";
else if (functionNode->isDefault())
signature += " = default";
- generateSynopsisInfo(writer, "signature", signature);
+ generateSynopsisInfo("signature", signature);
} else {
node->doc().location().warning(tr("Unexpected node type in generateDocBookSynopsis: %1")
.arg(node->nodeTypeString()));
- newLine(writer);
+ newLine();
}
// Accessibility status.
if (!node->isPageNode() && !node->isCollectionNode()) {
switch (node->access()) {
case Node::Public:
- generateSynopsisInfo(writer, "access", "public");
+ generateSynopsisInfo("access", "public");
break;
case Node::Protected:
- generateSynopsisInfo(writer, "access", "protected");
+ generateSynopsisInfo("access", "protected");
break;
case Node::Private:
- generateSynopsisInfo(writer, "access", "private");
+ generateSynopsisInfo("access", "private");
break;
default:
break;
}
if (node->isAbstract())
- generateSynopsisInfo(writer, "abstract", "true");
+ generateSynopsisInfo("abstract", "true");
}
// Status.
switch (node->status()) {
case Node::Active:
- generateSynopsisInfo(writer, "status", "active");
+ generateSynopsisInfo("status", "active");
break;
case Node::Preliminary:
- generateSynopsisInfo(writer, "status", "preliminary");
+ generateSynopsisInfo("status", "preliminary");
break;
case Node::Deprecated:
- generateSynopsisInfo(writer, "status", "deprecated");
+ generateSynopsisInfo("status", "deprecated");
break;
case Node::Obsolete:
- generateSynopsisInfo(writer, "status", "obsolete");
+ generateSynopsisInfo("status", "obsolete");
break;
case Node::Internal:
- generateSynopsisInfo(writer, "status", "internal");
+ generateSynopsisInfo("status", "internal");
break;
default:
- generateSynopsisInfo(writer, "status", "main");
+ generateSynopsisInfo("status", "main");
break;
}
@@ -2761,12 +2767,12 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
// Includes.
if (!aggregate->includeFiles().isEmpty()) {
for (const QString &include : aggregate->includeFiles())
- generateSynopsisInfo(writer, "headers", include);
+ generateSynopsisInfo("headers", include);
}
// Since and project.
if (!aggregate->since().isEmpty())
- generateSynopsisInfo(writer, "since", formatSince(aggregate));
+ generateSynopsisInfo("since", formatSince(aggregate));
if (aggregate->nodeType() == Node::Class || aggregate->nodeType() == Node::Namespace) {
// QT variable.
@@ -2774,7 +2780,7 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
const CollectionNode *cn =
qdb_->getCollectionNode(aggregate->physicalModuleName(), Node::Module);
if (cn && !cn->qtVariable().isEmpty())
- generateSynopsisInfo(writer, "qmake", "QT += " + cn->qtVariable());
+ generateSynopsisInfo("qmake", "QT += " + cn->qtVariable());
}
}
@@ -2786,46 +2792,46 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
Atom a = Atom(Atom::LinkNode, CodeMarker::stringForNode(classe->qmlElement()));
QString link = getAutoLink(&a, aggregate, &otherNode);
- writer.writeStartElement(dbNamespace, "synopsisinfo");
- writer.writeAttribute(dbNamespace, "role", "instantiatedBy");
- generateSimpleLink(writer, link, classe->qmlElement()->name());
- writer.writeEndElement(); // synopsisinfo
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "synopsisinfo");
+ writer->writeAttribute(dbNamespace, "role", "instantiatedBy");
+ generateSimpleLink(link, classe->qmlElement()->name());
+ writer->writeEndElement(); // synopsisinfo
+ newLine();
}
// Inherits.
QVector<RelatedClass>::ConstIterator r;
if (!classe->baseClasses().isEmpty()) {
- writer.writeStartElement(dbNamespace, "synopsisinfo");
- writer.writeAttribute(dbNamespace, "role", "inherits");
+ writer->writeStartElement(dbNamespace, "synopsisinfo");
+ writer->writeAttribute(dbNamespace, "role", "inherits");
r = classe->baseClasses().constBegin();
int index = 0;
while (r != classe->baseClasses().constEnd()) {
if ((*r).node_) {
- generateFullName(writer, (*r).node_, classe);
+ generateFullName((*r).node_, classe);
if ((*r).access_ == Node::Protected) {
- writer.writeCharacters(" (protected)");
+ writer->writeCharacters(" (protected)");
} else if ((*r).access_ == Node::Private) {
- writer.writeCharacters(" (private)");
+ writer->writeCharacters(" (private)");
}
- writer.writeCharacters(comma(index++, classe->baseClasses().count()));
+ writer->writeCharacters(comma(index++, classe->baseClasses().count()));
}
++r;
}
- writer.writeEndElement(); // synopsisinfo
- newLine(writer);
+ writer->writeEndElement(); // synopsisinfo
+ newLine();
}
// Inherited by.
if (!classe->derivedClasses().isEmpty()) {
- writer.writeStartElement(dbNamespace, "synopsisinfo");
- writer.writeAttribute(dbNamespace, "role", "inheritedBy");
- generateSortedNames(writer, classe, classe->derivedClasses());
- writer.writeEndElement(); // synopsisinfo
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "synopsisinfo");
+ writer->writeAttribute(dbNamespace, "role", "inheritedBy");
+ generateSortedNames(classe, classe->derivedClasses());
+ writer->writeEndElement(); // synopsisinfo
+ newLine();
}
}
}
@@ -2841,23 +2847,23 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
else
logicalModuleVersion = qcn->logicalModuleVersion();
- generateSynopsisInfo(writer, "import",
+ generateSynopsisInfo("import",
"import " + qcn->logicalModuleName() + QLatin1Char(' ')
+ logicalModuleVersion);
// Since and project.
if (!qcn->since().isEmpty())
- generateSynopsisInfo(writer, "since", formatSince(qcn));
+ generateSynopsisInfo("since", formatSince(qcn));
// Inherited by.
NodeList subs;
QmlTypeNode::subclasses(qcn, subs);
if (!subs.isEmpty()) {
- writer.writeTextElement(dbNamespace, "synopsisinfo");
- writer.writeAttribute(dbNamespace, "role", "inheritedBy");
- generateSortedQmlNames(writer, qcn, subs);
- writer.writeEndElement(); // synopsisinfo
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "synopsisinfo");
+ writer->writeAttribute(dbNamespace, "role", "inheritedBy");
+ generateSortedQmlNames(qcn, subs);
+ writer->writeEndElement(); // synopsisinfo
+ newLine();
}
// Inherits.
@@ -2869,11 +2875,11 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
Atom a = Atom(Atom::LinkNode, CodeMarker::stringForNode(base));
QString link = getAutoLink(&a, base, &otherNode);
- writer.writeTextElement(dbNamespace, "synopsisinfo");
- writer.writeAttribute(dbNamespace, "role", "inherits");
- generateSimpleLink(writer, link, base->name());
- writer.writeEndElement(); // synopsisinfo
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "synopsisinfo");
+ writer->writeAttribute(dbNamespace, "role", "inherits");
+ generateSimpleLink(link, base->name());
+ writer->writeEndElement(); // synopsisinfo
+ newLine();
}
// Instantiates.
@@ -2883,42 +2889,42 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
Atom a = Atom(Atom::LinkNode, CodeMarker::stringForNode(qcn));
QString link = getAutoLink(&a, cn, &otherNode);
- writer.writeTextElement(dbNamespace, "synopsisinfo");
- writer.writeAttribute(dbNamespace, "role", "instantiates");
- generateSimpleLink(writer, link, cn->name());
- writer.writeEndElement(); // synopsisinfo
- newLine(writer);
+ writer->writeTextElement(dbNamespace, "synopsisinfo");
+ writer->writeAttribute(dbNamespace, "role", "instantiates");
+ generateSimpleLink(link, cn->name());
+ writer->writeEndElement(); // synopsisinfo
+ newLine();
}
}
// Thread safeness.
switch (node->threadSafeness()) {
case Node::UnspecifiedSafeness:
- generateSynopsisInfo(writer, "threadsafeness", "unspecified");
+ generateSynopsisInfo("threadsafeness", "unspecified");
break;
case Node::NonReentrant:
- generateSynopsisInfo(writer, "threadsafeness", "non-reentrant");
+ generateSynopsisInfo("threadsafeness", "non-reentrant");
break;
case Node::Reentrant:
- generateSynopsisInfo(writer, "threadsafeness", "reentrant");
+ generateSynopsisInfo("threadsafeness", "reentrant");
break;
case Node::ThreadSafe:
- generateSynopsisInfo(writer, "threadsafeness", "thread safe");
+ generateSynopsisInfo("threadsafeness", "thread safe");
break;
default:
- generateSynopsisInfo(writer, "threadsafeness", "unspecified");
+ generateSynopsisInfo("threadsafeness", "unspecified");
break;
}
// Module.
if (!node->physicalModuleName().isEmpty())
- generateSynopsisInfo(writer, "module", node->physicalModuleName());
+ generateSynopsisInfo("module", node->physicalModuleName());
// Group.
if (classNode && !classNode->groupNames().isEmpty()) {
- generateSynopsisInfo(writer, "groups", classNode->groupNames().join(QLatin1Char(',')));
+ generateSynopsisInfo("groups", classNode->groupNames().join(QLatin1Char(',')));
} else if (qcn && !qcn->groupNames().isEmpty()) {
- generateSynopsisInfo(writer, "groups", qcn->groupNames().join(QLatin1Char(',')));
+ generateSynopsisInfo("groups", qcn->groupNames().join(QLatin1Char(',')));
}
// Properties.
@@ -2926,25 +2932,25 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
for (const Node *fnNode : propertyNode->getters()) {
if (fnNode) {
const auto funcNode = static_cast<const FunctionNode *>(fnNode);
- generateSynopsisInfo(writer, "getter", funcNode->name());
+ generateSynopsisInfo("getter", funcNode->name());
}
}
for (const Node *fnNode : propertyNode->setters()) {
if (fnNode) {
const auto funcNode = static_cast<const FunctionNode *>(fnNode);
- generateSynopsisInfo(writer, "setter", funcNode->name());
+ generateSynopsisInfo("setter", funcNode->name());
}
}
for (const Node *fnNode : propertyNode->resetters()) {
if (fnNode) {
const auto funcNode = static_cast<const FunctionNode *>(fnNode);
- generateSynopsisInfo(writer, "resetter", funcNode->name());
+ generateSynopsisInfo("resetter", funcNode->name());
}
}
for (const Node *fnNode : propertyNode->notifiers()) {
if (fnNode) {
const auto funcNode = static_cast<const FunctionNode *>(fnNode);
- generateSynopsisInfo(writer, "notifier", funcNode->name());
+ generateSynopsisInfo("notifier", funcNode->name());
}
}
}
@@ -2952,30 +2958,30 @@ void DocBookGenerator::generateDocBookSynopsis(QXmlStreamWriter &writer, const N
// Enums and typedefs.
if (enumNode) {
for (const EnumItem &item : enumNode->items()) {
- writer.writeStartElement(dbNamespace, "enumitem");
- newLine(writer);
- writer.writeAttribute(dbNamespace, "enumidentifier", item.name());
- newLine(writer);
- writer.writeAttribute(dbNamespace, "enumvalue", item.value());
- newLine(writer);
- writer.writeEndElement(); // enumitem
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "enumitem");
+ newLine();
+ writer->writeAttribute(dbNamespace, "enumidentifier", item.name());
+ newLine();
+ writer->writeAttribute(dbNamespace, "enumvalue", item.value());
+ newLine();
+ writer->writeEndElement(); // enumitem
+ newLine();
}
}
- writer.writeEndElement(); // nodeToSynopsisTag (like classsynopsis)
- newLine(writer);
+ writer->writeEndElement(); // nodeToSynopsisTag (like classsynopsis)
+ newLine();
// The typedef associated to this enum.
if (enumNode && enumNode->flagsType()) {
- writer.writeStartElement(dbNamespace, "typedefsynopsis");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "typedefsynopsis");
+ newLine();
- writer.writeTextElement(dbNamespace, "typedefname",
- enumNode->flagsType()->fullDocumentName());
+ writer->writeTextElement(dbNamespace, "typedefname",
+ enumNode->flagsType()->fullDocumentName());
- writer.writeEndElement(); // typedefsynopsis
- newLine(writer);
+ writer->writeEndElement(); // typedefsynopsis
+ newLine();
}
}
@@ -2993,8 +2999,8 @@ QString taggedNode(const Node *node)
Parses a string with method/variable name and (return) type
to include type tags.
*/
-void DocBookGenerator::typified(QXmlStreamWriter &writer, const QString &string,
- const Node *relative, bool trailingSpace, bool generateType)
+void DocBookGenerator::typified(const QString &string, const Node *relative, bool trailingSpace,
+ bool generateType)
{
// Adapted from CodeMarker::typified and HtmlGenerator::highlightedCode.
// Note: CppCodeMarker::markedUpIncludes is not needed for DocBook, as this part is natively
@@ -3017,7 +3023,7 @@ void DocBookGenerator::typified(QXmlStreamWriter &writer, const QString &string,
bool isProbablyType = (pendingWord != QLatin1String("const"));
if (generateType && isProbablyType) {
// Flush the current buffer.
- writer.writeCharacters(result);
+ writer->writeCharacters(result);
result.truncate(0);
// Add the link, logic from HtmlGenerator::highlightedCode.
@@ -3029,12 +3035,12 @@ void DocBookGenerator::typified(QXmlStreamWriter &writer, const QString &string,
href = linkForNode(n, relative);
}
- writer.writeStartElement(dbNamespace, "type");
+ writer->writeStartElement(dbNamespace, "type");
if (href.isEmpty())
- writer.writeCharacters(pendingWord);
+ writer->writeCharacters(pendingWord);
else
- generateSimpleLink(writer, href, pendingWord);
- writer.writeEndElement(); // type
+ generateSimpleLink(href, pendingWord);
+ writer->writeEndElement(); // type
} else {
result += pendingWord;
}
@@ -3072,36 +3078,35 @@ void DocBookGenerator::typified(QXmlStreamWriter &writer, const QString &string,
result += QLatin1Char(' ');
}
- writer.writeCharacters(result);
+ writer->writeCharacters(result);
}
-void DocBookGenerator::generateSynopsisName(QXmlStreamWriter &writer, const Node *node,
- const Node *relative, bool generateNameLink)
+void DocBookGenerator::generateSynopsisName(const Node *node, const Node *relative,
+ bool generateNameLink)
{
// Implements the rewriting of <@link> from HtmlGenerator::highlightedCode, only due to calls to
// CodeMarker::linkTag in CppCodeMarker::markedUpSynopsis.
QString name = taggedNode(node);
if (!generateNameLink) {
- writer.writeCharacters(name);
+ writer->writeCharacters(name);
return;
}
- writer.writeStartElement(dbNamespace, "emphasis");
- writer.writeAttribute("role", "bold");
- generateSimpleLink(writer, linkForNode(node, relative), name);
- writer.writeEndElement(); // emphasis
+ writer->writeStartElement(dbNamespace, "emphasis");
+ writer->writeAttribute("role", "bold");
+ generateSimpleLink(linkForNode(node, relative), name);
+ writer->writeEndElement(); // emphasis
}
-void DocBookGenerator::generateParameter(QXmlStreamWriter &writer, const Parameter &parameter,
- const Node *relative, bool generateExtra,
- bool generateType)
+void DocBookGenerator::generateParameter(const Parameter &parameter, const Node *relative,
+ bool generateExtra, bool generateType)
{
const QString &pname = parameter.name();
const QString &ptype = parameter.type();
QString paramName;
if (!pname.isEmpty()) {
- typified(writer, ptype, relative, true, generateType);
+ typified(ptype, relative, true, generateType);
paramName = pname;
} else {
paramName = ptype;
@@ -3111,25 +3116,25 @@ void DocBookGenerator::generateParameter(QXmlStreamWriter &writer, const Paramet
// this is intended to be rendered as a subscript.
QRegExp sub("([a-z]+)_([0-9]+|n)");
- writer.writeStartElement(dbNamespace, "emphasis");
+ writer->writeStartElement(dbNamespace, "emphasis");
if (sub.indexIn(paramName) != -1) {
- writer.writeCharacters(sub.cap(0));
- writer.writeStartElement(dbNamespace, "sub");
- writer.writeCharacters(sub.cap(1));
- writer.writeEndElement(); // sub
+ writer->writeCharacters(sub.cap(0));
+ writer->writeStartElement(dbNamespace, "sub");
+ writer->writeCharacters(sub.cap(1));
+ writer->writeEndElement(); // sub
} else {
- writer.writeCharacters(paramName);
+ writer->writeCharacters(paramName);
}
- writer.writeEndElement(); // emphasis
+ writer->writeEndElement(); // emphasis
}
const QString &pvalue = parameter.defaultValue();
if (generateExtra && !pvalue.isEmpty())
- writer.writeCharacters(" = " + pvalue);
+ writer->writeCharacters(" = " + pvalue);
}
-void DocBookGenerator::generateSynopsis(QXmlStreamWriter &writer, const Node *node,
- const Node *relative, Section::Style style)
+void DocBookGenerator::generateSynopsis(const Node *node, const Node *relative,
+ Section::Style style)
{
// From HtmlGenerator::generateSynopsis (conditions written as booleans).
const bool generateExtra = style != Section::AllMembers;
@@ -3168,8 +3173,8 @@ void DocBookGenerator::generateSynopsis(QXmlStreamWriter &writer, const Node *no
bracketed += "slot";
if (!bracketed.isEmpty())
- writer.writeCharacters(QLatin1Char('[') + bracketed.join(' ')
- + QStringLiteral("] "));
+ writer->writeCharacters(QLatin1Char('[') + bracketed.join(' ')
+ + QStringLiteral("] "));
}
}
@@ -3183,7 +3188,7 @@ void DocBookGenerator::generateSynopsis(QXmlStreamWriter &writer, const Node *no
extra = "(obsolete) ";
if (!extra.isEmpty())
- writer.writeCharacters(extra);
+ writer->writeCharacters(extra);
}
}
@@ -3192,18 +3197,18 @@ void DocBookGenerator::generateSynopsis(QXmlStreamWriter &writer, const Node *no
if (!node->isRelatedNonmember() && !node->isProxyNode() && !node->parent()->name().isEmpty()
&& !node->parent()->isHeader() && !node->isProperty() && !node->isQmlNode()
&& !node->isJsNode()) {
- writer.writeCharacters(taggedNode(node->parent()) + "::");
+ writer->writeCharacters(taggedNode(node->parent()) + "::");
}
}
switch (node->nodeType()) {
case Node::Namespace:
- writer.writeCharacters("namespace ");
- generateSynopsisName(writer, node, relative, generateNameLink);
+ writer->writeCharacters("namespace ");
+ generateSynopsisName(node, relative, generateNameLink);
break;
case Node::Class:
- writer.writeCharacters("class ");
- generateSynopsisName(writer, node, relative, generateNameLink);
+ writer->writeCharacters("class ");
+ generateSynopsisName(node, relative, generateNameLink);
break;
case Node::Function: {
const auto func = (const FunctionNode *)node;
@@ -3211,29 +3216,28 @@ void DocBookGenerator::generateSynopsis(QXmlStreamWriter &writer, const Node *no
// First, the part coming before the name.
if (style == Section::Summary || style == Section::Accessors) {
if (!func->isNonvirtual())
- writer.writeCharacters(QStringLiteral("virtual "));
+ writer->writeCharacters(QStringLiteral("virtual "));
}
// Name and parameters.
if (style != Section::AllMembers && !func->returnType().isEmpty())
- typified(writer, func->returnType(), relative, true, generateType);
- generateSynopsisName(writer, node, relative, generateNameLink);
+ typified(func->returnType(), relative, true, generateType);
+ generateSynopsisName(node, relative, generateNameLink);
if (!func->isMacroWithoutParams()) {
- writer.writeCharacters(QStringLiteral("("));
+ writer->writeCharacters(QStringLiteral("("));
if (!func->parameters().isEmpty()) {
const Parameters &parameters = func->parameters();
for (int i = 0; i < parameters.count(); i++) {
if (i > 0)
- writer.writeCharacters(QStringLiteral(", "));
- generateParameter(writer, parameters.at(i), relative, generateExtra,
- generateType);
+ writer->writeCharacters(QStringLiteral(", "));
+ generateParameter(parameters.at(i), relative, generateExtra, generateType);
}
}
- writer.writeCharacters(QStringLiteral(")"));
+ writer->writeCharacters(QStringLiteral(")"));
}
if (func->isConst())
- writer.writeCharacters(QStringLiteral(" const"));
+ writer->writeCharacters(QStringLiteral(" const"));
if (style == Section::Summary || style == Section::Accessors) {
// virtual is prepended, if needed.
@@ -3248,11 +3252,11 @@ void DocBookGenerator::generateSynopsis(QXmlStreamWriter &writer, const Node *no
synopsis += QStringLiteral(" &");
else if (func->isRefRef())
synopsis += QStringLiteral(" &&");
- writer.writeCharacters(synopsis);
+ writer->writeCharacters(synopsis);
} else if (style == Section::AllMembers) {
if (!func->returnType().isEmpty() && func->returnType() != "void") {
- writer.writeCharacters(QStringLiteral(" : "));
- typified(writer, func->returnType(), relative, false, generateType);
+ writer->writeCharacters(QStringLiteral(" : "));
+ typified(func->returnType(), relative, false, generateType);
}
} else {
QString synopsis;
@@ -3260,13 +3264,13 @@ void DocBookGenerator::generateSynopsis(QXmlStreamWriter &writer, const Node *no
synopsis += QStringLiteral(" &");
else if (func->isRefRef())
synopsis += QStringLiteral(" &&");
- writer.writeCharacters(synopsis);
+ writer->writeCharacters(synopsis);
}
} break;
case Node::Enum: {
const auto enume = static_cast<const EnumNode *>(node);
- writer.writeCharacters(QStringLiteral("enum "));
- generateSynopsisName(writer, node, relative, generateNameLink);
+ writer->writeCharacters(QStringLiteral("enum "));
+ generateSynopsisName(node, relative, generateNameLink);
QString synopsis;
if (style == Section::Summary) {
@@ -3295,48 +3299,47 @@ void DocBookGenerator::generateSynopsis(QXmlStreamWriter &writer, const Node *no
synopsis += QLatin1Char(' ');
synopsis += QLatin1Char('}');
}
- writer.writeCharacters(synopsis);
+ writer->writeCharacters(synopsis);
} break;
case Node::Typedef: {
const auto typedeff = static_cast<const TypedefNode *>(node);
if (typedeff->associatedEnum())
- writer.writeCharacters("flags ");
+ writer->writeCharacters("flags ");
else
- writer.writeCharacters("typedef ");
- generateSynopsisName(writer, node, relative, generateNameLink);
+ writer->writeCharacters("typedef ");
+ generateSynopsisName(node, relative, generateNameLink);
} break;
case Node::Property: {
const auto property = static_cast<const PropertyNode *>(node);
- generateSynopsisName(writer, node, relative, generateNameLink);
- writer.writeCharacters(" : ");
- typified(writer, property->qualifiedDataType(), relative, false, generateType);
+ generateSynopsisName(node, relative, generateNameLink);
+ writer->writeCharacters(" : ");
+ typified(property->qualifiedDataType(), relative, false, generateType);
} break;
case Node::Variable: {
const auto variable = static_cast<const VariableNode *>(node);
if (style == Section::AllMembers) {
- generateSynopsisName(writer, node, relative, generateNameLink);
- writer.writeCharacters(" : ");
- typified(writer, variable->dataType(), relative, false, generateType);
+ generateSynopsisName(node, relative, generateNameLink);
+ writer->writeCharacters(" : ");
+ typified(variable->dataType(), relative, false, generateType);
} else {
- typified(writer, variable->leftType(), relative, false, generateType);
- writer.writeCharacters(" ");
- generateSynopsisName(writer, node, relative, generateNameLink);
- writer.writeCharacters(variable->rightType());
+ typified(variable->leftType(), relative, false, generateType);
+ writer->writeCharacters(" ");
+ generateSynopsisName(node, relative, generateNameLink);
+ writer->writeCharacters(variable->rightType());
}
} break;
default:
- generateSynopsisName(writer, node, relative, generateNameLink);
+ generateSynopsisName(node, relative, generateNameLink);
}
}
-void DocBookGenerator::generateEnumValue(QXmlStreamWriter &writer, const QString &enumValue,
- const Node *relative)
+void DocBookGenerator::generateEnumValue(const QString &enumValue, const Node *relative)
{
// From CppCodeMarker::markedUpEnumValue, simplifications from Generator::plainCode (removing
// <@op>). With respect to CppCodeMarker::markedUpEnumValue, the order of generation of parents
// must be reversed so that they are processed in the order
if (!relative->isEnumType()) {
- writer.writeCharacters(enumValue);
+ writer->writeCharacters(enumValue);
return;
}
@@ -3349,13 +3352,13 @@ void DocBookGenerator::generateEnumValue(QXmlStreamWriter &writer, const QString
node = node->parent();
}
- writer.writeStartElement(dbNamespace, "code");
+ writer->writeStartElement(dbNamespace, "code");
for (auto parent : parents) {
- generateSynopsisName(writer, parent, relative, true);
- writer.writeCharacters("::");
+ generateSynopsisName(parent, relative, true);
+ writer->writeCharacters("::");
}
- writer.writeCharacters(enumValue);
- writer.writeEndElement(); // code
+ writer->writeCharacters(enumValue);
+ writer->writeEndElement(); // code
}
/*!
@@ -3366,77 +3369,76 @@ void DocBookGenerator::generateEnumValue(QXmlStreamWriter &writer, const QString
function is supposed to do, so I have not tried to complete the comment
yet.
*/
-void DocBookGenerator::generateOverloadedSignal(QXmlStreamWriter &writer, const Node *node)
+void DocBookGenerator::generateOverloadedSignal(const Node *node)
{
// From Generator::generateOverloadedSignal.
QString code = getOverloadedSignalCode(node);
if (code.isEmpty())
return;
- writer.writeStartElement(dbNamespace, "note");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters("Signal ");
- writer.writeTextElement(dbNamespace, "emphasis", node->name());
- writer.writeCharacters(" is overloaded in this class. To connect to this "
- "signal by using the function pointer syntax, Qt "
- "provides a convenient helper for obtaining the "
- "function pointer as shown in this example:");
- writer.writeTextElement(dbNamespace, "code", code);
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // note
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "note");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters("Signal ");
+ writer->writeTextElement(dbNamespace, "emphasis", node->name());
+ writer->writeCharacters(" is overloaded in this class. To connect to this "
+ "signal by using the function pointer syntax, Qt "
+ "provides a convenient helper for obtaining the "
+ "function pointer as shown in this example:");
+ writer->writeTextElement(dbNamespace, "code", code);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // note
+ newLine();
}
/*!
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(QXmlStreamWriter &writer)
+void DocBookGenerator::generatePrivateSignalNote()
{
// From Generator::generatePrivateSignalNote.
- writer.writeStartElement(dbNamespace, "note");
- newLine(writer);
- 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(writer);
+ 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(QXmlStreamWriter &writer, const Node *node)
+void DocBookGenerator::generateInvokableNote(const Node *node)
{
// From Generator::generateInvokableNote.
- writer.writeStartElement(dbNamespace, "note");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters(
+ writer->writeStartElement(dbNamespace, "note");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters(
"This function can be invoked via the meta-object system and from QML. See ");
- generateSimpleLink(writer, node->url(), "Q_INVOKABLE");
- writer.writeCharacters(".");
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // note
- newLine(writer);
+ 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(QXmlStreamWriter &writer,
- const FunctionNode *fn)
+void DocBookGenerator::generateAssociatedPropertyNotes(const FunctionNode *fn)
{
// From HtmlGenerator::generateAssociatedPropertyNotes.
if (fn->hasAssociatedProperties()) {
- writer.writeStartElement(dbNamespace, "note");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "note");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
NodeList nodes = fn->associatedProperties();
std::sort(nodes.begin(), nodes.end(), Node::nodeNameLessThan);
@@ -3459,22 +3461,21 @@ void DocBookGenerator::generateAssociatedPropertyNotes(QXmlStreamWriter &writer,
default:
break;
}
- writer.writeCharacters(msg + "for property ");
- generateSimpleLink(writer, linkForNode(pn, nullptr), pn->name());
- writer.writeCharacters(". ");
+ writer->writeCharacters(msg + "for property ");
+ generateSimpleLink(linkForNode(pn, nullptr), pn->name());
+ writer->writeCharacters(". ");
}
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // note
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // note
+ newLine();
}
}
-void DocBookGenerator::generateDetailedMember(QXmlStreamWriter &writer, const Node *node,
- const PageNode *relative)
+void DocBookGenerator::generateDetailedMember(const Node *node, const PageNode *relative)
{
// From HtmlGenerator::generateDetailedMember.
- writer.writeStartElement(dbNamespace, "section");
+ writer->writeStartElement(dbNamespace, "section");
if (node->isSharedCommentNode()) {
const auto scn = reinterpret_cast<const SharedCommentNode *>(node);
const QVector<Node *> &collective = scn->collective();
@@ -3485,21 +3486,21 @@ void DocBookGenerator::generateDetailedMember(QXmlStreamWriter &writer, const No
QString nodeRef = refForNode(n);
if (firstFunction) {
- writer.writeAttribute("xml:id", refForNode(collective.at(0)));
- newLine(writer);
- writer.writeStartElement(dbNamespace, "title");
- generateSynopsis(writer, n, relative, Section::Details);
- writer.writeEndElement(); // title
- newLine(writer);
+ writer->writeAttribute("xml:id", refForNode(collective.at(0)));
+ newLine();
+ writer->writeStartElement(dbNamespace, "title");
+ generateSynopsis(n, relative, Section::Details);
+ writer->writeEndElement(); // title
+ newLine();
firstFunction = false;
} else {
- writer.writeStartElement(dbNamespace, "bridgehead");
- writer.writeAttribute("renderas", "sect2");
- writer.writeAttribute("xml:id", nodeRef);
- generateSynopsis(writer, n, relative, Section::Details);
- writer.writeEndElement(); // bridgehead
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "bridgehead");
+ writer->writeAttribute("renderas", "sect2");
+ writer->writeAttribute("xml:id", nodeRef);
+ generateSynopsis(n, relative, Section::Details);
+ writer->writeEndElement(); // bridgehead
+ newLine();
}
}
}
@@ -3507,33 +3508,33 @@ void DocBookGenerator::generateDetailedMember(QXmlStreamWriter &writer, const No
const EnumNode *etn;
QString nodeRef = refForNode(node);
if (node->isEnumType() && (etn = static_cast<const EnumNode *>(node))->flagsType()) {
- writer.writeAttribute("xml:id", nodeRef);
- newLine(writer);
- writer.writeStartElement(dbNamespace, "title");
- generateSynopsis(writer, etn, relative, Section::Details);
- writer.writeEndElement(); // title
- newLine(writer);
- writer.writeStartElement(dbNamespace, "bridgehead");
- generateSynopsis(writer, etn->flagsType(), relative, Section::Details);
- writer.writeEndElement(); // bridgehead
- newLine(writer);
+ writer->writeAttribute("xml:id", nodeRef);
+ newLine();
+ writer->writeStartElement(dbNamespace, "title");
+ generateSynopsis(etn, relative, Section::Details);
+ writer->writeEndElement(); // title
+ newLine();
+ writer->writeStartElement(dbNamespace, "bridgehead");
+ generateSynopsis(etn->flagsType(), relative, Section::Details);
+ writer->writeEndElement(); // bridgehead
+ newLine();
} else {
- writer.writeAttribute("xml:id", nodeRef);
- newLine(writer);
- writer.writeStartElement(dbNamespace, "title");
- generateSynopsis(writer, node, relative, Section::Details);
- writer.writeEndElement(); // title
- newLine(writer);
+ writer->writeAttribute("xml:id", nodeRef);
+ newLine();
+ writer->writeStartElement(dbNamespace, "title");
+ generateSynopsis(node, relative, Section::Details);
+ writer->writeEndElement(); // title
+ newLine();
}
}
- generateDocBookSynopsis(writer, node);
+ generateDocBookSynopsis(node);
- generateStatus(writer, node);
- generateBody(writer, node);
- generateOverloadedSignal(writer, node);
- generateThreadSafeness(writer, node);
- generateSince(writer, node);
+ generateStatus(node);
+ generateBody(node);
+ generateOverloadedSignal(node);
+ generateThreadSafeness(node);
+ generateSince(node);
if (node->isProperty()) {
const auto property = static_cast<const PropertyNode *>(node);
@@ -3544,36 +3545,36 @@ void DocBookGenerator::generateDetailedMember(QXmlStreamWriter &writer, const No
section.appendMembers(property->resetters().toVector());
if (!section.members().isEmpty()) {
- writer.writeStartElement(dbNamespace, "para");
- newLine(writer);
- writer.writeTextElement(dbNamespace, "emphasis", "Access functions:");
- writer.writeAttribute("role", "bold");
- newLine(writer);
- writer.writeEndElement(); // para
- newLine(writer);
- generateSectionList(writer, section, node);
+ writer->writeStartElement(dbNamespace, "para");
+ newLine();
+ writer->writeTextElement(dbNamespace, "emphasis", "Access functions:");
+ writer->writeAttribute("role", "bold");
+ newLine();
+ writer->writeEndElement(); // para
+ newLine();
+ generateSectionList(section, node);
}
Section notifiers(Section::Accessors, Section::Active);
notifiers.appendMembers(property->notifiers().toVector());
if (!notifiers.members().isEmpty()) {
- writer.writeStartElement(dbNamespace, "para");
- newLine(writer);
- writer.writeTextElement(dbNamespace, "emphasis", "Notifier signal:");
- writer.writeAttribute("role", "bold");
- newLine(writer);
- writer.writeEndElement(); // para
- newLine(writer);
- generateSectionList(writer, notifiers, node);
+ writer->writeStartElement(dbNamespace, "para");
+ newLine();
+ writer->writeTextElement(dbNamespace, "emphasis", "Notifier signal:");
+ writer->writeAttribute("role", "bold");
+ newLine();
+ writer->writeEndElement(); // para
+ newLine();
+ generateSectionList(notifiers, node);
}
} else if (node->isFunction()) {
const auto fn = static_cast<const FunctionNode *>(node);
if (fn->isPrivateSignal())
- generatePrivateSignalNote(writer);
+ generatePrivateSignalNote();
if (fn->isInvokable())
- generateInvokableNote(writer, node);
- generateAssociatedPropertyNotes(writer, fn);
+ generateInvokableNote(node);
+ generateAssociatedPropertyNotes(fn);
} else if (node->isEnumType()) {
const auto en = static_cast<const EnumNode *>(node);
@@ -3584,21 +3585,21 @@ void DocBookGenerator::generateDetailedMember(QXmlStreamWriter &writer, const No
}
if (en->flagsType()) {
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters("The " + en->flagsType()->name() + " type is a typedef for ");
- generateSimpleLink(writer, qflagsHref_, "QFlags");
- writer.writeCharacters("&lt;" + en->name() + "&gt;. ");
- writer.writeCharacters("It stores an OR combination of " + en->name() + "values.");
- writer.writeEndElement(); // para
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters("The " + en->flagsType()->name() + " type is a typedef for ");
+ generateSimpleLink(qflagsHref_, "QFlags");
+ writer->writeCharacters("&lt;" + en->name() + "&gt;. ");
+ writer->writeCharacters("It stores an OR combination of " + en->name() + "values.");
+ writer->writeEndElement(); // para
+ newLine();
}
}
- generateAlsoList(writer, node);
- endSection(writer); // section
+ generateAlsoList(node);
+ endSection(); // section
}
-void DocBookGenerator::generateSectionList(QXmlStreamWriter &writer, const Section &section,
- const Node *relative, Section::Status status)
+void DocBookGenerator::generateSectionList(const Section &section, const Node *relative,
+ Section::Status status)
{
// From HtmlGenerator::generateSectionList, just generating a list (not tables).
const NodeVector &members =
@@ -3607,8 +3608,8 @@ void DocBookGenerator::generateSectionList(QXmlStreamWriter &writer, const Secti
bool hasPrivateSignals = false;
bool isInvokable = false;
- writer.writeStartElement(dbNamespace, "itemizedlist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "itemizedlist");
+ newLine();
int i = 0;
NodeVector::ConstIterator m = members.constBegin();
@@ -3618,12 +3619,12 @@ void DocBookGenerator::generateSectionList(QXmlStreamWriter &writer, const Secti
continue;
}
- writer.writeStartElement(dbNamespace, "listitem");
- newLine(writer);
- writer.writeStartElement(dbNamespace, "para");
+ writer->writeStartElement(dbNamespace, "listitem");
+ newLine();
+ writer->writeStartElement(dbNamespace, "para");
// prefix no more needed.
- generateSynopsis(writer, *m, relative, section.style());
+ generateSynopsis(*m, relative, section.style());
if ((*m)->isFunction()) {
const auto fn = static_cast<const FunctionNode *>(*m);
if (fn->isPrivateSignal())
@@ -3632,52 +3633,51 @@ void DocBookGenerator::generateSectionList(QXmlStreamWriter &writer, const Secti
isInvokable = true;
}
- writer.writeEndElement(); // para
- newLine(writer);
- writer.writeEndElement(); // listitem
- newLine(writer);
+ writer->writeEndElement(); // para
+ newLine();
+ writer->writeEndElement(); // listitem
+ newLine();
i++;
++m;
}
- writer.writeEndElement(); // itemizedlist
- newLine(writer);
+ writer->writeEndElement(); // itemizedlist
+ newLine();
if (hasPrivateSignals)
- generatePrivateSignalNote(writer);
+ generatePrivateSignalNote();
if (isInvokable)
- generateInvokableNote(writer, relative);
+ generateInvokableNote(relative);
}
if (status != Section::Obsolete && section.style() == Section::Summary
&& !section.inheritedMembers().isEmpty()) {
- writer.writeStartElement(dbNamespace, "itemizedlist");
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "itemizedlist");
+ newLine();
- generateSectionInheritedList(writer, section, relative);
+ generateSectionInheritedList(section, relative);
- writer.writeEndElement(); // itemizedlist
- newLine(writer);
+ writer->writeEndElement(); // itemizedlist
+ newLine();
}
}
-void DocBookGenerator::generateSectionInheritedList(QXmlStreamWriter &writer,
- const Section &section, const Node *relative)
+void DocBookGenerator::generateSectionInheritedList(const Section &section, const Node *relative)
{
// From HtmlGenerator::generateSectionInheritedList.
QVector<QPair<Aggregate *, int>>::ConstIterator p = section.inheritedMembers().constBegin();
while (p != section.inheritedMembers().constEnd()) {
- writer.writeStartElement(dbNamespace, "listitem");
- writer.writeCharacters(QString((*p).second) + " ");
+ writer->writeStartElement(dbNamespace, "listitem");
+ writer->writeCharacters(QString((*p).second) + " ");
if ((*p).second == 1)
- writer.writeCharacters(section.singular());
+ writer->writeCharacters(section.singular());
else
- writer.writeCharacters(section.plural());
- writer.writeCharacters(" inherited from ");
- generateSimpleLink(
- writer, fileName((*p).first) + '#' + Generator::cleanRef(section.title().toLower()),
- (*p).first->plainFullName(relative));
+ writer->writeCharacters(section.plural());
+ writer->writeCharacters(" inherited from ");
+ generateSimpleLink(fileName((*p).first) + '#'
+ + Generator::cleanRef(section.title().toLower()),
+ (*p).first->plainFullName(relative));
++p;
}
}
@@ -3688,23 +3688,26 @@ void DocBookGenerator::generateSectionInheritedList(QXmlStreamWriter &writer,
*/
void DocBookGenerator::generatePageNode(PageNode *pn)
{
+ Q_ASSERT(writer == nullptr);
// From HtmlGenerator::generatePageNode, remove anything related to TOCs.
- QXmlStreamWriter &writer = *startDocument(pn);
+ writer = startDocument(pn);
- generateHeader(writer, pn->fullTitle(), pn->subtitle(), pn);
- generateBody(writer, pn);
- generateAlsoList(writer, pn);
- generateFooter(writer);
+ generateHeader(pn->fullTitle(), pn->subtitle(), pn);
+ generateBody(pn);
+ generateAlsoList(pn);
+ generateFooter();
- endDocument(&writer);
+ endDocument();
}
/*!
Extract sections of markup text and output them.
*/
-bool DocBookGenerator::generateQmlText(QXmlStreamWriter &writer, const Text &text,
- const Node *relative)
+bool DocBookGenerator::generateQmlText(const Text &text, const Node *relative, CodeMarker *marker,
+ const QString &qmlName)
{
+ Q_UNUSED(marker);
+ Q_UNUSED(qmlName);
// From Generator::generateQmlText.
const Atom *atom = text.firstAtom();
bool result = false;
@@ -3717,7 +3720,7 @@ bool DocBookGenerator::generateQmlText(QXmlStreamWriter &writer, const Text &tex
else {
atom = atom->next();
while (atom && (atom->type() != Atom::EndQmlText)) {
- int n = 1 + generateAtom(writer, atom, relative);
+ int n = 1 + generateAtom(atom, relative);
while (n-- > 0)
atom = atom->next();
}
@@ -3735,7 +3738,8 @@ void DocBookGenerator::generateQmlTypePage(QmlTypeNode *qcn)
{
// From HtmlGenerator::generateQmlTypePage.
// Start producing the DocBook file.
- QXmlStreamWriter &writer = *startDocument(qcn);
+ Q_ASSERT(writer == nullptr);
+ writer = startDocument(qcn);
Generator::setQmlTypeContext(qcn);
QString title = qcn->fullTitle();
@@ -3744,37 +3748,37 @@ void DocBookGenerator::generateQmlTypePage(QmlTypeNode *qcn)
else
title += " QML Type";
- generateHeader(writer, title, qcn->subtitle(), qcn);
- generateQmlRequisites(writer, qcn);
+ generateHeader(title, qcn->subtitle(), qcn);
+ generateQmlRequisites(qcn);
- startSection(writer, registerRef("details"), "Detailed Description");
- generateBody(writer, qcn);
+ startSection(registerRef("details"), "Detailed Description");
+ generateBody(qcn);
ClassNode *cn = qcn->classNode();
if (cn)
- generateQmlText(writer, cn->doc().body(), cn);
- generateAlsoList(writer, qcn);
+ generateQmlText(cn->doc().body(), cn);
+ generateAlsoList(qcn);
- endSection(writer);
+ endSection();
Sections sections(qcn);
for (const auto &section : sections.stdQmlTypeDetailsSections()) {
if (!section.isEmpty()) {
- startSection(writer, registerRef(section.title().toLower()), section.title());
+ startSection(registerRef(section.title().toLower()), section.title());
for (const auto &member : section.members())
- generateDetailedQmlMember(writer, member, qcn);
+ generateDetailedQmlMember(member, qcn);
- endSection(writer);
+ endSection();
}
}
- generateObsoleteQmlMembers(writer, sections);
+ generateObsoleteQmlMembers(sections);
- generateFooter(writer);
+ generateFooter();
Generator::setQmlTypeContext(nullptr);
- endDocument(&writer);
+ endDocument();
}
/*!
@@ -3785,7 +3789,8 @@ void DocBookGenerator::generateQmlBasicTypePage(QmlBasicTypeNode *qbtn)
{
// From HtmlGenerator::generateQmlBasicTypePage.
// Start producing the DocBook file.
- QXmlStreamWriter &writer = *startDocument(qbtn);
+ Q_ASSERT(writer == nullptr);
+ writer = startDocument(qbtn);
QString htmlTitle = qbtn->fullTitle();
if (qbtn->isJsType())
@@ -3794,41 +3799,40 @@ void DocBookGenerator::generateQmlBasicTypePage(QmlBasicTypeNode *qbtn)
htmlTitle += " QML Basic Type";
Sections sections(qbtn);
- generateHeader(writer, htmlTitle, qbtn->subtitle(), qbtn);
+ generateHeader(htmlTitle, qbtn->subtitle(), qbtn);
- startSection(writer, registerRef("details"), "Detailed Description");
+ startSection(registerRef("details"), "Detailed Description");
- generateBody(writer, qbtn);
- generateAlsoList(writer, qbtn);
+ generateBody(qbtn);
+ generateAlsoList(qbtn);
- endSection(writer);
+ endSection();
SectionVector::ConstIterator s = sections.stdQmlTypeDetailsSections().constBegin();
while (s != sections.stdQmlTypeDetailsSections().constEnd()) {
if (!s->isEmpty()) {
- startSection(writer, registerRef(s->title().toLower()), s->title());
+ startSection(registerRef(s->title().toLower()), s->title());
NodeVector::ConstIterator m = s->members().constBegin();
while (m != s->members().constEnd()) {
- generateDetailedQmlMember(writer, *m, qbtn);
+ generateDetailedQmlMember(*m, qbtn);
++m;
}
- endSection(writer);
+ endSection();
}
++s;
}
- generateFooter(writer);
+ generateFooter();
- endDocument(&writer);
+ endDocument();
}
/*!
Outputs the DocBook detailed documentation for a section
on a QML element reference page.
*/
-void DocBookGenerator::generateDetailedQmlMember(QXmlStreamWriter &writer, Node *node,
- const Aggregate *relative)
+void DocBookGenerator::generateDetailedQmlMember(Node *node, const Aggregate *relative)
{
// From HtmlGenerator::generateDetailedQmlMember, with elements from
// CppCodeMarker::markedUpQmlItem and HtmlGenerator::generateQmlItem.
@@ -3850,10 +3854,9 @@ void DocBookGenerator::generateDetailedQmlMember(QXmlStreamWriter &writer, Node
return title;
};
- std::function<void(QXmlStreamWriter &, Node *)> generateQmlMethodTitle =
- [&](QXmlStreamWriter &w, Node *n) {
- generateSynopsis(w, n, relative, Section::Details);
- };
+ std::function<void(Node *)> generateQmlMethodTitle = [&](Node *node) {
+ generateSynopsis(node, relative, Section::Details);
+ };
bool generateEndSection = true;
@@ -3865,7 +3868,7 @@ void DocBookGenerator::generateDetailedQmlMember(QXmlStreamWriter &writer, Node
heading = scn->name() + " group";
else
heading = node->name();
- startSection(writer, refForNode(scn), heading);
+ startSection(refForNode(scn), heading);
// This last call creates a title for this section. In other words,
// titles are forbidden for the rest of the section.
@@ -3874,20 +3877,20 @@ void DocBookGenerator::generateDetailedQmlMember(QXmlStreamWriter &writer, Node
if (node->isQmlProperty() || node->isJsProperty()) {
auto *qpn = static_cast<QmlPropertyNode *>(node);
- writer.writeStartElement(dbNamespace, "bridgehead");
- writer.writeAttribute("renderas", "sect2");
- writer.writeAttribute("xml:id", refForNode(qpn));
- writer.writeCharacters(getQmlPropertyTitle(qpn));
- writer.writeEndElement(); // bridgehead
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "bridgehead");
+ writer->writeAttribute("renderas", "sect2");
+ writer->writeAttribute("xml:id", refForNode(qpn));
+ writer->writeCharacters(getQmlPropertyTitle(qpn));
+ writer->writeEndElement(); // bridgehead
+ newLine();
- generateDocBookSynopsis(writer, qpn);
+ generateDocBookSynopsis(qpn);
}
}
} else if (node->isQmlProperty() || node->isJsProperty()) {
auto qpn = static_cast<QmlPropertyNode *>(node);
- startSection(writer, refForNode(qpn), getQmlPropertyTitle(qpn));
- generateDocBookSynopsis(writer, qpn);
+ startSection(refForNode(qpn), getQmlPropertyTitle(qpn));
+ generateDocBookSynopsis(qpn);
} else if (node->isSharedCommentNode()) {
const auto scn = reinterpret_cast<const SharedCommentNode *>(node);
const QVector<Node *> &sharedNodes = scn->collective();
@@ -3904,44 +3907,44 @@ void DocBookGenerator::generateDetailedQmlMember(QXmlStreamWriter &writer, Node
// Complete the section tag.
if (i == 0) {
- writer.writeStartElement(dbNamespace, "section");
- writer.writeAttribute("xml:id", refForNode(m));
- newLine(writer);
+ writer->writeStartElement(dbNamespace, "section");
+ writer->writeAttribute("xml:id", refForNode(m));
+ newLine();
}
// Write the tag containing the title.
- writer.writeStartElement(dbNamespace, (i == 0) ? "title" : "bridgehead");
+ writer->writeStartElement(dbNamespace, (i == 0) ? "title" : "bridgehead");
if (i > 0)
- writer.writeAttribute("renderas", "sect2");
+ writer->writeAttribute("renderas", "sect2");
// Write the title.
QString title;
if (node->isFunction(Node::QML) || node->isFunction(Node::JS))
- generateQmlMethodTitle(writer, node);
+ generateQmlMethodTitle(node);
else if (node->isQmlProperty() || node->isJsProperty())
- writer.writeCharacters(getQmlPropertyTitle(static_cast<QmlPropertyNode *>(node)));
+ writer->writeCharacters(getQmlPropertyTitle(static_cast<QmlPropertyNode *>(node)));
// Complete the title and the synopsis.
- generateDocBookSynopsis(writer, m);
+ generateDocBookSynopsis(m);
++i;
}
if (i == 0)
generateEndSection = false;
} else { // assume the node is a method/signal handler
- startSectionBegin(writer, refForNode(node));
- generateQmlMethodTitle(writer, node);
- startSectionEnd(writer);
+ startSectionBegin(refForNode(node));
+ generateQmlMethodTitle(node);
+ startSectionEnd();
}
- generateStatus(writer, node);
- generateBody(writer, node);
- generateThreadSafeness(writer, node);
- generateSince(writer, node);
- generateAlsoList(writer, node);
+ generateStatus(node);
+ generateBody(node);
+ generateThreadSafeness(node);
+ generateSince(node);
+ generateAlsoList(node);
if (generateEndSection)
- endSection(writer);
+ endSection();
}
/*!
@@ -4027,22 +4030,23 @@ void DocBookGenerator::generateProxyPage(Aggregate *aggregate)
Q_ASSERT(aggregate->isProxyNode());
// Start producing the DocBook file.
- QXmlStreamWriter &writer = *startDocument(aggregate);
+ Q_ASSERT(writer == nullptr);
+ writer = startDocument(aggregate);
// Info container.
- generateHeader(writer, aggregate->plainFullName(), "", aggregate);
+ generateHeader(aggregate->plainFullName(), "", aggregate);
// No element synopsis.
// Actual content.
if (!aggregate->doc().isEmpty()) {
- startSection(writer, registerRef("details"), "Detailed Description");
+ startSection(registerRef("details"), "Detailed Description");
- generateBody(writer, aggregate);
- generateAlsoList(writer, aggregate);
- generateMaintainerList(writer, aggregate);
+ generateBody(aggregate);
+ generateAlsoList(aggregate);
+ generateMaintainerList(aggregate);
- endSection(writer);
+ endSection();
}
Sections sections(aggregate);
@@ -4052,29 +4056,29 @@ void DocBookGenerator::generateProxyPage(Aggregate *aggregate)
if (section.isEmpty())
continue;
- startSection(writer, section.title().toLower(), section.title());
+ startSection(section.title().toLower(), section.title());
const QVector<Node *> &members = section.members();
for (const auto &member : members) {
if (!member->isPrivate()) { // ### check necessary?
if (!member->isClassNode()) {
- generateDetailedMember(writer, member, aggregate);
+ generateDetailedMember(member, aggregate);
} else {
- startSectionBegin(writer);
- generateFullName(writer, member, aggregate);
- startSectionEnd(writer);
- generateBrief(writer, member);
- endSection(writer);
+ startSectionBegin();
+ generateFullName(member, aggregate);
+ startSectionEnd();
+ generateBrief(member);
+ endSection();
}
}
}
- endSection(writer);
+ endSection();
}
- generateFooter(writer);
+ generateFooter();
- endDocument(&writer);
+ endDocument();
}
/*!
@@ -4084,34 +4088,35 @@ void DocBookGenerator::generateCollectionNode(CollectionNode *cn)
{
// Adapted from HtmlGenerator::generateCollectionNode.
// Start producing the DocBook file.
- QXmlStreamWriter &writer = *startDocument(cn);
+ Q_ASSERT(writer == nullptr);
+ writer = startDocument(cn);
// Info container.
- generateHeader(writer, cn->fullTitle(), cn->subtitle(), cn);
+ generateHeader(cn->fullTitle(), cn->subtitle(), cn);
// Element synopsis.
- generateDocBookSynopsis(writer, cn);
+ generateDocBookSynopsis(cn);
// Actual content.
if (cn->isModule()) {
// Generate brief text and status for modules.
- generateBrief(writer, cn);
- generateStatus(writer, cn);
- generateSince(writer, cn);
+ generateBrief(cn);
+ generateStatus(cn);
+ generateSince(cn);
NodeMultiMap nmm;
cn->getMemberNamespaces(nmm);
if (!nmm.isEmpty()) {
- startSection(writer, registerRef("namespaces"), "Namespaces");
- generateAnnotatedList(writer, cn, nmm, "namespaces");
- endSection(writer);
+ startSection(registerRef("namespaces"), "Namespaces");
+ generateAnnotatedList(cn, nmm, "namespaces");
+ endSection();
}
nmm.clear();
cn->getMemberClasses(nmm);
if (!nmm.isEmpty()) {
- startSection(writer, registerRef("classes"), "Classes");
- generateAnnotatedList(writer, cn, nmm, "classes");
- endSection(writer);
+ startSection(registerRef("classes"), "Classes");
+ generateAnnotatedList(cn, nmm, "classes");
+ endSection();
}
nmm.clear();
}
@@ -4119,24 +4124,24 @@ void DocBookGenerator::generateCollectionNode(CollectionNode *cn)
Text brief = cn->doc().briefText();
bool generatedTitle = false;
if (cn->isModule() && !brief.isEmpty()) {
- startSection(writer, registerRef("details"), "Detailed Description");
+ startSection(registerRef("details"), "Detailed Description");
generatedTitle = true;
} else {
- writeAnchor(writer, registerRef("details"));
+ writeAnchor(registerRef("details"));
}
- generateBody(writer, cn);
- generateAlsoList(writer, cn);
+ generateBody(cn);
+ generateAlsoList(cn);
if (!cn->noAutoList() && (cn->isGroup() || cn->isQmlModule() || cn->isJsModule()))
- generateAnnotatedList(writer, cn, cn->members(), "members");
+ generateAnnotatedList(cn, cn->members(), "members");
if (generatedTitle)
- endSection(writer);
+ endSection();
- generateFooter(writer);
+ generateFooter();
- endDocument(&writer);
+ endDocument();
}
/*!
@@ -4150,58 +4155,57 @@ void DocBookGenerator::generateGenericCollectionPage(CollectionNode *cn)
// TODO: factor out this code to generate a file name.
QString name = cn->name().toLower();
name.replace(QChar(' '), QString("-"));
- QString filename =
- cn->tree()->physicalModuleName() + "-" + name + "." + fileExtension();
+ QString filename = cn->tree()->physicalModuleName() + "-" + name + "." + fileExtension();
// Start producing the DocBook file.
- QXmlStreamWriter &writer = *startGenericDocument(cn, filename);
+ Q_ASSERT(writer == nullptr);
+ writer = startGenericDocument(cn, filename);
// Info container.
- generateHeader(writer, cn->fullTitle(), cn->subtitle(), cn);
+ generateHeader(cn->fullTitle(), cn->subtitle(), cn);
// Element synopsis.
- generateDocBookSynopsis(writer, cn);
+ generateDocBookSynopsis(cn);
// Actual content.
- writer.writeStartElement(dbNamespace, "para");
- writer.writeCharacters("Each function or type documented here is related to a class or "
+ writer->writeStartElement(dbNamespace, "para");
+ writer->writeCharacters("Each function or type documented here is related to a class or "
"namespace that is documented in a different module. The reference "
"page for that class or namespace will link to the function or type "
"on this page.");
- writer.writeEndElement(); // para
+ writer->writeEndElement(); // para
const CollectionNode *cnc = cn;
const QList<Node *> members = cn->members();
for (const auto &member : members)
- generateDetailedMember(writer, member, cnc);
+ generateDetailedMember(member, cnc);
- generateFooter(writer);
+ generateFooter();
- endDocument(&writer);
+ endDocument();
}
-void DocBookGenerator::generateFullName(QXmlStreamWriter &writer, const Node *node,
- const Node *relative)
+void DocBookGenerator::generateFullName(const Node *node, const Node *relative)
{
// From Generator::appendFullName.
- writer.writeStartElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "href", fullDocumentLocation(node));
- writer.writeAttribute(xlinkNamespace, "role", targetType(node));
- writer.writeCharacters(node->fullName(relative));
- writer.writeEndElement(); // link
+ writer->writeStartElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "href", fullDocumentLocation(node));
+ writer->writeAttribute(xlinkNamespace, "role", targetType(node));
+ writer->writeCharacters(node->fullName(relative));
+ writer->writeEndElement(); // link
}
-void DocBookGenerator::generateFullName(QXmlStreamWriter &writer, const Node *apparentNode,
- const QString &fullName, const Node *actualNode)
+void DocBookGenerator::generateFullName(const Node *apparentNode, const QString &fullName,
+ const Node *actualNode)
{
// From Generator::appendFullName.
if (actualNode == nullptr)
actualNode = apparentNode;
- writer.writeStartElement(dbNamespace, "link");
- writer.writeAttribute(xlinkNamespace, "href", fullDocumentLocation(actualNode));
- writer.writeAttribute("type", targetType(actualNode));
- writer.writeCharacters(fullName);
- writer.writeEndElement(); // link
+ writer->writeStartElement(dbNamespace, "link");
+ writer->writeAttribute(xlinkNamespace, "href", fullDocumentLocation(actualNode));
+ writer->writeAttribute("type", targetType(actualNode));
+ writer->writeCharacters(fullName);
+ writer->writeEndElement(); // link
}
QT_END_NAMESPACE
diff --git a/src/qdoc/docbookgenerator.h b/src/qdoc/docbookgenerator.h
index 0c74a1708..ad5b36220 100644
--- a/src/qdoc/docbookgenerator.h
+++ b/src/qdoc/docbookgenerator.h
@@ -33,16 +33,14 @@
#ifndef DOCBOOKGENERATOR_H
#define DOCBOOKGENERATOR_H
-#include <qhash.h>
-#include <qregexp.h>
-#include <qxmlstream.h>
#include "codemarker.h"
+#include "config.h"
#include "xmlgenerator.h"
+#include <QtCore/qhash.h>
+#include <QtCore/qregexp.h>
#include <QtCore/qxmlstream.h>
-#include "codemarker.h"
-
QT_BEGIN_NAMESPACE
class DocBookGenerator : public XmlGenerator
@@ -71,96 +69,96 @@ protected:
using Generator::generateProxyPage;
void generateProxyPage(Aggregate *aggregate);
- void generateList(QXmlStreamWriter &writer, const Node *relative, const QString &selector);
- void generateHeader(QXmlStreamWriter &writer, const QString &title, const QString &subtitle,
- const Node *node);
- void closeTextSections(QXmlStreamWriter &writer);
- void generateFooter(QXmlStreamWriter &writer);
- void generateDocBookSynopsis(QXmlStreamWriter &writer, const Node *node);
- void generateRequisites(QXmlStreamWriter &writer, const Aggregate *inner);
- void generateQmlRequisites(QXmlStreamWriter &writer, const QmlTypeNode *qcn);
- void generateSortedNames(QXmlStreamWriter &writer, const ClassNode *cn,
- const QVector<RelatedClass> &rc);
- void generateSortedQmlNames(QXmlStreamWriter &writer, const Node *base, const NodeList &subs);
- bool generateStatus(QXmlStreamWriter &writer, const Node *node);
- bool generateThreadSafeness(QXmlStreamWriter &writer, const Node *node);
- bool generateSince(QXmlStreamWriter &writer, const Node *node);
+ void generateList(const Node *relative, const QString &selector);
+ void generateHeader(const QString &title, const QString &subtitle, const Node *node);
+ void closeTextSections();
+ void generateFooter();
+ void generateDocBookSynopsis(const Node *node);
+ void generateRequisites(const Aggregate *inner);
+ void generateQmlRequisites(const QmlTypeNode *qcn);
+ void generateSortedNames(const ClassNode *cn, const QVector<RelatedClass> &rc);
+ void generateSortedQmlNames(const Node *base, const NodeList &subs);
+ bool generateStatus(const Node *node);
+ bool generateThreadSafeness(const Node *node);
+ bool generateSince(const Node *node);
using Generator::generateBody;
- void generateBody(QXmlStreamWriter &writer, const Node *node);
+ void generateBody(const Node *node);
- using Generator::generateText;
- bool generateText(QXmlStreamWriter &writer, const Text &text, const Node *relative);
- const Atom *generateAtomList(QXmlStreamWriter &writer, const Atom *atom, const Node *relative,
- bool generate, int &numAtoms);
- using Generator::generateAtom;
- int generateAtom(QXmlStreamWriter &writer, const Atom *atom, const Node *relative);
+ bool generateText(const Text &text, const Node *relative,
+ CodeMarker *marker = nullptr) override;
+ const Atom *generateAtomList(const Atom *atom, const Node *relative, bool generate,
+ int &numAtoms);
+ int generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker = nullptr) override;
private:
QXmlStreamWriter *startDocument(const Node *node);
QXmlStreamWriter *startDocument(const ExampleNode *en, const QString &file);
QXmlStreamWriter *startGenericDocument(const Node *node, const QString &fileName);
- static void endDocument(QXmlStreamWriter *writer);
-
- void generateAnnotatedList(QXmlStreamWriter &writer, const Node *relative,
- const NodeList &nodeList, const QString &selector);
- void generateAnnotatedList(QXmlStreamWriter &writer, const Node *relative,
- const NodeMultiMap &nmm, const QString &selector);
- void generateAnnotatedLists(QXmlStreamWriter &writer, const Node *relative,
- const NodeMultiMap &nmm, const QString &selector);
- void generateCompactList(QXmlStreamWriter &writer, ListType listType, const Node *relative,
- const NodeMultiMap &nmm, const QString &commonPrefix,
- const QString &selector);
+ void endDocument();
+
+ void generateAnnotatedList(const Node *relative, const NodeList &nodeList,
+ const QString &selector);
+ void generateAnnotatedList(const Node *relative, const NodeMultiMap &nmm,
+ const QString &selector);
+ void generateAnnotatedLists(const Node *relative, const NodeMultiMap &nmm,
+ const QString &selector);
+ void generateCompactList(ListType listType, const Node *relative, const NodeMultiMap &nmm,
+ const QString &commonPrefix, const QString &selector);
using Generator::generateFileList;
- void generateFileList(QXmlStreamWriter &writer, const ExampleNode *en, bool images);
- void generateObsoleteMembers(QXmlStreamWriter &writer, const Sections &sections);
- void generateObsoleteQmlMembers(QXmlStreamWriter &writer, const Sections &sections);
- void generateSectionList(QXmlStreamWriter &writer, const Section &section, const Node *relative,
+ void generateFileList(const ExampleNode *en, bool images);
+ void generateObsoleteMembers(const Sections &sections);
+ void generateObsoleteQmlMembers(const Sections &sections);
+ void generateSectionList(const Section &section, const Node *relative,
Section::Status status = Section::Active);
- void generateSectionInheritedList(QXmlStreamWriter &writer, const Section &section,
- const Node *relative);
- void generateSynopsisName(QXmlStreamWriter &writer, const Node *node, const Node *relative,
- bool generateNameLink);
- void generateParameter(QXmlStreamWriter &writer, const Parameter &parameter,
- const Node *relative, bool generateExtra, bool generateType);
- void generateSynopsis(QXmlStreamWriter &writer, const Node *node, const Node *relative,
- Section::Style style);
- void generateEnumValue(QXmlStreamWriter &writer, const QString &enumValue,
- const Node *relative);
- void generateDetailedMember(QXmlStreamWriter &writer, const Node *node,
- const PageNode *relative);
- void generateDetailedQmlMember(QXmlStreamWriter &writer, Node *node, const Aggregate *relative);
-
- void generateFullName(QXmlStreamWriter &writer, const Node *node, const Node *relative);
- void generateFullName(QXmlStreamWriter &writer, const Node *apparentNode,
- const QString &fullName, const Node *actualNode);
- void generateBrief(QXmlStreamWriter &writer, const Node *node);
- using Generator::generateAlsoList;
- void generateAlsoList(QXmlStreamWriter &writer, const Node *node);
- static void generateSignatureList(QXmlStreamWriter &writer, const NodeList &nodes);
- using Generator::generateMaintainerList;
- void generateMaintainerList(QXmlStreamWriter &writer, const Aggregate *node);
- void generateReimplementsClause(QXmlStreamWriter &writer, const FunctionNode *fn);
- void generateClassHierarchy(QXmlStreamWriter &writer, const Node *relative, NodeMap &classMap);
- void generateFunctionIndex(QXmlStreamWriter &writer, const Node *relative);
- void generateLegaleseList(QXmlStreamWriter &writer, const Node *relative);
- using Generator::generateExampleFilePage;
- void generateExampleFilePage(const Node *en, const QString &file);
- static void generateOverloadedSignal(QXmlStreamWriter &writer, const Node *node);
- static void generatePrivateSignalNote(QXmlStreamWriter &writer);
- static void generateInvokableNote(QXmlStreamWriter &writer, const Node *node);
- void generateAssociatedPropertyNotes(QXmlStreamWriter &writer, const FunctionNode *fn);
- using Generator::generateQmlText;
- bool generateQmlText(QXmlStreamWriter &writer, const Text &text, const Node *relative);
- void generateRequiredLinks(QXmlStreamWriter &writer, const Node *node);
- void generateLinkToExample(QXmlStreamWriter &writer, const ExampleNode *en,
- const QString &baseUrl);
-
- void typified(QXmlStreamWriter &writer, const QString &string, const Node *relative,
- bool trailingSpace = false, bool generateType = true);
- void generateLink(QXmlStreamWriter &writer, const Atom *atom);
- void beginLink(QXmlStreamWriter &writer, const QString &link, const Node *node,
- const Node *relative);
- void endLink(QXmlStreamWriter &writer);
+ void generateSectionInheritedList(const Section &section, const Node *relative);
+ void generateSynopsisName(const Node *node, const Node *relative, bool generateNameLink);
+ void generateParameter(const Parameter &parameter, const Node *relative, bool generateExtra,
+ bool generateType);
+ void generateSynopsis(const Node *node, const Node *relative, Section::Style style);
+ void generateEnumValue(const QString &enumValue, const Node *relative);
+ void generateDetailedMember(const Node *node, const PageNode *relative);
+ void generateDetailedQmlMember(Node *node, const Aggregate *relative);
+
+ void generateFullName(const Node *node, const Node *relative);
+ void generateFullName(const Node *apparentNode, const QString &fullName,
+ const Node *actualNode);
+ void generateBrief(const Node *node);
+ void generateAlsoList(const Node *node, CodeMarker *marker = nullptr) override;
+ void generateSignatureList(const NodeList &nodes);
+ void generateMaintainerList(const Aggregate *node, CodeMarker *marker = nullptr) override;
+ void generateReimplementsClause(const FunctionNode *fn);
+ void generateClassHierarchy(const Node *relative, NodeMap &classMap);
+ void generateFunctionIndex(const Node *relative);
+ void generateLegaleseList(const Node *relative);
+ 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);
+ void generateLinkToExample(const ExampleNode *en, const QString &baseUrl);
+
+ void typified(const QString &string, const Node *relative, bool trailingSpace = false,
+ bool generateType = true);
+ void generateLink(const Atom *atom);
+ void beginLink(const QString &link, const Node *node, const Node *relative);
+ void endLink();
+ inline void newLine();
+ void startSectionBegin();
+ void startSectionBegin(const QString &id);
+ void startSectionEnd();
+ void startSection(const QString &id, const QString &title);
+ void endSection();
+ void writeAnchor(const QString &id);
+ void generateSimpleLink(const QString &href, const QString &text);
+ void generateStartRequisite(const QString &description);
+ void generateEndRequisite();
+ void generateRequisite(const QString &description, const QString &value);
+ void generateSynopsisInfo(const QString &key, const QString &value);
+ void generateModifier(const QString &value);
bool inListItemLineOpen {};
bool inLink {};
@@ -172,6 +170,9 @@ private:
QString projectDescription;
QString naturalLanguage;
QString buildversion;
+ QXmlStreamWriter *writer = nullptr;
+
+ Config *config;
};
QT_END_NAMESPACE
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index fa442994e..f886ef56c 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -394,7 +394,8 @@ QString Generator::fileBase(const Node *node) const
to the file name. The suffix, if one exists, is appended to the
module name.
*/
- if (!node->logicalModuleName().isEmpty() && (!node->logicalModule()->isInternal() || showInternal_))
+ if (!node->logicalModuleName().isEmpty()
+ && (!node->logicalModule()->isInternal() || showInternal_))
base.prepend(node->logicalModuleName() + outputSuffix(node) + QLatin1Char('-'));
base.prepend(outputPrefix(node));
@@ -961,8 +962,10 @@ void Generator::generateLinkToExample(const ExampleNode *en, CodeMarker *marker,
}
// Construct a path to the example; <install path>/<example name>
- QStringList path = QStringList()
- << Config::instance().getString(CONFIG_EXAMPLESINSTALLPATH) << en->name();
+ QString pathRoot = en->doc().metaTagMap().value(QLatin1String("installpath"));
+ if (pathRoot.isEmpty())
+ pathRoot = Config::instance().getString(CONFIG_EXAMPLESINSTALLPATH);
+ QStringList path = QStringList() << pathRoot << en->name();
path.removeAll({});
Text text;
@@ -1261,8 +1264,9 @@ void Generator::generateReimplementsClause(const FunctionNode *fn, CodeMarker *m
text << "." << Atom::ParaRight;
generateText(text, fn, marker);
} else {
- fn->doc().location().warning(tr("Illegal \\reimp; no documented virtual function for %1")
- .arg(overrides->plainSignature()));
+ fn->doc().location().warning(
+ tr("Illegal \\reimp; no documented virtual function for %1")
+ .arg(overrides->plainSignature()));
}
return;
}
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
index 70def56bf..8bd009f5f 100644
--- a/src/qdoc/htmlgenerator.cpp
+++ b/src/qdoc/htmlgenerator.cpp
@@ -128,8 +128,8 @@ void HtmlGenerator::initializeGenerator()
{ nullptr, nullptr, nullptr } };
Generator::initializeGenerator();
- Config &config = Config::instance();
- obsoleteLinks = config.getBool(CONFIG_OBSOLETELINKS);
+ config = &Config::instance();
+ obsoleteLinks = config->getBool(CONFIG_OBSOLETELINKS);
setImageFileExtensions(QStringList() << "png"
<< "jpg"
<< "jpeg"
@@ -147,49 +147,50 @@ void HtmlGenerator::initializeGenerator()
i++;
}
- style = config.getString(HtmlGenerator::format() + Config::dot + CONFIG_STYLE);
- endHeader = config.getString(HtmlGenerator::format() + Config::dot + CONFIG_ENDHEADER);
- postHeader = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_POSTHEADER);
+ style = config->getString(HtmlGenerator::format() + Config::dot + CONFIG_STYLE);
+ endHeader = config->getString(HtmlGenerator::format() + Config::dot + CONFIG_ENDHEADER);
+ postHeader =
+ config->getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_POSTHEADER);
postPostHeader =
- config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_POSTPOSTHEADER);
- prologue = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_PROLOGUE);
+ config->getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_POSTPOSTHEADER);
+ prologue = config->getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_PROLOGUE);
- footer = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_FOOTER);
- address = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_ADDRESS);
+ footer = config->getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_FOOTER);
+ address = config->getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_ADDRESS);
pleaseGenerateMacRef =
- config.getBool(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_GENERATEMACREFS);
+ config->getBool(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_GENERATEMACREFS);
noNavigationBar =
- config.getBool(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_NONAVIGATIONBAR);
- navigationSeparator = config.getString(HtmlGenerator::format() + Config::dot
- + HTMLGENERATOR_NAVIGATIONSEPARATOR);
- tocDepth = config.getInt(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_TOCDEPTH);
+ config->getBool(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_NONAVIGATIONBAR);
+ navigationSeparator = config->getString(HtmlGenerator::format() + Config::dot
+ + HTMLGENERATOR_NAVIGATIONSEPARATOR);
+ tocDepth = config->getInt(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_TOCDEPTH);
- project = config.getString(CONFIG_PROJECT);
+ project = config->getString(CONFIG_PROJECT);
- projectDescription = config.getString(CONFIG_DESCRIPTION);
+ projectDescription = config->getString(CONFIG_DESCRIPTION);
if (projectDescription.isEmpty() && !project.isEmpty())
projectDescription = project + QLatin1String(" Reference Documentation");
- projectUrl = config.getString(CONFIG_URL);
- tagFile_ = config.getString(CONFIG_TAGFILE);
+ projectUrl = config->getString(CONFIG_URL);
+ tagFile_ = config->getString(CONFIG_TAGFILE);
#ifndef QT_NO_TEXTCODEC
- outputEncoding = config.getString(CONFIG_OUTPUTENCODING);
+ outputEncoding = config->getString(CONFIG_OUTPUTENCODING);
if (outputEncoding.isEmpty())
outputEncoding = QLatin1String("UTF-8");
outputCodec = QTextCodec::codecForName(outputEncoding.toLocal8Bit());
#endif
- naturalLanguage = config.getString(CONFIG_NATURALLANGUAGE);
+ naturalLanguage = config->getString(CONFIG_NATURALLANGUAGE);
if (naturalLanguage.isEmpty())
naturalLanguage = QLatin1String("en");
- const QSet<QString> editionNames = config.subVars(CONFIG_EDITION);
+ const QSet<QString> editionNames = config->subVars(CONFIG_EDITION);
for (const auto &editionName : editionNames) {
- QStringList editionModules = config.getStringList(CONFIG_EDITION + Config::dot + editionName
- + Config::dot + "modules");
- QStringList editionGroups = config.getStringList(CONFIG_EDITION + Config::dot + editionName
- + Config::dot + "groups");
+ QStringList editionModules = config->getStringList(CONFIG_EDITION + Config::dot
+ + editionName + Config::dot + "modules");
+ QStringList editionGroups = config->getStringList(CONFIG_EDITION + Config::dot + editionName
+ + Config::dot + "groups");
if (!editionModules.isEmpty())
editionModuleMap[editionName] = editionModules;
@@ -197,9 +198,9 @@ void HtmlGenerator::initializeGenerator()
editionGroupMap[editionName] = editionGroups;
}
- codeIndent = config.getInt(CONFIG_CODEINDENT); // QTBUG-27798
- codePrefix = config.getString(CONFIG_CODEPREFIX);
- codeSuffix = config.getString(CONFIG_CODESUFFIX);
+ codeIndent = config->getInt(CONFIG_CODEINDENT); // QTBUG-27798
+ codePrefix = config->getString(CONFIG_CODEPREFIX);
+ codeSuffix = config->getString(CONFIG_CODESUFFIX);
/*
The help file write should be allocated once and only once
@@ -211,40 +212,40 @@ void HtmlGenerator::initializeGenerator()
helpProjectWriter = new HelpProjectWriter(project.toLower() + ".qhp", this);
// Documentation template handling
- headerScripts = config.getString(HtmlGenerator::format() + Config::dot + CONFIG_HEADERSCRIPTS);
- headerStyles = config.getString(HtmlGenerator::format() + Config::dot + CONFIG_HEADERSTYLES);
+ headerScripts = config->getString(HtmlGenerator::format() + Config::dot + CONFIG_HEADERSCRIPTS);
+ headerStyles = config->getString(HtmlGenerator::format() + Config::dot + CONFIG_HEADERSTYLES);
QString prefix = CONFIG_QHP + Config::dot + project + Config::dot;
manifestDir =
- QLatin1String("qthelp://") + config.getString(prefix + QLatin1String("namespace"));
- manifestDir += QLatin1Char('/') + config.getString(prefix + QLatin1String("virtualFolder"))
+ QLatin1String("qthelp://") + config->getString(prefix + QLatin1String("namespace"));
+ manifestDir += QLatin1Char('/') + config->getString(prefix + QLatin1String("virtualFolder"))
+ QLatin1Char('/');
readManifestMetaContent();
- examplesPath = config.getString(CONFIG_EXAMPLESINSTALLPATH);
+ examplesPath = config->getString(CONFIG_EXAMPLESINSTALLPATH);
if (!examplesPath.isEmpty())
examplesPath += QLatin1Char('/');
// Retrieve the config for the navigation bar
- homepage = config.getString(CONFIG_NAVIGATION + Config::dot + CONFIG_HOMEPAGE);
+ homepage = config->getString(CONFIG_NAVIGATION + Config::dot + CONFIG_HOMEPAGE);
- hometitle = config.getString(CONFIG_NAVIGATION + Config::dot + CONFIG_HOMETITLE, homepage);
+ hometitle = config->getString(CONFIG_NAVIGATION + Config::dot + CONFIG_HOMETITLE, homepage);
- landingpage = config.getString(CONFIG_NAVIGATION + Config::dot + CONFIG_LANDINGPAGE);
+ landingpage = config->getString(CONFIG_NAVIGATION + Config::dot + CONFIG_LANDINGPAGE);
landingtitle =
- config.getString(CONFIG_NAVIGATION + Config::dot + CONFIG_LANDINGTITLE, landingpage);
+ config->getString(CONFIG_NAVIGATION + Config::dot + CONFIG_LANDINGTITLE, landingpage);
- cppclassespage = config.getString(CONFIG_NAVIGATION + Config::dot + CONFIG_CPPCLASSESPAGE);
+ cppclassespage = config->getString(CONFIG_NAVIGATION + Config::dot + CONFIG_CPPCLASSESPAGE);
- cppclassestitle = config.getString(CONFIG_NAVIGATION + Config::dot + CONFIG_CPPCLASSESTITLE,
- QLatin1String("C++ Classes"));
+ cppclassestitle = config->getString(CONFIG_NAVIGATION + Config::dot + CONFIG_CPPCLASSESTITLE,
+ QLatin1String("C++ Classes"));
- qmltypespage = config.getString(CONFIG_NAVIGATION + Config::dot + CONFIG_QMLTYPESPAGE);
+ qmltypespage = config->getString(CONFIG_NAVIGATION + Config::dot + CONFIG_QMLTYPESPAGE);
- qmltypestitle = config.getString(CONFIG_NAVIGATION + Config::dot + CONFIG_QMLTYPESTITLE,
- QLatin1String("QML Types"));
+ qmltypestitle = config->getString(CONFIG_NAVIGATION + Config::dot + CONFIG_QMLTYPESTITLE,
+ QLatin1String("QML Types"));
- buildversion = config.getString(CONFIG_BUILDVERSION);
+ buildversion = config->getString(CONFIG_BUILDVERSION);
}
/*!
@@ -2138,7 +2139,7 @@ void HtmlGenerator::generateQmlRequisites(QmlTypeNode *qcn, CodeMarker *marker)
// skip import statement of \internal collections
if (!collection || !collection->isInternal() || showInternal_) {
logicalModuleVersion =
- collection ? collection->logicalModuleVersion() : qcn->logicalModuleVersion();
+ collection ? collection->logicalModuleVersion() : qcn->logicalModuleVersion();
if (logicalModuleVersion.isEmpty() || qcn->logicalModuleName().isEmpty())
qcn->doc().location().warning(tr("Could not resolve QML import "
@@ -2916,8 +2917,7 @@ void HtmlGenerator::generateQmlItem(const Node *node, const Node *relative, Code
// Look for the _ character in the member name followed by a number (or n):
// this is intended to be rendered as a subscript.
- marked.replace(QRegExp("<@param>([a-z]+)_([0-9]+|n)</@param>"),
- "<i>\\1<sub>\\2</sub></i>");
+ marked.replace(QRegExp("<@param>([a-z]+)_([0-9]+|n)</@param>"), "<i>\\1<sub>\\2</sub></i>");
// Replace some markup by HTML tags. Do both the opening and the closing tag
// in one go (instead of <@param> and </@param> separately, for instance).
@@ -3635,7 +3635,7 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node, const Aggregate *relat
"<div class=\"table\"><table class=\"qmlname\">\n");
QString qmlItemStart("<tr valign=\"top\" class=\"odd\" id=\"%1\">\n"
- "<td class=\"%2\"><p>\n");
+ "<td class=\"%2\"><p>\n<a name=\"%1\"></a>");
QString qmlItemEnd("</p></td></tr>\n");
QString qmlItemFooter("</table></div></div>\n");
@@ -3666,8 +3666,10 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node, const Aggregate *relat
const SharedCommentNode *scn = static_cast<const SharedCommentNode *>(node);
out() << qmlItemHeader;
if (!scn->name().isEmpty()) {
- out() << "<tr valign=\"top\" class=\"even\" id=\"" << refForNode(scn) << "\">";
+ const QString nodeRef = refForNode(scn);
+ out() << "<tr valign=\"top\" class=\"even\" id=\"" << nodeRef << "\">";
out() << "<th class=\"centerAlign\"><p>";
+ out() << "<a name=\"" + nodeRef + "\"></a>";
out() << "<b>" << scn->name() << " group</b>";
out() << "</p></th></tr>\n";
}
@@ -3900,6 +3902,14 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
} else if (en->name().startsWith("demos")) {
continue;
}
+
+ // Retrieve the install path specified with \meta command,
+ // or fall back to the one defined in .qdocconf
+ QString installPath = en->doc().metaTagMap().value(QLatin1String("installpath"));
+ if (installPath.isEmpty())
+ installPath = examplesPath;
+ if (!installPath.isEmpty() && !installPath.endsWith(QLatin1Char('/')))
+ installPath += QLatin1Char('/');
// attributes that are always written for the element
usedAttributes.clear();
usedAttributes << "name"
@@ -3919,7 +3929,7 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
}
if (!proFiles.isEmpty()) {
if (proFiles.size() == 1) {
- writer.writeAttribute("projectPath", examplesPath + proFiles[0]);
+ writer.writeAttribute("projectPath", installPath + proFiles[0]);
} else {
QString exampleName = en->name().split('/').last();
bool proWithExampleNameFound = false;
@@ -3928,13 +3938,13 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
|| proFiles[j].endsWith(QStringLiteral("%1/%1.qmlproject").arg(exampleName))
|| proFiles[j].endsWith(
QStringLiteral("%1/%1.pyproject").arg(exampleName))) {
- writer.writeAttribute("projectPath", examplesPath + proFiles[j]);
+ writer.writeAttribute("projectPath", installPath + proFiles[j]);
proWithExampleNameFound = true;
break;
}
}
if (!proWithExampleNameFound)
- writer.writeAttribute("projectPath", examplesPath + proFiles[0]);
+ writer.writeAttribute("projectPath", installPath + proFiles[0]);
}
}
if (!en->imageFileName().isEmpty()) {
@@ -4072,7 +4082,7 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
if (--it == filesToOpen.constBegin()) {
writer.writeAttribute(QStringLiteral("mainFile"), QStringLiteral("true"));
}
- writer.writeCharacters(examplesPath + it.value());
+ writer.writeCharacters(installPath + it.value());
writer.writeEndElement();
}
diff --git a/src/qdoc/htmlgenerator.h b/src/qdoc/htmlgenerator.h
index 1c95d7349..ea50e4baf 100644
--- a/src/qdoc/htmlgenerator.h
+++ b/src/qdoc/htmlgenerator.h
@@ -42,6 +42,7 @@
QT_BEGIN_NAMESPACE
+class Config;
class HelpProjectWriter;
class HtmlGenerator : public XmlGenerator
@@ -200,6 +201,8 @@ private:
QString qflagsHref_;
int tocDepth;
+ Config *config;
+
public:
static bool debugging_on;
static QString divNavTop;
diff --git a/src/qdoc/location.cpp b/src/qdoc/location.cpp
index f3db56c00..a77537f56 100644
--- a/src/qdoc/location.cpp
+++ b/src/qdoc/location.cpp
@@ -42,8 +42,6 @@
QT_BEGIN_NAMESPACE
-const Location Location::null;
-
int Location::tabSize;
int Location::warningCount = 0;
int Location::warningLimit = -1;
@@ -283,7 +281,7 @@ int Location::exitCode()
if (warningLimit < 0 || warningCount <= warningLimit)
return EXIT_SUCCESS;
- Location::null.emitMessage(
+ Location().emitMessage(
Error,
tr("Documentation warnings (%1) exceeded the limit (%2) for '%3'.")
.arg(QString::number(warningCount), QString::number(warningLimit), project),
@@ -392,11 +390,11 @@ void Location::logToStdErrAlways(const QString &message)
*/
void Location::internalError(const QString &hint)
{
- Location::null.fatal(tr("Internal error (%1)").arg(hint),
- tr("There is a bug in %1. Seek advice from your local"
- " %2 guru.")
- .arg(programName)
- .arg(programName));
+ Location().fatal(tr("Internal error (%1)").arg(hint),
+ tr("There is a bug in %1. Seek advice from your local"
+ " %2 guru.")
+ .arg(programName)
+ .arg(programName));
}
/*!
diff --git a/src/qdoc/location.h b/src/qdoc/location.h
index bbefb10eb..f6704ca87 100644
--- a/src/qdoc/location.h
+++ b/src/qdoc/location.h
@@ -79,9 +79,8 @@ public:
void fatal(const QString &message, const QString &details = QString()) const;
void report(const QString &message, const QString &details = QString()) const;
- static const Location null;
-
static void initialize();
+
static void terminate();
static void information(const QString &message);
static void internalError(const QString &hint);
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp
index 5f98dabd5..87a1b4b2d 100644
--- a/src/qdoc/main.cpp
+++ b/src/qdoc/main.cpp
@@ -99,7 +99,7 @@ static void loadIndexFiles(const QSet<QString> &formats)
if (fi.exists() && fi.isFile())
indexFiles << index;
else
- Location::null.warning(QString("Index file not found: %1").arg(index));
+ Location().warning(QString("Index file not found: %1").arg(index));
}
config.dependModules() += config.getStringList(CONFIG_DEPENDS);
@@ -196,10 +196,10 @@ static void loadIndexFiles(const QSet<QString> &formats)
indexPaths.reserve(foundIndices.size());
for (const auto &found : qAsConst(foundIndices))
indexPaths << found.absoluteFilePath();
- Location::null.warning(
+ Location().warning(
QString("Multiple index files found for dependency \"%1\":\n%2")
.arg(module, indexPaths.join('\n')));
- Location::null.warning(
+ Location().warning(
QString("Using %1 as index file for dependency \"%2\"")
.arg(foundIndices[foundIndices.size() - 1].absoluteFilePath(),
module));
@@ -211,13 +211,13 @@ static void loadIndexFiles(const QSet<QString> &formats)
if (!indexFiles.contains(indexToAdd))
indexFiles << indexToAdd;
} else if (!asteriskUsed) {
- Location::null.warning(
+ Location().warning(
QString("\"%1\" Cannot locate index file for dependency \"%2\"")
.arg(config.getString(CONFIG_PROJECT), module));
}
}
} else {
- Location::null.warning(
+ Location().warning(
QLatin1String("Dependent modules specified, but no index directories were set. "
"There will probably be errors for missing links."));
}
@@ -226,6 +226,27 @@ static void loadIndexFiles(const QSet<QString> &formats)
}
/*!
+ \internal
+ Prints to stderr the name of the project that QDoc is running for,
+ in which mode and which phase.
+
+ If QDoc is running in debug mode, also logs the command line arguments.
+ */
+void logStartEndMessage(const QLatin1String &startStop, const Config &config)
+{
+ const QString runName = " qdoc for "
+ + config.getString(CONFIG_PROJECT)
+ + QLatin1String(" in ")
+ + QLatin1String(Generator::singleExec() ? "single" : "dual")
+ + QLatin1String(" process mode, (")
+ + QLatin1String(Generator::preparing() ? "prepare" : "generate")
+ + QLatin1String(" phase)");
+
+ const QString msg = startStop + runName;
+ Location::logToStdErrAlways(msg);
+}
+
+/*!
Processes the qdoc config file \a fileName. This is the controller for all
of QDoc. The \a config instance represents the configuration data for QDoc.
All other classes are initialized with the same config.
@@ -258,22 +279,13 @@ static void processQdocconfFile(const QString &fileName)
if (!config.currentDir().isEmpty())
QDir::setCurrent(config.currentDir());
- QString phase = " in ";
- if (Generator::singleExec())
- phase += "single process mode, ";
- else
- phase += "dual process mode, ";
- if (Generator::preparing())
- phase += "(prepare phase)";
- else if (Generator::generating())
- phase += "(generate phase)";
+ logStartEndMessage(QLatin1String("Start"), config);
- QString msg = "Start qdoc for " + config.getString(CONFIG_PROJECT) + phase;
- Location::logToStdErrAlways(msg);
if (config.getDebug()) {
Utilities::startDebugging(QString("command line"));
qCDebug(lcQdoc).noquote() << "Arguments:" << QCoreApplication::arguments();
}
+
/*
Initialize all the classes and data structures with the
qdoc configuration. This is safe to do for each qdocconf
@@ -508,8 +520,7 @@ static void processQdocconfFile(const QString &fileName)
if (Utilities::debugging())
Utilities::stopDebugging(project);
- msg = "End qdoc for " + config.getString(CONFIG_PROJECT) + phase;
- Location::logToStdErrAlways(msg);
+ logStartEndMessage(QLatin1String("End"), config);
QDocDatabase::qdocDB()->setVersion(QString());
Generator::terminate();
CodeParser::terminate();
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index 38c567feb..cffaf79dd 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -614,7 +614,7 @@ QString Node::plainFullName(const Node *relative) const
while (node && !node->isHeader()) {
parts.prepend(node->plainName());
if (node->parent() == relative || node->parent()->name().isEmpty())
- break;
+ break;
node = node->parent();
}
return parts.join(QLatin1String("::"));
@@ -1060,11 +1060,10 @@ void Node::setSince(const QString &since)
project = Config::dot + parts.first();
QVersionNumber cutoff =
- QVersionNumber::fromString(Config::instance().getString(
- CONFIG_IGNORESINCE + project)).normalized();
+ QVersionNumber::fromString(Config::instance().getString(CONFIG_IGNORESINCE + project))
+ .normalized();
- if (!cutoff.isNull() &&
- QVersionNumber::fromString(parts.last()).normalized() < cutoff)
+ if (!cutoff.isNull() && QVersionNumber::fromString(parts.last()).normalized() < cutoff)
return;
since_ = parts.join(QLatin1Char(' '));
@@ -2229,7 +2228,7 @@ void Aggregate::normalizeOverloads()
const NodeList &Aggregate::nonfunctionList()
{
nonfunctionList_ = nonfunctionMap_.values();
- std::sort(nonfunctionList_.begin(), nonfunctionList_.end());
+ std::sort(nonfunctionList_.begin(), nonfunctionList_.end(), Node::nodeNameLessThan);
nonfunctionList_.erase(std::unique(nonfunctionList_.begin(), nonfunctionList_.end()),
nonfunctionList_.end());
return nonfunctionList_;
@@ -2947,7 +2946,9 @@ void ClassNode::removePrivateAndInternalBases()
ClassNode *bc = bases_.at(i).node_;
if (bc == nullptr)
bc = QDocDatabase::qdocDB()->findClassNode(bases_.at(i).path_);
- if (bc != nullptr && (bc->isPrivate() || bc->isInternal() || bc->isDontDocument() || found.contains(bc))) {
+ if (bc != nullptr
+ && (bc->isPrivate() || bc->isInternal() || bc->isDontDocument()
+ || found.contains(bc))) {
RelatedClass rc = bases_.at(i);
bases_.removeAt(i);
ignoredBases_.append(rc);
@@ -4220,19 +4221,23 @@ void FunctionNode::addAssociatedProperty(PropertyNode *p)
}
/*!
- Returns true if this function has at least one property
- that is active, i.e. at least one property that is not
- obsolete.
- */
-bool FunctionNode::hasActiveAssociatedProperty() const
+ \reimp
+
+ Returns \c true if this is an access function for an obsolete property,
+ otherwise calls the base implementation of isObsolete().
+*/
+bool FunctionNode::isObsolete() const
{
- if (associatedProperties_.isEmpty())
- return false;
- for (const auto *property : qAsConst(associatedProperties_)) {
- if (!property->isObsolete())
- return true;
- }
- return false;
+ auto it = std::find_if_not(associatedProperties_.begin(),
+ associatedProperties_.end(),
+ [](const Node *p)->bool {
+ return p->isObsolete();
+ });
+
+ if (!associatedProperties_.isEmpty() && it == associatedProperties_.end())
+ return true;
+
+ return Node::isObsolete();
}
/*! \fn unsigned char FunctionNode::overloadNumber() const
diff --git a/src/qdoc/node.h b/src/qdoc/node.h
index ee93e8200..f1b356fa4 100644
--- a/src/qdoc/node.h
+++ b/src/qdoc/node.h
@@ -183,7 +183,6 @@ public:
bool isJsType() const { return nodeType_ == JsType; }
bool isModule() const { return nodeType_ == Module; }
bool isNamespace() const { return nodeType_ == Namespace; }
- bool isObsolete() const { return (status_ == Obsolete); }
bool isPage() const { return nodeType_ == Page; }
bool isPreliminary() const { return (status_ == Preliminary); }
bool isPrivate() const { return access_ == Private; }
@@ -205,6 +204,7 @@ public:
bool isVariable() const { return nodeType_ == Variable; }
bool isGenericCollection() const { return (nodeType_ == Node::Collection); }
+ virtual bool isObsolete() const { return (status_ == Obsolete); }
virtual bool isAbstract() const { return false; }
virtual bool isAggregate() const { return false; } // means "can have children"
virtual bool isFirstClassAggregate() const
@@ -865,9 +865,7 @@ class EnumNode : public Node
{
public:
EnumNode(Aggregate *parent, const QString &name, bool isScoped = false)
- : Node(Enum, parent, name),
- flagsType_(nullptr),
- isScoped_(isScoped)
+ : Node(Enum, parent, name), flagsType_(nullptr), isScoped_(isScoped)
{
}
@@ -957,10 +955,7 @@ public:
n->setSharedCommentNode(this);
setGenus(n->genus());
}
- void sort()
- {
- std::sort(collective_.begin(), collective_.end(), Node::nodeNameLessThan);
- }
+ void sort() { std::sort(collective_.begin(), collective_.end(), Node::nodeNameLessThan); }
const QVector<Node *> &collective() const { return collective_; }
void setOverloadFlags();
void setRelatedNonmember(bool b) override;
@@ -1030,6 +1025,7 @@ public:
bool isMacroWithParams() const { return (metaness_ == MacroWithParams); }
bool isMacroWithoutParams() const { return (metaness_ == MacroWithoutParams); }
bool isMacro() const override { return (isMacroWithParams() || isMacroWithoutParams()); }
+ bool isObsolete() const override;
bool isCppFunction() const { return metaness_ == Plain; } // Is this correct?
bool isSignal() const { return (metaness_ == Signal); }
@@ -1070,7 +1066,6 @@ public:
bool hasAssociatedProperties() const { return !associatedProperties_.isEmpty(); }
bool hasOneAssociatedProperty() const { return (associatedProperties_.size() == 1); }
Node *firstAssociatedProperty() const { return associatedProperties_[0]; }
- bool hasActiveAssociatedProperty() const;
QString element() const override { return parent()->name(); }
bool isAttached() const override { return attached_; }
diff --git a/src/qdoc/qdocdatabase.cpp b/src/qdoc/qdocdatabase.cpp
index 7f585cc51..2297c237d 100644
--- a/src/qdoc/qdocdatabase.cpp
+++ b/src/qdoc/qdocdatabase.cpp
@@ -336,7 +336,7 @@ const Node *QDocForest::findNodeForTarget(QStringList &targetPath, const Node *r
*/
void QDocForest::printLinkCounts(const QString &project)
{
- Location::null.report(QString("%1: Link Counts").arg(project));
+ Location().report(QString("%1: Link Counts").arg(project));
QMultiMap<int, QString> m;
for (const auto *tree : searchOrder()) {
if (tree->linkCount() < 0)
@@ -352,10 +352,10 @@ void QDocForest::printLinkCounts(const QString &project)
for (int k = 0; k < pad; ++k)
line += QLatin1Char(' ');
line += "%1";
- Location::null.report(line.arg(-(it.key())));
+ Location().report(line.arg(-(it.key())));
}
- Location::null.report("Optimal depends variable:");
- Location::null.report(depends);
+ Location().report("Optimal depends variable:");
+ Location().report(depends);
}
/*!
diff --git a/src/qdoc/qdoctagfiles.cpp b/src/qdoc/qdoctagfiles.cpp
index 8d97ce48a..0d9b0aee0 100644
--- a/src/qdoc/qdoctagfiles.cpp
+++ b/src/qdoc/qdoctagfiles.cpp
@@ -181,7 +181,7 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
switch (node->nodeType()) {
case Node::Enum:
nodeName = "member";
- kind = "enum";
+ kind = "enumeration";
break;
case Node::Typedef:
nodeName = "member";
@@ -260,7 +260,8 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
writer.writeTextElement("type", "virtual " + functionNode->returnType());
writer.writeTextElement("name", objName);
- QStringList pieces = gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
+ const QStringList pieces =
+ gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
writer.writeTextElement("anchorfile", pieces[0]);
writer.writeTextElement("anchor", pieces[1]);
QString signature = functionNode->signature(false, false);
@@ -281,7 +282,8 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
const PropertyNode *propertyNode = static_cast<const PropertyNode *>(node);
writer.writeAttribute("type", propertyNode->dataType());
writer.writeTextElement("name", objName);
- QStringList pieces = gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
+ const QStringList pieces =
+ gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
writer.writeTextElement("anchorfile", pieces[0]);
writer.writeTextElement("anchor", pieces[1]);
writer.writeTextElement("arglist", QString());
@@ -291,15 +293,17 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
case Node::Enum: {
const EnumNode *enumNode = static_cast<const EnumNode *>(node);
writer.writeTextElement("name", objName);
- QStringList pieces = gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
+ const QStringList pieces =
+ gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
+ writer.writeTextElement("anchorfile", pieces[0]);
writer.writeTextElement("anchor", pieces[1]);
- writer.writeTextElement("arglist", QString());
writer.writeEndElement(); // member
- for (int i = 0; i < enumNode->items().size(); ++i) {
- EnumItem item = enumNode->items().value(i);
+ for (const auto &item : enumNode->items()) {
writer.writeStartElement("member");
- writer.writeAttribute("name", item.name());
+ writer.writeAttribute("kind", "enumvalue");
+ writer.writeTextElement("name", item.name());
+ writer.writeTextElement("anchorfile", pieces[0]);
writer.writeTextElement("anchor", pieces[1]);
writer.writeTextElement("arglist", QString());
writer.writeEndElement(); // member
@@ -312,7 +316,8 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
else
writer.writeAttribute("type", QString());
writer.writeTextElement("name", objName);
- QStringList pieces = gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
+ const QStringList pieces =
+ gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
writer.writeTextElement("anchorfile", pieces[0]);
writer.writeTextElement("anchor", pieces[1]);
writer.writeTextElement("arglist", QString());
@@ -341,7 +346,7 @@ void QDocTagFiles::generateTagFile(const QString &fileName, Generator *g)
file.setFileName(gen_->outputDir() + QLatin1Char('/') + fileInfo.fileName());
if (!file.open(QFile::WriteOnly | QFile::Text)) {
- Location::null.warning(QString("Failed to open %1 for writing.").arg(file.fileName()));
+ Location().warning(QString("Failed to open %1 for writing.").arg(file.fileName()));
return;
}
diff --git a/src/qdoc/qmlmarkupvisitor.cpp b/src/qdoc/qmlmarkupvisitor.cpp
index b48b44a9f..d7b95fae7 100644
--- a/src/qdoc/qmlmarkupvisitor.cpp
+++ b/src/qdoc/qmlmarkupvisitor.cpp
@@ -244,7 +244,8 @@ bool QmlMarkupVisitor::visit(QQmlJS::AST::UiImport *uiimport)
void QmlMarkupVisitor::endVisit(QQmlJS::AST::UiImport *uiimport)
{
if (uiimport->version)
- addVerbatim(uiimport->version->firstSourceLocation(), uiimport->version->lastSourceLocation());
+ addVerbatim(uiimport->version->firstSourceLocation(),
+ uiimport->version->lastSourceLocation());
addVerbatim(uiimport->asToken);
addMarkedUpToken(uiimport->importIdToken, QLatin1String("headerfile"));
addVerbatim(uiimport->semicolonToken);
diff --git a/src/qdoc/quoter.cpp b/src/qdoc/quoter.cpp
index a313ab5c5..fcdc6dee1 100644
--- a/src/qdoc/quoter.cpp
+++ b/src/qdoc/quoter.cpp
@@ -134,7 +134,7 @@ void Quoter::reset()
silent = false;
plainLines.clear();
markedLines.clear();
- codeLocation = Location::null;
+ codeLocation = Location();
}
void Quoter::quoteFromFile(const QString &userFriendlyFilePath, const QString &plainCode,
diff --git a/src/qdoc/sections.cpp b/src/qdoc/sections.cpp
index c0c5e095d..c9012e21c 100644
--- a/src/qdoc/sections.cpp
+++ b/src/qdoc/sections.cpp
@@ -728,9 +728,7 @@ void Sections::distributeNodeInSummaryVector(SectionVector &sv, Node *n)
sv[RelatedNonmembers].insert(n);
return;
}
- if (fn->hasAssociatedProperties() && !fn->hasActiveAssociatedProperty())
- return;
- else if (fn->isIgnored())
+ if (fn->isIgnored())
return;
if (fn->isSlot()) {
if (fn->isPublic())
diff --git a/src/shared/fontpanel/fontpanel.cpp b/src/shared/fontpanel/fontpanel.cpp
index fd403dfcf..8e4b6332d 100644
--- a/src/shared/fontpanel/fontpanel.cpp
+++ b/src/shared/fontpanel/fontpanel.cpp
@@ -68,7 +68,7 @@ FontPanel::FontPanel(QWidget *parentWidget) :
writingSystems.push_front(QFontDatabase::Any);
for (QFontDatabase::WritingSystem ws : qAsConst(writingSystems))
m_writingSystemComboBox->addItem(QFontDatabase::writingSystemName(ws), QVariant(ws));
- connect(m_writingSystemComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(m_writingSystemComboBox, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &FontPanel::slotWritingSystemChanged);
formLayout->addRow(tr("&Writing system"), m_writingSystemComboBox);
@@ -77,12 +77,12 @@ FontPanel::FontPanel(QWidget *parentWidget) :
formLayout->addRow(tr("&Family"), m_familyComboBox);
m_styleComboBox->setEditable(false);
- connect(m_styleComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(m_styleComboBox, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &FontPanel::slotStyleChanged);
formLayout->addRow(tr("&Style"), m_styleComboBox);
m_pointSizeComboBox->setEditable(false);
- connect(m_pointSizeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(m_pointSizeComboBox, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged),
this, &FontPanel::slotPointSizeChanged);
formLayout->addRow(tr("&Point size"), m_pointSizeComboBox);
diff --git a/tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf b/tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf
index 816d1d1a4..b4598476e 100644
--- a/tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf
@@ -1,6 +1,8 @@
# QML test includes a documented example
include(testqml.qdocconf)
+examplesinstallpath = test
+
# Configure .qhp generation
qhp.projects = Test
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 ac93617a2..2b442d1dd 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
@@ -5,7 +5,8 @@
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
-<db:para>A test project for QDoc build artifacts.</db:para></db:abstract>
+<db:para>Example for documenting QML types.</db:para>
+</db:abstract>
</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>
@@ -33,4 +34,14 @@ An aliased property of type &lt;@type&gt;int&lt;/@type&gt;&lt;@op&gt;.&lt;/@op&g
<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:section>
+<db:para>Files:</db:para>
+<db:itemizedlist><db:listitem>
+<db:para><db:link xlink:href="componentset/ProgressBar.qml">componentset/ProgressBar.qml</db:link></db:para></db:listitem>
+<db:listitem>
+<db:para><db:link xlink:href="componentset/Switch.qml">componentset/Switch.qml</db:link></db:para></db:listitem>
+<db:listitem>
+<db:para><db:link xlink:href="componentset/TabWidget.qml">componentset/TabWidget.qml</db:link></db:para></db:listitem>
+<db:listitem>
+<db:para><db:link xlink:href="componentset/componentset.pro">componentset/componentset.pro</db:link></db:para></db:listitem>
+</db:itemizedlist>
</db:article>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml b/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml
index 330923033..7f206d0e8 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<instructionals module="Test">
<examples>
- <example name="QML Documentation Example" docUrl="qthelp://org.qt-project.test.001/test/test-componentset-example.html" isTest="true">
- <description><![CDATA[No description available]]></description>
- <tags>documentation,qml,test</tags>
+ <example name="QML Documentation Example" docUrl="qthelp://org.qt-project.test.001/test/test-componentset-example.html" projectPath="tutorials/componentset/componentset.pro" isTest="true">
+ <description><![CDATA[Example for documenting QML types.]]></description>
+ <tags>documentation,qml,sample,test</tags>
</example>
</examples>
</instructionals>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml b/tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml
index 377c49980..515ef7bf1 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<WebXML>
<document>
- <page name="componentset" href="test-componentset-example.html" status="active" location="examples.qdoc" documented="true" subtype="example" title="QML Documentation Example" fulltitle="QML Documentation Example" subtitle="" module="Test">
+ <page name="componentset" href="test-componentset-example.html" status="active" location="examples.qdoc" documented="true" subtype="example" title="QML Documentation Example" fulltitle="QML Documentation Example" subtitle="" module="Test" brief="Example for documenting QML types">
<contents name="qml-class" title="QML Class" level="1"/>
<contents name="properties-signals-handlers-and-methods" title="Properties, Signals, Handlers, and Methods" level="1"/>
<contents name="internal-documentation" title="Internal Documentation" level="2"/>
<contents name="qml-types-with-c-implementation" title="QML Types with C++ Implementation" level="1"/>
<description>
+ <brief>Example for documenting QML types.</brief>
<para>This example demonstrates one of the ways to document QML types.</para>
<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 <link raw="UI Components" href="uicomponents-qmlmodule.html" type="">UI Components</link> module.</para>
<para>The uicomponents.qdoc file generates the overview page for the <link raw="UI Components" href="uicomponents-qmlmodule.html" type="">UI Components</link> module page.</para>
@@ -32,6 +33,29 @@ An aliased property of type int.</code>
<heading level="1">QML Types with C++ Implementation</heading>
<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.</para>
</section>
+ <para>Files:</para>
+ <list type="bullet">
+ <item>
+ <para>
+ <link raw="componentset/ProgressBar.qml" href="test-componentset-progressbar-qml.html" type="page" page="ProgressBar.qml Example File">componentset/ProgressBar.qml</link>
+ </para>
+ </item>
+ <item>
+ <para>
+ <link raw="componentset/Switch.qml" href="test-componentset-switch-qml.html" type="page" page="Switch.qml Example File">componentset/Switch.qml</link>
+ </para>
+ </item>
+ <item>
+ <para>
+ <link raw="componentset/TabWidget.qml" href="test-componentset-tabwidget-qml.html" type="page" page="TabWidget.qml Example File">componentset/TabWidget.qml</link>
+ </para>
+ </item>
+ <item>
+ <para>
+ <link raw="componentset/componentset.pro" href="test-componentset-componentset-pro.html" type="page" page="componentset.pro Example File">componentset/componentset.pro</link>
+ </para>
+ </item>
+ </list>
</description>
</page>
</document>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html
new file mode 100644
index 000000000..d1fb02484
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- includefromparent.qdoc -->
+ <title>doc index | Test</title>
+</head>
+<body>
+<h1 class="title">doc index</h1>
+<span class="subtitle"></span>
+<!-- $$$index.html-description -->
+<div class="descr"> <a name="details"></a>
+<a name="c-classes"></a>
+<h2 id="c-classes">C++ Classes</h2>
+<div class="table"><table class="annotated">
+<tr class="odd topAlign"><td class="tblName"><p><a href="testqdoc-test.html">TestQDoc::Test</a></p></td><td class="tblDescr"><p>A class in a namespace</p></td></tr>
+<tr class="even topAlign"><td class="tblName"><p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p></td><td class="tblDescr"><p>A derived class in a namespace</p></td></tr>
+</table></div>
+<a name="qml-types"></a>
+<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>
+</table></div>
+<p>Test include file that is part of the sourcedirs.</p>
+</div>
+<!-- @@@index.html -->
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qdoc-test-qmlmodule.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qdoc-test-qmlmodule.html
new file mode 100644
index 000000000..6a513e987
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qdoc-test-qmlmodule.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- type.cpp -->
+ <title>Test</title>
+</head>
+<body>
+<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
+<span class="subtitle"></span>
+<!-- $$$QDoc.Test-description -->
+<div class="descr"> <a name="details"></a>
+</div>
+<!-- @@@QDoc.Test -->
+<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-qdoc-test-doctest.html">DocTest</a></p></td><td class="tblDescr"><p>Represents a doc test case</p></td></tr>
+<tr class="even topAlign"><td class="tblName"><p><a href="qml-qdoc-test-type.html">Type</a></p></td><td class="tblDescr"><p>A QML type documented in a .cpp file</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>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-int.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-int.html
new file mode 100644
index 000000000..651f840cb
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-int.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- parent.qdoc -->
+ <title>int QML Basic Type | Test</title>
+</head>
+<body>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">int QML Basic Type</h1>
+<span class="subtitle"></span>
+<!-- $$$int-description -->
+<div class="descr"> <a name="details"></a>
+</div>
+<!-- @@@int -->
+</body>
+</html>
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
new file mode 100644
index 000000000..48c8fa485
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- parent.qdoc -->
+ <title>List of All Members for AbstractParent | Test</title>
+</head>
+<body>
+<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">List of All Members for AbstractParent</h1>
+<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>
+</html>
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
new file mode 100644
index 000000000..cbb0f36aa
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- parent.qdoc -->
+ <title>AbstractParent QML Type | Test</title>
+</head>
+<body>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#properties">Properties</a></li>
+<li class="level1"><a href="#methods">Methods</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">AbstractParent QML Type</h1>
+<span class="subtitle"></span>
+<!-- $$$AbstractParent-brief -->
+<p>Abstract base QML type. <a href="#details">More...</a></p>
+<!-- @@@AbstractParent -->
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QDoc.Test 1.1</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qdoc-test-child.html">Child</a></p>
+</td></tr></table></div><ul>
+<li><a href="qml-qdoc-test-abstractparent-members.html">List of all members, including inherited members</a></li>
+</ul>
+<a name="properties"></a>
+<h2 id="properties">Properties</h2>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-abstractparent.html#children-prop">children</a></b></b> : list&lt;Child&gt;</li>
+</ul>
+<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>
+<!-- @@@AbstractParent -->
+<h2>Property Documentation</h2>
+<!-- $$$children -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="children-prop">
+<td class="tblQmlPropNode"><p>
+<a name="children-prop"></a><span class="qmldefault">[default] </span><span class="name">children</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qdoc-test-child.html">Child</a></span>&gt;</p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>Children of the type.</p>
+<p>Test include file that is part of the sourcedirs.</p>
+</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">
+<tr valign="top" class="odd" id="rear-method">
+<td class="tblQmlFuncNode"><p>
+<a name="rear-method"></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>
+<p>Test include file that is part of the sourcedirs.</p>
+</div></div><!-- @@@rear -->
+<br/>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-child-members.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-child-members.html
new file mode 100644
index 000000000..cedbad6bc
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-child-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- parent.qdoc -->
+ <title>List of All Members for Child | Test</title>
+</head>
+<body>
+<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">List of All Members for Child</h1>
+<p>This is the complete list of members for <a href="qml-qdoc-test-child.html">Child</a>, including inherited members.</p>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-child.html#children-prop">children</a></b></b> : list&lt;Child&gt; [default]</li>
+<li class="fn">void <b><b><a href="qml-qdoc-test-child.html#rear-method-1">rear</a></b></b>(<i>child</i>)</li>
+<li class="fn">void <b><b><a href="qml-qdoc-test-child.html#rear-method">rear</a></b></b>(<i>child</i>)</li>
+</ul>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-child.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-child.html
new file mode 100644
index 000000000..b1775faa3
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-child.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- parent.qdoc -->
+ <title>Child QML Type | Test</title>
+</head>
+<body>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#properties">Properties</a></li>
+<li class="level1"><a href="#methods">Methods</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">Child QML Type</h1>
+<span class="subtitle"></span>
+<!-- $$$Child-brief -->
+<p>A Child inheriting its parent. <a href="#details">More...</a></p>
+<!-- @@@Child -->
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QDoc.Test 1.1</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qdoc-test-abstractparent.html">AbstractParent</a></p>
+</td></tr></table></div><ul>
+<li><a href="qml-qdoc-test-child-members.html">List of all members, including inherited members</a></li>
+</ul>
+<a name="properties"></a>
+<h2 id="properties">Properties</h2>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-child.html#children-prop">children</a></b></b> : list&lt;Child&gt;</li>
+</ul>
+<a name="methods"></a>
+<h2 id="methods">Methods</h2>
+<ul>
+<li class="fn">void <b><b><a href="qml-qdoc-test-child.html#rear-method-1">rear</a></b></b>(<i>child</i>)</li>
+<li class="fn">void <b><b><a href="qml-qdoc-test-child.html#rear-method">rear</a></b></b>(<i>child</i>)</li>
+</ul>
+<!-- $$$Child-description -->
+<a name="details"></a>
+<h2 id="details">Detailed Description</h2>
+<!-- @@@Child -->
+<h2>Property Documentation</h2>
+<!-- $$$children -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="children-prop">
+<td class="tblQmlPropNode"><p>
+<a name="children-prop"></a><span class="qmldefault">[default] </span><span class="name">children</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qdoc-test-child.html">Child</a></span>&gt;</p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>Children of the type.</p>
+<p>Test include file that is part of the sourcedirs.</p>
+</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">
+<tr valign="top" class="odd" id="rear-method">
+<td class="tblQmlFuncNode"><p>
+<a name="rear-method"></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>
+<p>Test include file that is part of the sourcedirs.</p>
+</div></div><!-- @@@rear -->
+<br/>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-doctest-members.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-doctest-members.html
new file mode 100644
index 000000000..3048f9701
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-doctest-members.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- DocTest.qml -->
+ <title>List of All Members for DocTest | Test</title>
+</head>
+<body>
+<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">List of All Members for DocTest</h1>
+<p>This is the complete list of members for <a href="qml-qdoc-test-doctest.html">DocTest</a>, including inherited members.</p>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-doctest.html#active-prop">active</a></b></b> : bool</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-doctest.html#name-prop">name</a></b></b> : string</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-doctest.html#fail-method">fail</a></b></b>(<i>message</i>)</li>
+</ul>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-doctest.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-doctest.html
new file mode 100644
index 000000000..e1475d5fb
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-doctest.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- DocTest.qml -->
+ <title>DocTest QML Type | Test</title>
+</head>
+<body>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#properties">Properties</a></li>
+<li class="level1"><a href="#methods">Methods</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+<li class="level2"><a href="#introduction">Introduction</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">DocTest QML Type</h1>
+<span class="subtitle"></span>
+<!-- $$$DocTest-brief -->
+<p>Represents a doc test case. <a href="#details">More...</a></p>
+<!-- @@@DocTest -->
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QDoc.Test 1.1</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> QDoc.Test 0.9</td></tr></table></div><ul>
+<li><a href="qml-qdoc-test-doctest-members.html">List of all members, including inherited members</a></li>
+</ul>
+<a name="properties"></a>
+<h2 id="properties">Properties</h2>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-doctest.html#active-prop">active</a></b></b> : bool</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-doctest.html#name-prop">name</a></b></b> : string</li>
+</ul>
+<a name="methods"></a>
+<h2 id="methods">Methods</h2>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-doctest.html#fail-method">fail</a></b></b>(<i>message</i>)</li>
+</ul>
+<!-- $$$DocTest-description -->
+<a name="details"></a>
+<h2 id="details">Detailed Description</h2>
+<a name="introduction"></a>
+<h2 id="introduction">Introduction</h2>
+<p>A documentation test case, itself documented inline in DocTest.qml.</p>
+<!-- @@@DocTest -->
+<h2>Property Documentation</h2>
+<!-- $$$active -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="active-prop">
+<td class="tblQmlPropNode"><p>
+<a name="active-prop"></a><span class="name">active</span> : <span class="type">bool</span></p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>Whether the test is active.</p>
+<p><b>See also </b><a href="qml-qdoc-test-doctest.html#name-prop">name</a>.</p>
+</div></div><!-- @@@active -->
+<br/>
+<!-- $$$name -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="name-prop">
+<td class="tblQmlPropNode"><p>
+<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>Name of the test.</p>
+<pre class="qml"><span class="type"><a href="qml-qdoc-test-doctest.html">DocTest</a></span> {
+ <span class="name">name</span>: <span class="string">&quot;test&quot;</span>
+ <span class="comment">// ...</span>
+}</pre>
+</div></div><!-- @@@name -->
+<br/>
+<h2>Method Documentation</h2>
+<!-- $$$fail[overload1]$$$fail -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="fail-method">
+<td class="tblQmlFuncNode"><p>
+<a name="fail-method"></a><span class="name">fail</span>(<i>message</i> = &quot;oops&quot;)</p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>Fails the current test case, with the optional <i>message</i>.</p>
+<p>This method was introduced in QDoc.Test 1.0.</p>
+</div></div><!-- @@@fail -->
+<br/>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-type-members.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-type-members.html
new file mode 100644
index 000000000..91cfa8643
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-type-members.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- type.cpp -->
+ <title>List of All Members for Type | Test</title>
+</head>
+<body>
+<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">List of All Members for Type</h1>
+<p>This is the complete list of members for <a href="qml-qdoc-test-type.html">Type</a>, including inherited members.</p>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#fifth-prop">fifth</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#fourth-prop">fourth</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#group-prop">group</a></b></b><ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#group.first-prop">group.first</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#group.second-prop">group.second</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#group.third-prop">group.third</a></b></b> : int</li>
+</ul>
+</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#id-prop">id</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#name-prop">name</a></b></b> : string</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#type-attached-prop">type</a></b></b> : enumeration [attached]</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#completed-signal">completed</a></b></b>(<i>status</i>)</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#configured-signal">configured</a></b></b>() [attached]</li>
+<li class="fn">Type <b><b><a href="qml-qdoc-test-type.html#copy-method">copy</a></b></b>(<i>a</i>)</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#disable-method">disable</a></b></b>()</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#enable-method">enable</a></b></b>()</li>
+</ul>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-type.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-type.html
new file mode 100644
index 000000000..166cbee81
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-type.html
@@ -0,0 +1,185 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- type.cpp -->
+ <title>Type QML Type | Test</title>
+</head>
+<body>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#properties">Properties</a></li>
+<li class="level1"><a href="#attached-properties">Attached Properties</a></li>
+<li class="level1"><a href="#signals">Signals</a></li>
+<li class="level1"><a href="#attached-signals">Attached Signals</a></li>
+<li class="level1"><a href="#methods">Methods</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">Type QML Type</h1>
+<span class="subtitle"></span>
+<!-- $$$Type-brief -->
+<p>A QML type documented in a .cpp file. <a href="#details">More...</a></p>
+<!-- @@@Type -->
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QDoc.Test 1.1</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qml-qdoc-test-type.html"><a href="testqdoc-test.html">Test</a></td></tr></table></div><ul>
+<li><a href="qml-qdoc-test-type-members.html">List of all members, including inherited members</a></li>
+</ul>
+<a name="properties"></a>
+<h2 id="properties">Properties</h2>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#fifth-prop">fifth</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#fourth-prop">fourth</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#group-prop">group</a></b></b><ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#group.first-prop">group.first</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#group.second-prop">group.second</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#group.third-prop">group.third</a></b></b> : int</li>
+</ul>
+</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#id-prop">id</a></b></b> : int</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#name-prop">name</a></b></b> : string</li>
+</ul>
+<a name="attached-properties"></a>
+<h2 id="attached-properties">Attached Properties</h2>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#type-attached-prop">type</a></b></b> : enumeration</li>
+</ul>
+<a name="signals"></a>
+<h2 id="signals">Signals</h2>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#completed-signal">completed</a></b></b>(<i>status</i>)</li>
+</ul>
+<a name="attached-signals"></a>
+<h2 id="attached-signals">Attached Signals</h2>
+<ul>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#configured-signal">configured</a></b></b>()</li>
+</ul>
+<a name="methods"></a>
+<h2 id="methods">Methods</h2>
+<ul>
+<li class="fn">Type <b><b><a href="qml-qdoc-test-type.html#copy-method">copy</a></b></b>(<i>a</i>)</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#disable-method">disable</a></b></b>()</li>
+<li class="fn"><b><b><a href="qml-qdoc-test-type.html#enable-method">enable</a></b></b>()</li>
+</ul>
+<!-- $$$Type-description -->
+<a name="details"></a>
+<h2 id="details">Detailed Description</h2>
+<!-- @@@Type -->
+<h2>Property Documentation</h2>
+<!-- $$$ -->
+<div class="qmlitem"><div class="fngroup">
+<div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="fifth-prop">
+<td class="tblQmlPropNode"><p>
+<a name="fifth-prop"></a><span class="name">fifth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<tr valign="top" class="odd" id="fourth-prop">
+<td class="tblQmlPropNode"><p>
+<a name="fourth-prop"></a><span class="name">fourth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+</table></div></div>
+</div><div class="qmldoc"><p>A group of properties sharing a documentation comment.</p>
+</div></div><!-- @@@ -->
+<br/>
+<!-- $$$group -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="even" id="group-prop"><th class="centerAlign"><p><a name="group-prop"></a><b>group group</b></p></th></tr>
+<tr valign="top" class="odd" id="group.first-prop">
+<td class="tblQmlPropNode"><p>
+<a name="group.first-prop"></a><span class="name">group.first</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<tr valign="top" class="odd" id="group.second-prop">
+<td class="tblQmlPropNode"><p>
+<a name="group.second-prop"></a><span class="name">group.second</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<tr valign="top" class="odd" id="group.third-prop">
+<td class="tblQmlPropNode"><p>
+<a name="group.third-prop"></a><span class="name">group.third</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>A property group.</p>
+</div></div><!-- @@@group -->
+<br/>
+<!-- $$$id -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="id-prop">
+<td class="tblQmlPropNode"><p>
+<a name="id-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">id</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>A read-only property.</p>
+</div></div><!-- @@@id -->
+<br/>
+<!-- $$$name -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="name-prop">
+<td class="tblQmlPropNode"><p>
+<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>Name of the Test.</p>
+</div></div><!-- @@@name -->
+<br/>
+<h2>Attached Property Documentation</h2>
+<!-- $$$type -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="type-attached-prop">
+<td class="tblQmlPropNode"><p>
+<a name="type-attached-prop"></a><span class="name">Type.type</span> : <span class="type">enumeration</span></p></td></tr>
+</table></div></div>
+<div class="qmldoc"><div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
+<tr><td class="topAlign"><code>Type.NoType</code></td><td class="topAlign">Nothing</td></tr>
+<tr><td class="topAlign"><code>Type.SomeType</code></td><td class="topAlign">Something</td></tr>
+</table></div>
+</div></div><!-- @@@type -->
+<br/>
+<h2>Signal Documentation</h2>
+<!-- $$$completed[overload1]$$$completed -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="completed-signal">
+<td class="tblQmlFuncNode"><p>
+<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>
+</div></div><!-- @@@completed -->
+<br/>
+<h2>Attached Signal Documentation</h2>
+<!-- $$$configured[overload1]$$$configured -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="configured-signal">
+<td class="tblQmlFuncNode"><p>
+<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>
+</div></div><!-- @@@configured -->
+<br/>
+<h2>Method Documentation</h2>
+<!-- $$$ -->
+<div class="qmlitem"><div class="fngroup">
+<div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="disable-method">
+<td class="tblQmlFuncNode"><p>
+<a name="disable-method"></a><span class="name">disable</span>()</p></td></tr>
+<tr valign="top" class="odd" id="enable-method">
+<td class="tblQmlFuncNode"><p>
+<a name="enable-method"></a><span class="name">enable</span>()</p></td></tr>
+</table></div></div>
+</div><div class="qmldoc"><p>Enables or disables this type.</p>
+</div></div><!-- @@@ -->
+<br/>
+<!-- $$$copy[overload1]$$$copy -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="copy-method">
+<td class="tblQmlFuncNode"><p>
+<a name="copy-method"></a><span class="type"><a href="qml-qdoc-test-type.html">Type</a></span> <span class="name">copy</span>(<i>a</i>)</p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>Returns another Type based on <i>a</i>.</p>
+</div></div><!-- @@@copy -->
+<br/>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/test.index b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/test.index
new file mode 100644
index 000000000..f45b33114
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/test.index
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QDOCINDEX>
+<INDEX url="" title="A test project for QDoc build artifacts" version="" project="Test">
+ <namespace name="" status="active" access="public" module="test">
+ <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>
+ <qmlclass name="AbstractParent" qml-module-name="QDoc.Test" fullname="QDoc.Test.AbstractParent" href="qml-qdoc-test-abstractparent.html" status="active" access="public" abstract="true" location="parent.qdoc" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput/qml/parent.qdoc" lineno="29" documented="true" title="AbstractParent" fulltitle="AbstractParent" subtitle="" groups="qmltypes" brief="Abstract base QML type">
+ <function name="rear" fullname="QDoc.Test.AbstractParent.rear" href="qml-qdoc-test-abstractparent.html#rear-method" status="active" access="public" location="includefromparent.qdoc" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/includefromparent.qdoc" lineno="47" documented="true" meta="qmlmethod"/>
+ <function name="rear" fullname="QDoc.Test.AbstractParent.rear" href="qml-qdoc-test-abstractparent.html#rear-method" status="active" access="public" location="parent.qdoc" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput/qml/parent.qdoc" lineno="42" documented="true" meta="qmlmethod"/>
+ <qmlproperty name="children" fullname="QDoc.Test.AbstractParent.children" status="active" access="public" location="includefromparent.qdoc" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/includefromparent.qdoc" lineno="41" documented="true" type="list&lt;Child&gt;" attached="false" writable="true" brief="Children of the type"/>
+ </qmlclass>
+ <qmlclass name="Child" qml-module-name="QDoc.Test" qml-base-type="QDoc.Test::AbstractParent" fullname="QDoc.Test.Child" href="qml-qdoc-test-child.html" status="active" access="public" location="parent.qdoc" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput/qml/parent.qdoc" lineno="47" documented="true" title="Child" fulltitle="Child" subtitle="" brief="A Child inheriting its parent"/>
+ <qmlclass name="DocTest" qml-module-name="QDoc.Test" fullname="QDoc.Test.DocTest" href="qml-qdoc-test-doctest.html" status="active" access="public" since="QDoc.Test 0.9" documented="true" title="DocTest" fulltitle="DocTest" subtitle="" brief="Represents a doc test case">
+ <contents name="introduction" title="Introduction" level="1"/>
+ <function name="doctest_fail" fullname="QDoc.Test.DocTest.doctest_fail" href="qml-qdoc-test-doctest.html#doctest_fail-method" status="internal" access="public" documented="true" meta="qmlmethod"/>
+ <function name="fail" fullname="QDoc.Test.DocTest.fail" href="qml-qdoc-test-doctest.html#fail-method" status="active" access="public" location="DocTest.qml" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput/qml/DocTest.qml" lineno="68" documented="true" since="QDoc.Test 1.0" meta="qmlmethod"/>
+ <qmlproperty name="active" fullname="QDoc.Test.DocTest.active" href="qml-qdoc-test-doctest.html#active-prop" status="active" access="public" documented="true" type="bool" attached="false" writable="true"/>
+ <qmlproperty name="doctest_internal" fullname="QDoc.Test.DocTest.doctest_internal" href="qml-qdoc-test-doctest.html#doctest_internal-prop" status="internal" access="public" documented="true" type="int" attached="false" writable="true"/>
+ <qmlproperty name="name" fullname="QDoc.Test.DocTest.name" href="qml-qdoc-test-doctest.html#name-prop" status="active" access="public" documented="true" type="string" attached="false" writable="true"/>
+ </qmlclass>
+ <namespace name="TestQDoc" href="testqdoc.html" status="active" access="public" location="testcpp.h" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="32" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="34" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="39" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="40" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="41" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="38" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="45" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="46" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="36" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="37" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="42" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="49" 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" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput\testcpp.h" lineno="51" documented="true" meta="plain" virtual="virtual" const="false" static="false" final="false" override="true" type="void" signature="void virtualFun() override"/>
+ </class>
+ </namespace>
+ <qmlclass name="Type" qml-module-name="QDoc.Test" fullname="QDoc.Test.Type" href="qml-qdoc-test-type.html" status="active" access="public" documented="true" title="Type" fulltitle="Type" subtitle="" brief="A QML type documented in a .cpp file">
+ <function name="completed" fullname="QDoc.Test.Type.completed" href="qml-qdoc-test-type.html#completed-signal" status="active" access="public" documented="true" meta="qmlsignal"/>
+ <function name="configured" fullname="QDoc.Test.Type.configured" href="qml-qdoc-test-type.html#configured-signal" status="active" access="public" documented="true" meta="qmlsignal"/>
+ <function name="copy" fullname="QDoc.Test.Type.copy" href="qml-qdoc-test-type.html#copy-method" status="active" access="public" documented="true" meta="qmlmethod"/>
+ <function name="disable" fullname="QDoc.Test.Type.disable" href="qml-qdoc-test-type.html#disable-method" status="active" access="public" meta="qmlmethod"/>
+ <function name="enable" fullname="QDoc.Test.Type.enable" href="qml-qdoc-test-type.html#enable-method" status="active" access="public" meta="qmlmethod"/>
+ <qmlproperty name="fifth" fullname="QDoc.Test.Type.fifth" href="qml-qdoc-test-type.html#fifth-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true" brief="A group of properties sharing a documentation comment"/>
+ <qmlproperty name="fourth" fullname="QDoc.Test.Type.fourth" href="qml-qdoc-test-type.html#fourth-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true" brief="A group of properties sharing a documentation comment"/>
+ <qmlproperty name="group.first" fullname="QDoc.Test.Type.group.first" href="qml-qdoc-test-type.html#group.first-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true" brief="A property group"/>
+ <qmlproperty name="group.second" fullname="QDoc.Test.Type.group.second" href="qml-qdoc-test-type.html#group.second-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true" brief="A property group"/>
+ <qmlproperty name="group.third" fullname="QDoc.Test.Type.group.third" href="qml-qdoc-test-type.html#group.third-prop" status="active" access="public" documented="true" type="int" attached="false" writable="true" brief="A property group"/>
+ <qmlproperty name="id" fullname="QDoc.Test.Type.id" href="qml-qdoc-test-type.html#id-prop" status="active" access="public" documented="true" type="int" attached="false" writable="false" brief="A read-only property"/>
+ <qmlproperty name="name" fullname="QDoc.Test.Type.name" href="qml-qdoc-test-type.html#name-prop" status="active" access="public" documented="true" type="string" attached="false" writable="true" brief="Name of the Test"/>
+ <qmlproperty name="type" fullname="QDoc.Test.Type.type" href="qml-qdoc-test-type.html#type-attached-prop" status="active" access="public" documented="true" type="enumeration" attached="true" writable="true"/>
+ </qmlclass>
+ <page name="index.html" href="index.html" status="active" location="includefromparent.qdoc" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/includefromparent.qdoc" lineno="29" documented="true" subtype="page" title="doc index" fulltitle="doc index" subtitle="" module="Test">
+ <contents name="c-classes" title="C++ Classes" level="1"/>
+ <contents name="qml-types" title="QML Types" level="1"/>
+ </page>
+ <qmlbasictype name="int" href="qml-int.html" status="active" access="public" location="parent.qdoc" filepath="C:/qt5/qttools/tests/auto/qdoc/generatedoutput/qml/parent.qdoc" lineno="54" documented="true"/>
+ <group name="qmltypes" href="qmltypes.html" status="internal" seen="false" title="" members="AbstractParent"/>
+ <module name="TestCPP" href="testcpp-module.html" status="active" documented="true" seen="true" title="QDoc Test C++ Classes" module="Test" members="TestQDoc,Test,TestDerived" brief="A test module page"/>
+ <qmlmodule name="QDoc.Test" qml-module-name="QDoc.Test" qml-module-version="1.1" href="qdoc-test-qmlmodule.html" status="active" documented="true" seen="true" title="" module="Test" members="DocTest,AbstractParent,Child,int,Type" brief="QML Types for the Test module"/>
+ </namespace>
+</INDEX>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testcpp-module.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testcpp-module.html
new file mode 100644
index 000000000..b1301b5d0
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testcpp-module.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- testcpp.cpp -->
+ <title>QDoc Test C++ Classes | Test</title>
+</head>
+<body>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#namespaces">Namespaces</a></li>
+<li class="level1"><a href="#classes">Classes</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">QDoc Test C++ Classes</h1>
+<span class="subtitle"></span>
+<!-- $$$TestCPP-brief -->
+<p>A test module page. <a href="#details">More...</a></p>
+<!-- @@@TestCPP -->
+<a name="namespaces"></a>
+<h2 id="namespaces">Namespaces</h2>
+<div class="table"><table class="annotated">
+<tr class="odd topAlign"><td class="tblName"><p><a href="testqdoc.html">TestQDoc</a></p></td><td class="tblDescr"><p>A namespace</p></td></tr>
+</table></div>
+<a name="classes"></a>
+<h2 id="classes">Classes</h2>
+<div class="table"><table class="annotated">
+<tr class="odd topAlign"><td class="tblName"><p><a href="testqdoc-test.html">TestQDoc::Test</a></p></td><td class="tblDescr"><p>A class in a namespace</p></td></tr>
+<tr class="even topAlign"><td class="tblName"><p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p></td><td class="tblDescr"><p>A derived class in a namespace</p></td></tr>
+</table></div>
+<!-- $$$TestCPP-description -->
+<a name="details"></a>
+<div class="descr">
+<h2 id="details">Detailed Description</h2>
+</div>
+<!-- @@@TestCPP -->
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test-members.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test-members.html
new file mode 100644
index 000000000..6f3ca0ff5
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test-members.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- testcpp.cpp -->
+ <title>List of All Members for Test | Test</title>
+</head>
+<body>
+<li>Test</li>
+<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">List of All Members for Test</h1>
+<p>This is the complete list of members for <a href="testqdoc-test.html">TestQDoc::Test</a>, including inherited members.</p>
+<ul>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b></span>()</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#overload">overload</a></b></span>()</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#overload-1">overload</a></b></span>(bool )</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b></span>(int ) : int</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b></span>(int , bool )</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b></span>()</li>
+</ul>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test-obsolete.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test-obsolete.html
new file mode 100644
index 000000000..088c2ee99
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test-obsolete.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- testcpp.cpp -->
+ <title>Obsolete Members for Test | Test</title>
+</head>
+<body>
+<li>Test</li>
+<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">Obsolete Members for Test</h1>
+<p><b>The following members of class <a href="testqdoc-test.html">Test</a> are obsolete.</b> They are provided to keep old source code working. We strongly advise against using them in new code.</p>
+<h2>Public Functions</h2>
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test-obsolete.html#anotherObsoleteMember">anotherObsoleteMember</a></b>()</td></tr>
+<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test-obsolete.html#deprecatedMember">deprecatedMember</a></b>()</td></tr>
+<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test-obsolete.html#obsoleteMember">obsoleteMember</a></b>()</td></tr>
+</table></div>
+<h2>Member Function Documentation</h2>
+<!-- $$$anotherObsoleteMember[overload1]$$$anotherObsoleteMember -->
+<h3 class="fn" id="anotherObsoleteMember"><a name="anotherObsoleteMember"></a><span class="type">void</span> Test::<span class="name">anotherObsoleteMember</span>()</h3>
+<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
+<p>Use <a href="testqdoc-test-obsolete.html#obsoleteMember">obsoleteMember</a>() instead.</p>
+<!-- @@@anotherObsoleteMember -->
+<!-- $$$deprecatedMember[overload1]$$$deprecatedMember -->
+<h3 class="fn" id="deprecatedMember"><a name="deprecatedMember"></a><span class="type">void</span> Test::<span class="name">deprecatedMember</span>()</h3>
+<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
+<p>Use <a href="testqdoc-test.html#someFunction">someFunction</a>() instead.</p>
+<!-- @@@deprecatedMember -->
+<!-- $$$obsoleteMember[overload1]$$$obsoleteMember -->
+<h3 class="fn" id="obsoleteMember"><a name="obsoleteMember"></a><span class="type">void</span> Test::<span class="name">obsoleteMember</span>()</h3>
+<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
+<p>Use <a href="testqdoc-test.html#someFunction">someFunction</a>() instead.</p>
+<!-- @@@obsoleteMember -->
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test.html
new file mode 100644
index 000000000..53db06685
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-test.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- testcpp.cpp -->
+ <title>Test Class | Test</title>
+</head>
+<body>
+<li>Test</li>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#public-functions">Public Functions</a></li>
+<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
+<li class="level1"><a href="#macros">Macros</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">Test Class</h1>
+<span class="small-subtitle">(<a href="testqdoc-test.html">TestQDoc::Test</a>)<br/></span>
+<!-- $$$Test-brief -->
+<p>A class in a namespace. <a href="#details">More...</a></p>
+<!-- @@@Test -->
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span>
+</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiated By:</td><td class="memItemRight bottomAlign"> <a href="qml-qdoc-test-type.html">Type</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
+</td></tr></table></div><ul>
+<li><a href="testqdoc-test-members.html">List of all members, including inherited members</a></li>
+<li><a href="testqdoc-test-obsolete.html">Obsolete members</a></li>
+</ul>
+<a name="public-functions"></a>
+<h2 id="public-functions">Public Functions</h2>
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b>()</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b>(int <i>v</i>)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b>(int <i>i</i>, bool <i>b</i> = false)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b>()</td></tr>
+</table></div>
+<a name="protected-functions"></a>
+<h2 id="protected-functions">Protected Functions</h2>
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#overload">overload</a></b>()</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#overload-1">overload</a></b>(bool <i>b</i>)</td></tr>
+</table></div>
+<a name="macros"></a>
+<h2 id="macros">Macros</h2>
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#QDOCTEST_MACRO2">QDOCTEST_MACRO2</a></b>(<i>x</i>)</td></tr>
+</table></div>
+<a name="details"></a>
+<!-- $$$Test-description -->
+<div class="descr">
+<h2 id="details">Detailed Description</h2>
+</div>
+<!-- @@@Test -->
+<div class="func">
+<h2>Member Function Documentation</h2>
+<!-- $$$ -->
+<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>
+<!-- @@@ -->
+<!-- $$$inlineFunction[overload1]$$$inlineFunction -->
+<h3 class="fn" id="inlineFunction"><a name="inlineFunction"></a><span class="type">void</span> Test::<span class="name">inlineFunction</span>()</h3>
+<p>An inline function, documented using the \fn QDoc command.</p>
+<!-- @@@inlineFunction -->
+<!-- $$$someFunction[overload1]$$$someFunctionint -->
+<h3 class="fn" id="someFunction"><a name="someFunction"></a><span class="type">int</span> Test::<span class="name">someFunction</span>(<span class="type">int</span> <i>v</i>)</h3>
+<p>Function that takes a parameter <i>v</i>. Also returns the value of <i>v</i>.</p>
+<!-- @@@someFunction -->
+<!-- $$$someFunctionDefaultArg[overload1]$$$someFunctionDefaultArgintbool -->
+<h3 class="fn" id="someFunctionDefaultArg"><a name="someFunctionDefaultArg"></a><span class="type">void</span> Test::<span class="name">someFunctionDefaultArg</span>(<span class="type">int</span> <i>i</i>, <span class="type">bool</span> <i>b</i> = false)</h3>
+<p>Function that takes a parameter <i>i</i> and <i>b</i>.</p>
+<!-- @@@someFunctionDefaultArg -->
+<!-- $$$virtualFun[overload1]$$$virtualFun -->
+<h3 class="fn" id="virtualFun"><a name="virtualFun"></a><code>[virtual] </code><span class="type">void</span> Test::<span class="name">virtualFun</span>()</h3>
+<p>Function that must be reimplemented.</p>
+<!-- @@@virtualFun -->
+</div>
+<div class="macros">
+<h2>Macro Documentation</h2>
+<!-- $$$QDOCTEST_MACRO2[overload1]$$$QDOCTEST_MACRO2 -->
+<h3 class="fn" id="QDOCTEST_MACRO2"><a name="QDOCTEST_MACRO2"></a><span class="name">QDOCTEST_MACRO2</span>(<i>x</i>)</h3>
+<p>A macro with argument <i>x</i>.</p>
+<p>This function was introduced in Test 1.1.</p>
+<!-- @@@QDOCTEST_MACRO2 -->
+</div>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-testderived-members.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-testderived-members.html
new file mode 100644
index 000000000..0babbbd5f
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-testderived-members.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- testcpp.cpp -->
+ <title>List of All Members for TestDerived | Test</title>
+</head>
+<body>
+<li>TestDerived</li>
+<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">List of All Members for TestDerived</h1>
+<p>This is the complete list of members for <a href="testqdoc-testderived.html">TestQDoc::TestDerived</a>, including inherited members.</p>
+<ul>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b></span>()</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#overload">overload</a></b></span>()</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#overload-1">overload</a></b></span>(bool )</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b></span>(int ) : int</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b></span>(int , bool )</li>
+<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#virtualFun">virtualFun</a></b></span>()</li>
+</ul>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-testderived.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-testderived.html
new file mode 100644
index 000000000..8f7517cd3
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc-testderived.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- testcpp.cpp -->
+ <title>TestDerived Class | Test</title>
+</head>
+<body>
+<li>TestDerived</li>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">TestDerived Class</h1>
+<span class="small-subtitle">(<a href="testqdoc-testderived.html">TestQDoc::TestDerived</a>)<br/></span>
+<!-- $$$TestDerived-brief -->
+<p>A derived class in a namespace. <a href="#details">More...</a></p>
+<!-- @@@TestDerived -->
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestDerived&gt;</span>
+</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="testqdoc-test.html">TestQDoc::Test</a></td></tr></table></div><ul>
+<li><a href="testqdoc-testderived-members.html">List of all members, including inherited members</a></li>
+</ul>
+<a name="reimplemented-public-functions"></a>
+<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#virtualFun">virtualFun</a></b>() override</td></tr>
+</table></div>
+<a name="details"></a>
+<!-- $$$TestDerived-description -->
+<div class="descr">
+<h2 id="details">Detailed Description</h2>
+</div>
+<!-- @@@TestDerived -->
+<div class="func">
+<h2>Member Function Documentation</h2>
+<!-- $$$virtualFun[overload1]$$$virtualFun -->
+<h3 class="fn" id="virtualFun"><a name="virtualFun"></a><code>[override virtual] </code><span class="type">void</span> TestDerived::<span class="name">virtualFun</span>()</h3>
+<p>Reimplements: <a href="testqdoc-test.html#virtualFun">Test::virtualFun</a>().</p>
+<!-- @@@virtualFun -->
+</div>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc.html
new file mode 100644
index 000000000..9c6f5b6ae
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/testqdoc.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- testcpp.cpp -->
+ <title>TestQDoc Namespace | Test</title>
+</head>
+<body>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#classes">Classes</a></li>
+<li class="level1"><a href="#macros">Macros</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+<li class="level2"><a href="#usage">Usage</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">TestQDoc Namespace</h1>
+<!-- $$$TestQDoc-brief -->
+<p>A namespace. <a href="#details">More...</a></p>
+<!-- @@@TestQDoc -->
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestCPP&gt;</span>
+</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div><ul>
+</ul>
+<a name="classes"></a>
+<h2 id="classes">Classes</h2>
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html">Test</a></b></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html">TestDerived</a></b></td></tr>
+</table></div>
+<a name="macros"></a>
+<h2 id="macros">Macros</h2>
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc.html#QDOCTEST_MACRO">QDOCTEST_MACRO</a></b></td></tr>
+</table></div>
+<a name="details"></a>
+<!-- $$$TestQDoc-description -->
+<div class="descr">
+<h2 id="details">Detailed Description</h2>
+<a name="usage"></a>
+<h3 id="usage">Usage</h3>
+<p>This namespace is for testing QDoc output.</p>
+</div>
+<!-- @@@TestQDoc -->
+<div class="classes">
+<h2>Classes</h2>
+<h3> class <a href="testqdoc-test.html">Test</a></h3><!-- $$$Test-brief -->
+<p>A class in a namespace. <a href="testqdoc-test.html#details">More...</a></p>
+<!-- @@@Test -->
+<h3> class <a href="testqdoc-testderived.html">TestDerived</a></h3><!-- $$$TestDerived-brief -->
+<p>A derived class in a namespace. <a href="testqdoc-testderived.html#details">More...</a></p>
+<!-- @@@TestDerived -->
+</div>
+<div class="macros">
+<h2>Macro Documentation</h2>
+<!-- $$$QDOCTEST_MACRO[overload1]$$$QDOCTEST_MACRO -->
+<h3 class="fn" id="QDOCTEST_MACRO"><a name="QDOCTEST_MACRO"></a><span class="name">QDOCTEST_MACRO</span></h3>
+<!-- @@@QDOCTEST_MACRO -->
+</div>
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-abstractparent.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-abstractparent.html
index 949dc7868..3668112ee 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-abstractparent.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-abstractparent.html
@@ -46,7 +46,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="children-prop">
<td class="tblQmlPropNode"><p>
-<span class="qmldefault">[default] </span><span class="name">children</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qdoc-test-child.html">Child</a></span>&gt;</p></td></tr>
+<a name="children-prop"></a><span class="qmldefault">[default] </span><span class="name">children</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qdoc-test-child.html">Child</a></span>&gt;</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Children of the type.</p>
</div></div><!-- @@@children -->
@@ -57,7 +57,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="rear-method">
<td class="tblQmlFuncNode"><p>
-<span class="type">void</span> <span class="name">rear</span>(<i>child</i>)</p></td></tr>
+<a name="rear-method"></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 -->
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-child.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-child.html
index 5ba40c99c..22f38cc9c 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-child.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-child.html
@@ -46,7 +46,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="children-prop">
<td class="tblQmlPropNode"><p>
-<span class="qmldefault">[default] </span><span class="name">children</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qdoc-test-child.html">Child</a></span>&gt;</p></td></tr>
+<a name="children-prop"></a><span class="qmldefault">[default] </span><span class="name">children</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-qdoc-test-child.html">Child</a></span>&gt;</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Children of the type.</p>
</div></div><!-- @@@children -->
@@ -57,7 +57,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="rear-method">
<td class="tblQmlFuncNode"><p>
-<span class="type">void</span> <span class="name">rear</span>(<i>child</i>)</p></td></tr>
+<a name="rear-method"></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 -->
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html
index a88d935be..e1475d5fb 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html
@@ -50,7 +50,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="active-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">active</span> : <span class="type">bool</span></p></td></tr>
+<a name="active-prop"></a><span class="name">active</span> : <span class="type">bool</span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Whether the test is active.</p>
<p><b>See also </b><a href="qml-qdoc-test-doctest.html#name-prop">name</a>.</p>
@@ -61,7 +61,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="name-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">name</span> : <span class="type">string</span></p></td></tr>
+<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Name of the test.</p>
<pre class="qml"><span class="type"><a href="qml-qdoc-test-doctest.html">DocTest</a></span> {
@@ -76,7 +76,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="fail-method">
<td class="tblQmlFuncNode"><p>
-<span class="name">fail</span>(<i>message</i> = &quot;oops&quot;)</p></td></tr>
+<a name="fail-method"></a><span class="name">fail</span>(<i>message</i> = &quot;oops&quot;)</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Fails the current test case, with the optional <i>message</i>.</p>
<p>This method was introduced in QDoc.Test 1.0.</p>
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 363a4bf16..166cbee81 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
@@ -75,10 +75,10 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="fifth-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">fifth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="fifth-prop"></a><span class="name">fifth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
<tr valign="top" class="odd" id="fourth-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">fourth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="fourth-prop"></a><span class="name">fourth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
</table></div></div>
</div><div class="qmldoc"><p>A group of properties sharing a documentation comment.</p>
</div></div><!-- @@@ -->
@@ -86,16 +86,16 @@
<!-- $$$group -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
-<tr valign="top" class="even" id="group-prop"><th class="centerAlign"><p><b>group group</b></p></th></tr>
+<tr valign="top" class="even" id="group-prop"><th class="centerAlign"><p><a name="group-prop"></a><b>group group</b></p></th></tr>
<tr valign="top" class="odd" id="group.first-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">group.first</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="group.first-prop"></a><span class="name">group.first</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
<tr valign="top" class="odd" id="group.second-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">group.second</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="group.second-prop"></a><span class="name">group.second</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
<tr valign="top" class="odd" id="group.third-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">group.third</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="group.third-prop"></a><span class="name">group.third</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>A property group.</p>
</div></div><!-- @@@group -->
@@ -105,7 +105,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="id-prop">
<td class="tblQmlPropNode"><p>
-<span class="qmlreadonly">[read-only] </span><span class="name">id</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="id-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">id</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>A read-only property.</p>
</div></div><!-- @@@id -->
@@ -115,7 +115,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="name-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">name</span> : <span class="type">string</span></p></td></tr>
+<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Name of the Test.</p>
</div></div><!-- @@@name -->
@@ -126,7 +126,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="type-attached-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">Type.type</span> : <span class="type">enumeration</span></p></td></tr>
+<a name="type-attached-prop"></a><span class="name">Type.type</span> : <span class="type">enumeration</span></p></td></tr>
</table></div></div>
<div class="qmldoc"><div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>Type.NoType</code></td><td class="topAlign">Nothing</td></tr>
@@ -140,7 +140,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="completed-signal">
<td class="tblQmlFuncNode"><p>
-<span class="name">completed</span>(<i>status</i>)</p></td></tr>
+<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>
</div></div><!-- @@@completed -->
@@ -151,7 +151,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="configured-signal">
<td class="tblQmlFuncNode"><p>
-<span class="name">configured</span>()</p></td></tr>
+<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>
</div></div><!-- @@@configured -->
@@ -163,10 +163,10 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="disable-method">
<td class="tblQmlFuncNode"><p>
-<span class="name">disable</span>()</p></td></tr>
+<a name="disable-method"></a><span class="name">disable</span>()</p></td></tr>
<tr valign="top" class="odd" id="enable-method">
<td class="tblQmlFuncNode"><p>
-<span class="name">enable</span>()</p></td></tr>
+<a name="enable-method"></a><span class="name">enable</span>()</p></td></tr>
</table></div></div>
</div><div class="qmldoc"><p>Enables or disables this type.</p>
</div></div><!-- @@@ -->
@@ -176,7 +176,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="copy-method">
<td class="tblQmlFuncNode"><p>
-<span class="type"><a href="qml-qdoc-test-type.html">Type</a></span> <span class="name">copy</span>(<i>a</i>)</p></td></tr>
+<a name="copy-method"></a><span class="type"><a href="qml-qdoc-test-type.html">Type</a></span> <span class="name">copy</span>(<i>a</i>)</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Returns another Type based on <i>a</i>.</p>
</div></div><!-- @@@copy -->
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-progressbar.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-progressbar.html
index 6cfe36a83..a1b43ea9d 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-progressbar.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-progressbar.html
@@ -46,7 +46,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="color-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">color</span> : <span class="type">color</span></p></td></tr>
+<a name="color-prop"></a><span class="name">color</span> : <span class="type">color</span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>The color of the <a href="qml-uicomponents-progressbar.html">ProgressBar</a>'s gradient. Must bind to a color type.</p>
<p><b>See also </b><a href="qml-uicomponents-progressbar.html#secondColor-prop">secondColor</a>.</p>
@@ -57,7 +57,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="maximum-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">maximum</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="maximum-prop"></a><span class="name">maximum</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>The maximum value of the <a href="qml-uicomponents-progressbar.html">ProgressBar</a> range. The <a href="qml-uicomponents-progressbar.html#value-prop">value</a> must not be more than this value.</p>
</div></div><!-- @@@maximum -->
@@ -67,7 +67,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="minimum-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">minimum</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="minimum-prop"></a><span class="name">minimum</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>The minimum value of the <a href="qml-uicomponents-progressbar.html">ProgressBar</a> range. The <a href="qml-uicomponents-progressbar.html#value-prop">value</a> must not be less than this value.</p>
</div></div><!-- @@@minimum -->
@@ -77,7 +77,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="secondColor-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">secondColor</span> : <span class="type">color</span></p></td></tr>
+<a name="secondColor-prop"></a><span class="name">secondColor</span> : <span class="type">color</span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>The second color of the <a href="qml-uicomponents-progressbar.html">ProgressBar</a>'s gradient. Must bind to a color type.</p>
<p><b>See also </b><a href="qml-uicomponents-progressbar.html#color-prop">color</a>.</p>
@@ -88,7 +88,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="value-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">value</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="value-prop"></a><span class="name">value</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>The value of the progress.</p>
</div></div><!-- @@@value -->
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-switch.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-switch.html
index 5ebae4905..fadb1a531 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-switch.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-switch.html
@@ -48,7 +48,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="on-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">on</span> : <span class="type">bool</span></p></td></tr>
+<a name="on-prop"></a><span class="name">on</span> : <span class="type">bool</span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Indicates the state of the switch. If <code>false</code>, then the switch is in the <code>off</code> state.</p>
</div></div><!-- @@@on -->
@@ -59,7 +59,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="toggle-method">
<td class="tblQmlFuncNode"><p>
-<span class="name">toggle</span>()</p></td></tr>
+<a name="toggle-method"></a><span class="name">toggle</span>()</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>A method to toggle the switch. If the switch is <code>on</code>, the toggling it will turn it <code>off</code>. Toggling a switch in the <code>off</code> position will turn it <code>on</code>.</p>
</div></div><!-- @@@toggle -->
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-tabwidget.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-tabwidget.html
index 2c48e1ddd..1b2421722 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-tabwidget.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-uicomponents-tabwidget.html
@@ -62,7 +62,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="current-prop">
<td class="tblQmlPropNode"><p>
-<span class="name">current</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="current-prop"></a><span class="name">current</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>The currently active tab in the <a href="qml-uicomponents-tabwidget.html">TabWidget</a>.</p>
</div></div><!-- @@@current -->
@@ -72,7 +72,7 @@
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="sampleReadOnlyProperty-prop">
<td class="tblQmlPropNode"><p>
-<span class="qmlreadonly">[read-only] </span><span class="name">sampleReadOnlyProperty</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
+<a name="sampleReadOnlyProperty-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">sampleReadOnlyProperty</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>A sample <code>read-only</code> property. A contrived property to demonstrate QDoc's ability to detect read-only properties.</p>
<p>The signature is:</p>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html b/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html
index faf632bea..8b792090f 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html
@@ -19,6 +19,9 @@
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QML Documentation Example</h1>
<span class="subtitle"></span>
+<!-- $$$componentset-brief -->
+<p>Example for documenting QML types.</p>
+<!-- @@@componentset -->
<!-- $$$componentset-description -->
<div class="descr"> <a name="details"></a>
<p>This example demonstrates one of the ways to document QML types.</p>
@@ -42,6 +45,13 @@ An aliased property of type <span class="type">int</span><span class="operator">
<a name="qml-types-with-c-implementation"></a>
<h4 id="qml-types-with-c-implementation">QML Types with C++ Implementation</h4>
<p>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.</p>
+<p>Files:</p>
+<ul>
+<li><a href="test-componentset-progressbar-qml.html">componentset/ProgressBar.qml</a></li>
+<li><a href="test-componentset-switch-qml.html">componentset/Switch.qml</a></li>
+<li><a href="test-componentset-tabwidget-qml.html">componentset/TabWidget.qml</a></li>
+<li><a href="test-componentset-componentset-pro.html">componentset/componentset.pro</a></li>
+</ul>
</div>
<!-- @@@componentset -->
</body>
diff --git a/tests/auto/qdoc/generatedoutput/generatedoutput.pro b/tests/auto/qdoc/generatedoutput/generatedoutput.pro
index 81434cebc..be9377bec 100644
--- a/tests/auto/qdoc/generatedoutput/generatedoutput.pro
+++ b/tests/auto/qdoc/generatedoutput/generatedoutput.pro
@@ -5,5 +5,3 @@ TARGET = tst_generatedOutput
SOURCES += \
tst_generatedoutput.cpp
-
-QMAKE_DOCS = $$PWD/test.qdocconf
diff --git a/tests/auto/qdoc/generatedoutput/includefromexampledirs/excludes/anotherindex.qdoc b/tests/auto/qdoc/generatedoutput/includefromexampledirs/excludes/anotherindex.qdoc
new file mode 100644
index 000000000..75dd9197d
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/includefromexampledirs/excludes/anotherindex.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+/*!
+//! exampledirs-include
+ \page index.html
+ \title doc index
+
+ \section1 C++ Classes
+ \generatelist {classesbymodule TestCPP}
+ \section1 QML Types
+ \annotatedlist qmltypes
+//! exampledirs-include
+*/
diff --git a/tests/auto/qdoc/generatedoutput/includefromexampledirs/excludes/parentinclude.qdoc b/tests/auto/qdoc/generatedoutput/includefromexampledirs/excludes/parentinclude.qdoc
new file mode 100644
index 000000000..c95e22125
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/includefromexampledirs/excludes/parentinclude.qdoc
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+/*!
+//! abstract-type
+ \qmltype AbstractParent
+ \ingroup qmltypes
+ \qmlabstract
+ \brief Abstract base QML type.
+//! abstract-type
+*/
+
+/*!
+//! children-qmlproperty
+ \qmlproperty list<Child> AbstractParent::children
+ \default
+ \brief Children of the type.
+//! children-qmlproperty
+*/
+
+/*!
+//! rear-qmlmethod
+ \qmlmethod void AbstractParent::rear(Child child)
+ \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/includefromexampledirs/includefromexampledirs.qdocconf b/tests/auto/qdoc/generatedoutput/includefromexampledirs/includefromexampledirs.qdocconf
new file mode 100644
index 000000000..05683c80b
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/includefromexampledirs/includefromexampledirs.qdocconf
@@ -0,0 +1,12 @@
+include(../testqml.qdocconf)
+
+includepaths += ..
+sourcedirs += src
+
+excludedirs += excludes \
+ ../qml/componentset
+
+exampledirs += excludes
+
+HTML.nosubdirs = true
+HTML.outputsubdir = includefromexampledirs
diff --git a/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/includefromparent.qdoc b/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/includefromparent.qdoc
new file mode 100644
index 000000000..7b4c00b76
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/includefromparent.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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 anotherindex.qdoc exampledirs-include
+
+\include parent.qdocinc
+*/
+
+/*!
+\include parentinclude.qdoc abstract-type
+
+\include parent.qdocinc
+*/
+
+/*!
+\include parentinclude.qdoc children-qmlproperty
+
+\include parent.qdocinc
+*/
+
+/*!
+\include parentinclude.qdoc rear-qmlmethod
+
+\include parent.qdocinc
+*/
diff --git a/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/parent.qdocinc b/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/parent.qdocinc
new file mode 100644
index 000000000..307c39dbd
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/includefromexampledirs/src/parent.qdocinc
@@ -0,0 +1 @@
+Test include file that is part of the sourcedirs.
diff --git a/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc b/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc
index 7c780eca8..2f56c221c 100644
--- a/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc
+++ b/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc
@@ -28,6 +28,10 @@
/*!
\example componentset
\title QML Documentation Example
+ \brief Example for documenting QML types.
+
+ \meta tag {test,sample}
+ \meta installpath tutorials
This example demonstrates one of the ways to document QML types.
diff --git a/tests/auto/qdoc/generatedoutput/testqml.qdocconf b/tests/auto/qdoc/generatedoutput/testqml.qdocconf
index c469bde06..f618fe1b8 100644
--- a/tests/auto/qdoc/generatedoutput/testqml.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testqml.qdocconf
@@ -16,5 +16,7 @@ excludedirs = ./bug80259
sources.fileextensions = "*.qml *.cpp *.qdoc"
headers.fileextensions = "*.h"
+examples.fileextensions = "*.qml"
+
macro.begincomment = "\\c{/*}"
macro.QDocTestVer = "1.1"
diff --git a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
index f1c0b892e..4cab6a8fd 100644
--- a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
+++ b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
@@ -63,6 +63,7 @@ private slots:
void dontDocument();
void inheritedQmlPropertyGroups();
void crossModuleLinking();
+ void includeFromExampleDirs();
private:
QScopedPointer<QTemporaryDir> m_outputDir;
@@ -334,6 +335,14 @@ void tst_generatedOutput::crossModuleLinking()
indexDir.toLatin1().data());
}
+void tst_generatedOutput::includeFromExampleDirs()
+{
+ testAndCompare("includefromexampledirs/includefromexampledirs.qdocconf",
+ "includefromexampledirs/index.html "
+ "includefromexampledirs/qml-qdoc-test-abstractparent.html "
+ "includefromexampledirs/qml-qdoc-test-abstractparent-members.html");
+}
+
QTEST_APPLESS_MAIN(tst_generatedOutput)
#include "tst_generatedoutput.moc"