summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-16 03:03:39 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-16 03:03:39 +0100
commit01b12aabdc40a2d2c3f38fc03dfde9659458491b (patch)
tree0279b09360b904f2df67890d04321f53b3bd9995 /src
parent0916f2dfd6df25e90d350775ac938749b04007a9 (diff)
parent2b6c90317b6bc5f94ca0dc14a3a1467aa8019b17 (diff)
downloadqttools-01b12aabdc40a2d2c3f38fc03dfde9659458491b.tar.gz
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I577c86f95e65e7bfae1e92e9fd33356a6301f89b
Diffstat (limited to 'src')
-rw-r--r--src/assistant/help/qhelpfilterdata.cpp2
-rw-r--r--src/designer/src/designer/doc/src/qtdesigner-module.qdoc5
-rw-r--r--src/designer/src/lib/sdk/abstractpromotioninterface.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_formwindowmanager.cpp1
-rw-r--r--src/designer/src/lib/uilib/abstractformbuilder.cpp2
-rw-r--r--src/qdoc/atom.h6
-rw-r--r--src/qdoc/clangcodeparser.cpp2
-rw-r--r--src/qdoc/clangcodeparser.h2
-rw-r--r--src/qdoc/cppcodeparser.h6
-rw-r--r--src/qdoc/doc/images/windowsvista-toolbutton.pngbin0 -> 981 bytes
-rw-r--r--src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc9
-rw-r--r--src/qdoc/doc/qdoc-manual-topiccmds.qdoc6
-rw-r--r--src/qdoc/generator.cpp6
-rw-r--r--src/qdoc/generator.h2
-rw-r--r--src/qdoc/main.cpp12
-rw-r--r--src/qdoc/node.h12
-rw-r--r--src/qdoc/parameters.h10
-rw-r--r--src/qdoc/puredocparser.h2
-rw-r--r--src/qdoc/qdocdatabase.h22
-rw-r--r--src/qdoc/qdocindexfiles.h4
-rw-r--r--src/qdoc/qdoctagfiles.h4
-rw-r--r--src/qdoc/sections.h14
-rw-r--r--src/qdoc/tree.h10
-rw-r--r--src/qdoc/webxmlgenerator.cpp30
-rw-r--r--src/qdoc/webxmlgenerator.h3
25 files changed, 87 insertions, 87 deletions
diff --git a/src/assistant/help/qhelpfilterdata.cpp b/src/assistant/help/qhelpfilterdata.cpp
index 37b209541..b90aeb6c8 100644
--- a/src/assistant/help/qhelpfilterdata.cpp
+++ b/src/assistant/help/qhelpfilterdata.cpp
@@ -107,7 +107,7 @@ QHelpFilterData &QHelpFilterData::operator=(const QHelpFilterData &) = default;
QHelpFilterData &QHelpFilterData::operator=(QHelpFilterData &&) = default;
/*!
- \fn void QHelpFilterData::swap(QCompressedHelpInfo &other)
+ \fn void QHelpFilterData::swap(QHelpFilterData &other)
Swaps the filter \a other with this filter. This
operation is very fast and never fails.
diff --git a/src/designer/src/designer/doc/src/qtdesigner-module.qdoc b/src/designer/src/designer/doc/src/qtdesigner-module.qdoc
index eaf816f42..b13f2ae9f 100644
--- a/src/designer/src/designer/doc/src/qtdesigner-module.qdoc
+++ b/src/designer/src/designer/doc/src/qtdesigner-module.qdoc
@@ -46,3 +46,8 @@
\snippet plugins/doc_src_qtdesigner.pro 1
*/
+
+/*!
+ \namespace qdesigner_internal
+ \internal
+*/
diff --git a/src/designer/src/lib/sdk/abstractpromotioninterface.cpp b/src/designer/src/lib/sdk/abstractpromotioninterface.cpp
index 90f820330..7443d5cf8 100644
--- a/src/designer/src/lib/sdk/abstractpromotioninterface.cpp
+++ b/src/designer/src/lib/sdk/abstractpromotioninterface.cpp
@@ -56,7 +56,7 @@ QDesignerPromotionInterface::~QDesignerPromotionInterface()
*/
/*!
- \fn virtual QDesignerPromotionInterface::PromotedClasses promotedClasses() const
+ \fn QDesignerPromotionInterface::PromotedClasses QDesignerPromotionInterface::promotedClasses() const
Returns a list of promoted classes along with their base classes in alphabetical order.
It can be used to populate tree models for editing promoted widgets.
diff --git a/src/designer/src/lib/shared/qdesigner_formwindowmanager.cpp b/src/designer/src/lib/shared/qdesigner_formwindowmanager.cpp
index 91332b0ec..243a2cac7 100644
--- a/src/designer/src/lib/shared/qdesigner_formwindowmanager.cpp
+++ b/src/designer/src/lib/shared/qdesigner_formwindowmanager.cpp
@@ -38,6 +38,7 @@ using namespace qdesigner_internal;
/*!
\class qdesigner_internal::QDesignerFormWindowManager
\inmodule QtDesigner
+ \internal
Extends QDesignerFormWindowManagerInterface with methods to control
the preview and printing of forms. It provides a facade that simplifies
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp
index c6b7b2375..04e3fd1de 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -1043,7 +1043,7 @@ QActionGroup *QAbstractFormBuilder::createActionGroup(QObject *parent, const QSt
Therefore, you should remove properties that are not required from your
resulting XML files, before loading them. Alternatively, if you already
know which properties you want to save when you call this method,
- you can overload \l computeProperties() and return a filtered list of
+ you can overload \c computeProperties() and return a filtered list of
required properties. Otherwise, unexpected behavior may occur as some
of these properties may depend on each other.
diff --git a/src/qdoc/atom.h b/src/qdoc/atom.h
index 70a639158..9ad1d2b7a 100644
--- a/src/qdoc/atom.h
+++ b/src/qdoc/atom.h
@@ -198,7 +198,7 @@ public:
virtual const QString &error() { return noError_; }
virtual void resolveSquareBracketParams() { }
- protected:
+protected:
static QString noError_;
Atom *next_;
AtomType type_;
@@ -207,7 +207,7 @@ public:
class LinkAtom : public Atom
{
- public:
+public:
LinkAtom(const QString &p1, const QString &p2);
LinkAtom(const LinkAtom &t);
LinkAtom(Atom *previous, const LinkAtom &t);
@@ -221,7 +221,7 @@ class LinkAtom : public Atom
const QString &error() override { return error_; }
void resolveSquareBracketParams() override;
- protected:
+protected:
bool resolved_;
Node::Genus genus_;
Node::NodeType goal_;
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp
index 475becf4d..5d95c9c7e 100644
--- a/src/qdoc/clangcodeparser.cpp
+++ b/src/qdoc/clangcodeparser.cpp
@@ -899,6 +899,8 @@ void ClangVisitor::parseProperty(const QString &spelling, const Location &loc)
QString signature = spelling.mid(lpIdx + 1, rpIdx - lpIdx - 1);
signature = signature.simplified();
QStringList part = signature.split(QChar(' '));
+ if (part.first() == QLatin1String("enum"))
+ part.takeFirst(); // QTBUG-80027
if (part.size() < 2)
return;
QString type = part.at(0);
diff --git a/src/qdoc/clangcodeparser.h b/src/qdoc/clangcodeparser.h
index e0ca2fba1..b47c5f79c 100644
--- a/src/qdoc/clangcodeparser.h
+++ b/src/qdoc/clangcodeparser.h
@@ -63,7 +63,7 @@ public:
void precompileHeaders() override;
Node *parseFnArg(const Location &location, const QString &fnArg) override;
- private:
+private:
void getDefaultArgs();
bool getMoreArgs();
void buildPCH();
diff --git a/src/qdoc/cppcodeparser.h b/src/qdoc/cppcodeparser.h
index c6d6ca788..d6b1cead0 100644
--- a/src/qdoc/cppcodeparser.h
+++ b/src/qdoc/cppcodeparser.h
@@ -85,15 +85,15 @@ protected:
void processTopicArgs(const Doc &doc, const QString &topic, NodeList &nodes, DocList &docs);
bool hasTooManyTopics(const Doc &doc) const;
- private:
+private:
void setExampleFileLists(PageNode *pn);
- protected:
+protected:
typedef bool (Node::*NodeTypeTestFunc) () const;
QMap<QString, NodeTypeTestFunc> nodeTypeTestFuncMap_;
QMap<QString, Node::NodeType> nodeTypeMap_;
- private:
+private:
static QStringList exampleFiles;
static QStringList exampleDirs;
static QSet<QString> excludeDirs;
diff --git a/src/qdoc/doc/images/windowsvista-toolbutton.png b/src/qdoc/doc/images/windowsvista-toolbutton.png
new file mode 100644
index 000000000..0baa9809c
--- /dev/null
+++ b/src/qdoc/doc/images/windowsvista-toolbutton.png
Binary files differ
diff --git a/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc b/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
index fd6dc7a75..201706b70 100644
--- a/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
+++ b/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
@@ -541,26 +541,21 @@
For example, if a type called \c TabWidget is in the \c UIComponents
module, it must be linked as \c {UIComponents::TabWidget}.
- The \l{componentset}{UIComponents} example demonstrates proper usage of
- QDoc commands to document QML types and QML modules.
-
\section3 Read-only and Internal QML Properties
QDoc detects QML properties that are marked as \c readonly. Note that the
property must be initialized with a value.
- \code
+ \badcode
readonly property int sampleReadOnlyProperty: 0
\endcode
- For example, the example \l{TabWidget} type has a fictitious read-only
- property \c sampleReadOnlyProperty. Its declaration has the \c readonly
- identifier and it has an initial value.
Properties and signals that are not meant for the public interface may
be marked with the \l{internal-command}{\\internal} command. QDoc will not
publish the documentation in the generated outputs.
\section1 Articles & Overviews
+
Articles and overviews are a style of writing best used for providing
summary detail on a topic or concept. It may introduce a technology or
discuss how a concept may be applied, but without discussing exact steps
diff --git a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
index 4e80f8f12..5c3de3a98 100644
--- a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
@@ -1365,9 +1365,6 @@
responds to a \c clicked() event.
\endcode
- The \l{componentset}{UIComponents} example demonstrates proper usage of
- QDoc commands to document QML types and QML modules.
-
\target inqmlmodule-command
\section1 \\inqmlmodule
@@ -1387,9 +1384,6 @@
To link to the \c ClickableButton, use the
\c{\l ClickableComponents::ClickableButton} format.
- The \l{componentset}{UIComponents} example demonstrates proper usage of
- QDoc commands to document QML types and QML modules.
-
The \l {noautolist-command} {\\noautolist} command can be used here
to omit the automatically generated list of types at the end.
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index fb02f3cc9..39c629465 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -1235,14 +1235,14 @@ void Generator::generateDocumentation(Node *node)
*/
void Generator::generateMaintainerList(const Aggregate *node, CodeMarker *marker)
{
- QStringList sl = getMetadataElements(node,"maintainer");
+ QStringList sl = getMetadataElements(node, "maintainer");
if (!sl.isEmpty()) {
Text text;
text << Atom::ParaLeft
- << Atom(Atom::FormattingLeft,ATOM_FORMATTING_BOLD)
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
<< "Maintained by: "
- << Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD);
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD);
for (int i = 0; i < sl.size(); ++i)
text << sl.at(i) << separator(i, sl.size());
diff --git a/src/qdoc/generator.h b/src/qdoc/generator.h
index f9bb4d53b..f90c82315 100644
--- a/src/qdoc/generator.h
+++ b/src/qdoc/generator.h
@@ -239,7 +239,7 @@ private:
const QString &configVar,
const QString &subDir);
- protected:
+protected:
const Config *config_;
QDocDatabase *qdb_;
bool inLink_;
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp
index 48166257d..c6552129f 100644
--- a/src/qdoc/main.cpp
+++ b/src/qdoc/main.cpp
@@ -128,8 +128,11 @@ static void loadIndexFiles(Config &config, const QSet<QString> &formats)
Add all subdirectories of the indexdirs as dependModules,
when an asterisk is used in the 'depends' list.
*/
+ bool asteriskUsed = false;
if (config.dependModules().contains("*")) {
config.dependModules().removeOne("*");
+ asteriskUsed = true;
+ Location::logToStdErrAlways("qdocconf file has depends = *; loading all index files found");
for (int i = 0; i < config.indexDirs().size(); i++) {
QDir scanDir = QDir(config.indexDirs()[i]);
scanDir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
@@ -183,7 +186,7 @@ static void loadIndexFiles(Config &config, const QSet<QString> &formats)
if (!indexFiles.contains(indexToAdd))
indexFiles << indexToAdd;
}
- else {
+ else if (!asteriskUsed) {
Location::null.warning(QString("\"%1\" Cannot locate index file for dependency \"%2\"").arg(
config.getString(CONFIG_PROJECT), config.dependModules()[i]));
}
@@ -336,8 +339,11 @@ static void processQdocconfFile(const QString &fileName, Config &config)
else
clangParser_->setModuleHeader(project);
- config.dependModules() = config.getStringList(CONFIG_DEPENDS);
- config.dependModules().removeDuplicates();
+ // Retrieve the dependencies if loadIndexFiles() was not called
+ if (config.dependModules().isEmpty()) {
+ config.dependModules() = config.getStringList(CONFIG_DEPENDS);
+ config.dependModules().removeDuplicates();
+ }
qdb->setSearchOrder(config.dependModules());
// Store the title of the index (landing) page
diff --git a/src/qdoc/node.h b/src/qdoc/node.h
index 0b6eb9e62..baec4d9f2 100644
--- a/src/qdoc/node.h
+++ b/src/qdoc/node.h
@@ -426,10 +426,10 @@ public:
void setOutputFileName(const QString &f) override { outputFileName_ = f; }
QString outputFileName() const override { return outputFileName_; }
- protected:
+protected:
friend class Node;
- protected:
+protected:
bool noAutoList_;
QString title_;
QString subtitle_;
@@ -508,7 +508,7 @@ private:
void adoptFunction(FunctionNode *fn);
static bool isSameSignature(const FunctionNode *f1, const FunctionNode *f2);
- protected:
+protected:
NodeList children_;
NodeList relatedByProxy_;
@@ -518,14 +518,14 @@ private:
NodeMap nonfunctionMap_;
NodeList nonfunctionList_;
- protected:
+protected:
int functionCount_;
FunctionMap functionMap_;
};
class ProxyNode : public Aggregate
{
- public:
+public:
ProxyNode(Aggregate *parent, const QString &name);
bool docMustBeGenerated() const override { return true; }
bool isRelatableType() const override { return true; }
@@ -634,7 +634,7 @@ public:
PropertyNode *findOverriddenProperty(const FunctionNode *fn);
bool docMustBeGenerated() const override;
- private:
+private:
void promotePublicBases(const QList<RelatedClass> &bases);
private:
diff --git a/src/qdoc/parameters.h b/src/qdoc/parameters.h
index db704426f..dcd4517eb 100644
--- a/src/qdoc/parameters.h
+++ b/src/qdoc/parameters.h
@@ -41,7 +41,7 @@ class CodeChunk;
class Parameter
{
- public:
+public:
Parameter() {}
Parameter(const QString &type,
const QString &name = QString(),
@@ -65,7 +65,7 @@ class Parameter
QString signature(bool includeValue = false) const;
- public:
+public:
QString type_;
QString name_;
QString defaultValue_;
@@ -75,7 +75,7 @@ typedef QVector<Parameter> ParameterVector;
class Parameters
{
- public:
+public:
Parameters();
Parameters(const QString &signature);
@@ -102,7 +102,7 @@ class Parameters
void getTypeAndNameList(QString &out) const;
bool match(const Parameters &parameters) const;
- private:
+private:
void readToken();
QString lexeme();
QString previousLexeme();
@@ -112,7 +112,7 @@ class Parameters
bool matchParameter();
bool parse(const QString &signature);
- private:
+private:
static QRegExp varComment_;
bool valid_;
diff --git a/src/qdoc/puredocparser.h b/src/qdoc/puredocparser.h
index 7d814e982..67824f399 100644
--- a/src/qdoc/puredocparser.h
+++ b/src/qdoc/puredocparser.h
@@ -48,7 +48,7 @@ public:
static PureDocParser *pureDocParser() { return pureParser_; }
- private:
+private:
bool processQdocComments();
static PureDocParser *pureParser_;
Tokenizer *tokenizer_;
diff --git a/src/qdoc/qdocdatabase.h b/src/qdoc/qdocdatabase.h
index 28b1cea83..1ff3aff15 100644
--- a/src/qdoc/qdocdatabase.h
+++ b/src/qdoc/qdocdatabase.h
@@ -54,7 +54,7 @@ enum FindFlag {
class QDocForest
{
- private:
+private:
friend class QDocDatabase;
QDocForest(QDocDatabase *qdb)
: qdb_(qdb), primaryTree_(nullptr), currentIndex_(0) { }
@@ -197,7 +197,7 @@ class QDocForest
void setPrimaryTree(const QString &t);
NamespaceNode *newIndexTree(const QString &module);
- private:
+private:
QDocDatabase *qdb_;
Tree *primaryTree_;
int currentIndex_;
@@ -211,7 +211,7 @@ class QDocDatabase
{
Q_DECLARE_TR_FUNCTIONS(QDoc::QDocDatabase)
- public:
+public:
static QDocDatabase *qdocDB();
static void destroyQdocDB();
~QDocDatabase();
@@ -261,7 +261,7 @@ class QDocDatabase
static NodeMapMap &newQmlTypeMaps() { return newQmlTypeMaps_; }
static NodeMultiMapMap &newSinceMaps() { return newSinceMaps_; }
- private:
+private:
void findAllClasses(Aggregate *node) { node->findAllClasses(); }
void findAllFunctions(Aggregate *node) { node->findAllFunctions(functionIndex_); }
void findAllAttributions(Aggregate *node) { node->findAllAttributions(attributions_); }
@@ -269,7 +269,7 @@ class QDocDatabase
void findAllObsoleteThings(Aggregate *node) { node->findAllObsoleteThings(); }
void findAllSince(Aggregate *node) { node->findAllSince(); }
- public:
+public:
/*******************************************************************
special collection access functions
********************************************************************/
@@ -334,7 +334,7 @@ class QDocDatabase
FunctionNode *findFunctionNodeForTag(QString tag) { return primaryTree()->findFunctionNodeForTag(tag); }
FunctionNode *findMacroNode(const QString &t) { return primaryTree()->findMacroNode(t); }
- private:
+private:
const Node *findNodeForTarget(QStringList &targetPath,
const Node *relative,
Node::Genus genus,
@@ -349,7 +349,7 @@ class QDocDatabase
}
/*******************************************************************/
- public:
+public:
void addPropertyFunction(PropertyNode *property,
const QString &funcName,
PropertyNode::FunctionRole funcRole) {
@@ -402,7 +402,7 @@ class QDocDatabase
void resolveProxies();
void resolveBaseClasses();
- private:
+private:
friend class Tree;
const Node *findNode(const QStringList &path,
@@ -415,16 +415,16 @@ class QDocDatabase
bool isLoaded(const QString &t) { return forest_.isLoaded(t); }
static void initializeDB();
- private:
+private:
QDocDatabase();
QDocDatabase(QDocDatabase const &) : showInternal_(false), forest_(this) { }
QDocDatabase& operator=(QDocDatabase const &);
- public:
+public:
static bool debug;
Tree *primaryTree() { return forest_.primaryTree(); }
- private:
+private:
static QDocDatabase *qdocDB_;
static NodeMap typeNodeMap_;
static NodeMultiMap obsoleteClasses_;
diff --git a/src/qdoc/qdocindexfiles.h b/src/qdoc/qdocindexfiles.h
index a93df774a..0e758049a 100644
--- a/src/qdoc/qdocindexfiles.h
+++ b/src/qdoc/qdocindexfiles.h
@@ -56,7 +56,7 @@ class QDocIndexFiles
friend class QDocDatabase;
friend class WebXMLGenerator; // for using generateIndexSections()
- private:
+private:
static QDocIndexFiles* qdocIndexFiles();
static void destroyQDocIndexFiles();
@@ -75,7 +75,7 @@ class QDocIndexFiles
bool generateIndexSection(QXmlStreamWriter &writer, Node *node, IndexSectionWriter *post = nullptr);
void generateIndexSections(QXmlStreamWriter &writer, Node *node, IndexSectionWriter *post = nullptr);
- private:
+private:
static QDocIndexFiles* qdocIndexFiles_;
QDocDatabase *qdb_;
Generator *gen_;
diff --git a/src/qdoc/qdoctagfiles.h b/src/qdoc/qdoctagfiles.h
index e1b8b5f73..05ad628d4 100644
--- a/src/qdoc/qdoctagfiles.h
+++ b/src/qdoc/qdoctagfiles.h
@@ -41,7 +41,7 @@ class QDocTagFiles
{
friend class QDocDatabase;
- private:
+private:
static QDocTagFiles *qdocTagFiles();
static void destroyQDocTagFiles();
@@ -52,7 +52,7 @@ class QDocTagFiles
void generateTagFileMembers(QXmlStreamWriter &writer, const Aggregate *inner);
void generateTagFile(const QString &fileName, Generator *g);
- private:
+private:
static QDocTagFiles *qdocTagFiles_;
QDocDatabase *qdb_;
Generator *gen_;
diff --git a/src/qdoc/sections.h b/src/qdoc/sections.h
index 92c2cdd2b..d9aeeb28f 100644
--- a/src/qdoc/sections.h
+++ b/src/qdoc/sections.h
@@ -45,11 +45,11 @@ typedef QList<ClassKeysNodes *> ClassKeysNodesList;
class Section
{
- public:
+public:
enum Style { Summary, Details, AllMembers, Accessors };
enum Status { Obsolete, Active };
- public:
+public:
Section() : style_(Details), status_(Active), aggregate_(nullptr) { }
Section(Style style, Status status);
~Section();
@@ -108,10 +108,10 @@ class Section
const Aggregate *aggregate() const { return aggregate_; }
void setAggregate(Aggregate *t) { aggregate_ = t; }
- private:
+private:
QString sortName(const Node *node, const QString *name = nullptr);
- private:
+private:
Style style_;
Status status_;
QString title_;
@@ -139,7 +139,7 @@ typedef QVector<const Section *> SectionPtrVector;
class Sections
{
- public:
+public:
enum VectorIndex {
AllMembers = 0,
PublicTypes = 0,
@@ -228,7 +228,7 @@ class Sections
Aggregate *aggregate() const { return aggregate_; }
- private:
+private:
void stdRefPageSwitch(SectionVector &v, Node *n, Node *t = nullptr);
void distributeNodeInSummaryVector(SectionVector &sv, Node *n);
void distributeNodeInDetailsVector(SectionVector &dv, Node *n);
@@ -236,7 +236,7 @@ class Sections
void distributeQmlNodeInSummaryVector(SectionVector &sv, Node *n, bool sharing = false);
void initAggregate(SectionVector &v, Aggregate *aggregate);
- private:
+private:
Aggregate *aggregate_;
static SectionVector stdSummarySections_;
diff --git a/src/qdoc/tree.h b/src/qdoc/tree.h
index b9b507f97..0d56425dc 100644
--- a/src/qdoc/tree.h
+++ b/src/qdoc/tree.h
@@ -44,7 +44,7 @@ class QDocDatabase;
struct TargetRec
{
- public:
+public:
enum TargetType { Unknown, Target, Keyword, Contents, Class, Function, Page, Subtitle };
TargetRec(const QString &name,
@@ -71,7 +71,7 @@ struct TargetRec
struct TargetLoc
{
- public:
+public:
TargetLoc(const Node *loc, const QString &t, const QString &fileName, const QString &text, bool broken)
: loc_(loc), target_(t), fileName_(fileName), text_(text), broken_(broken) { }
const Node *loc_;
@@ -93,14 +93,14 @@ class Tree
friend class QDocForest;
friend class QDocDatabase;
- private: // Note the constructor and destructor are private.
+private: // Note the constructor and destructor are private.
typedef QMap<PropertyNode::FunctionRole, QString> RoleMap;
typedef QMap<PropertyNode *, RoleMap> PropertyMap;
Tree(const QString &camelCaseModuleName, QDocDatabase *qdb);
~Tree();
- public: // Of necessity, a few public functions remain.
+public: // Of necessity, a few public functions remain.
const QString &camelCaseModuleName() const { return camelCaseModuleName_; }
const QString &physicalModuleName() const { return physicalModuleName_; }
const QString &indexFileName() const { return indexFileName_; }
@@ -114,7 +114,7 @@ class Tree
void addToDontDocumentMap(QString &arg);
void markDontDocumentNodes();
- private: // The rest of the class is private.
+private: // The rest of the class is private.
Aggregate *findAggregate(const QString &name);
Node *findNodeForInclude(const QStringList &path) const;
ClassNode *findClassNode(const QStringList &path, const Node *start = nullptr) const;
diff --git a/src/qdoc/webxmlgenerator.cpp b/src/qdoc/webxmlgenerator.cpp
index 89c8c093f..be19eb435 100644
--- a/src/qdoc/webxmlgenerator.cpp
+++ b/src/qdoc/webxmlgenerator.cpp
@@ -765,7 +765,10 @@ void WebXMLGenerator::startLink(QXmlStreamWriter &writer, const Atom *atom,
fullName = node->fullName();
if (!fullName.isEmpty() && !link.isEmpty()) {
writer.writeStartElement("link");
- writer.writeAttribute("raw", atom->string());
+ if (!atom->string().isEmpty())
+ writer.writeAttribute("raw", atom->string());
+ else
+ writer.writeAttribute("raw", fullName);
writer.writeAttribute("href", link);
writer.writeAttribute("type", targetType(node));
if (node) {
@@ -801,6 +804,13 @@ void WebXMLGenerator::startLink(QXmlStreamWriter &writer, const Atom *atom,
}
}
+void WebXMLGenerator::endLink(QXmlStreamWriter &writer) {
+ if (inLink) {
+ writer.writeEndElement(); // link
+ inLink = false;
+ }
+}
+
QString WebXMLGenerator::targetType(const Node *node)
{
if (!node)
@@ -895,7 +905,9 @@ void WebXMLGenerator::generateAnnotatedList(QXmlStreamWriter &writer,
writer.writeStartElement("row");
writer.writeStartElement("item");
writer.writeStartElement("para");
- generateFullName(writer, node, relative);
+ const QString link = linkForNode(node, relative);
+ startLink(writer, node->doc().body().firstAtom(), node, link);
+ endLink(writer);
writer.writeEndElement(); // para
writer.writeEndElement(); // item
@@ -909,20 +921,6 @@ void WebXMLGenerator::generateAnnotatedList(QXmlStreamWriter &writer,
writer.writeEndElement(); // table
}
-void WebXMLGenerator::generateFullName(QXmlStreamWriter &writer,
- const Node *node, const Node *relative)
-{
- QString type = targetType(node);
- QString name = node->fullName(relative);
- writer.writeStartElement("link");
- writer.writeAttribute("href", fullDocumentLocation(node));
- writer.writeAttribute("type", type);
- if (type == QLatin1String("page"))
- writer.writeAttribute("page", name);
- writer.writeCharacters(name);
- writer.writeEndElement(); // link
-}
-
const QPair<QString,QString> WebXMLGenerator::anchorForNode(const Node *node)
{
QPair<QString,QString> anchorPair;
diff --git a/src/qdoc/webxmlgenerator.h b/src/qdoc/webxmlgenerator.h
index 5e3e0e9e2..320d8169e 100644
--- a/src/qdoc/webxmlgenerator.h
+++ b/src/qdoc/webxmlgenerator.h
@@ -67,11 +67,10 @@ private:
const QPair<QString,QString> anchorForNode(const Node *node);
void generateAnnotatedList(QXmlStreamWriter &writer, const Node *relative, const NodeMap &nodeMap);
void generateAnnotatedList(QXmlStreamWriter &writer, const Node *relative, const NodeList &nodeList);
- void generateFullName(QXmlStreamWriter &writer, const Node *node,
- const Node *relative);
void generateRelations(QXmlStreamWriter &writer, const Node *node);
void startLink(QXmlStreamWriter &writer, const Atom *atom, const Node *node,
const QString &link);
+ void endLink(QXmlStreamWriter &writer);
QString targetType(const Node *node);
bool inLink;