summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2019-08-07 20:37:57 +0200
committerPaul Wicking <paul.wicking@qt.io>2019-08-08 07:23:16 +0200
commit455bda44cb83b622fddd5954bf27c61a99bf2eba (patch)
tree6df4dd58025ba85e6baa39fa3bb819dba3aa1eca
parent000f678697fcc8c5512f4ae96c2a49eea9ba8066 (diff)
QDoc: Clean up whitespace
Ensure that QDoc conforms to Qt style, whitespace edition. For the most part, the change involves moving the pointer operators. Also remove whitespace following an opening parenthesis, or immediately preceding a closing one. In some cases, adjust the following line accordingly in methods that span multiple lines. Change-Id: I56ae125a2acf09c669c0a73dc814d05f13575f39 Reviewed-by: Martin Smith <martin.smith@qt.io>
-rw-r--r--src/qdoc/atom.cpp24
-rw-r--r--src/qdoc/atom.h56
-rw-r--r--src/qdoc/clangcodeparser.cpp74
-rw-r--r--src/qdoc/clangcodeparser.h6
-rw-r--r--src/qdoc/codechunk.cpp10
-rw-r--r--src/qdoc/codechunk.h22
-rw-r--r--src/qdoc/codemarker.cpp26
-rw-r--r--src/qdoc/codemarker.h52
-rw-r--r--src/qdoc/codeparser.cpp20
-rw-r--r--src/qdoc/codeparser.h30
-rw-r--r--src/qdoc/config.cpp80
-rw-r--r--src/qdoc/config.h70
-rw-r--r--src/qdoc/cppcodemarker.cpp18
-rw-r--r--src/qdoc/cppcodemarker.h16
-rw-r--r--src/qdoc/cppcodeparser.cpp76
-rw-r--r--src/qdoc/cppcodeparser.h28
-rw-r--r--src/qdoc/doc.cpp118
-rw-r--r--src/qdoc/doc.h56
-rw-r--r--src/qdoc/editdistance.cpp18
-rw-r--r--src/qdoc/editdistance.h4
-rw-r--r--src/qdoc/generator.cpp138
-rw-r--r--src/qdoc/generator.h112
-rw-r--r--src/qdoc/helpprojectwriter.cpp32
-rw-r--r--src/qdoc/helpprojectwriter.h12
-rw-r--r--src/qdoc/htmlgenerator.cpp218
-rw-r--r--src/qdoc/htmlgenerator.h56
-rw-r--r--src/qdoc/location.cpp32
-rw-r--r--src/qdoc/location.h40
-rw-r--r--src/qdoc/main.cpp12
-rw-r--r--src/qdoc/node.cpp410
-rw-r--r--src/qdoc/node.h446
-rw-r--r--src/qdoc/openedlist.cpp72
-rw-r--r--src/qdoc/openedlist.h14
-rw-r--r--src/qdoc/puredocparser.cpp6
-rw-r--r--src/qdoc/puredocparser.h2
-rw-r--r--src/qdoc/qdocdatabase.cpp298
-rw-r--r--src/qdoc/qdocdatabase.h330
-rw-r--r--src/qdoc/qdocindexfiles.cpp142
-rw-r--r--src/qdoc/qdocindexfiles.h12
-rw-r--r--src/qdoc/qdoctagfiles.cpp20
-rw-r--r--src/qdoc/qdoctagfiles.h14
-rw-r--r--src/qdoc/qmlcodemarker.cpp6
-rw-r--r--src/qdoc/qmlcodeparser.cpp4
-rw-r--r--src/qdoc/qmlcodeparser.h6
-rw-r--r--src/qdoc/qmlmarkupvisitor.cpp2
-rw-r--r--src/qdoc/qmlvisitor.cpp50
-rw-r--r--src/qdoc/qmlvisitor.h6
-rw-r--r--src/qdoc/quoter.cpp104
-rw-r--r--src/qdoc/quoter.h22
-rw-r--r--src/qdoc/sections.cpp56
-rw-r--r--src/qdoc/sections.h46
-rw-r--r--src/qdoc/separator.h4
-rw-r--r--src/qdoc/text.cpp50
-rw-r--r--src/qdoc/text.h16
-rw-r--r--src/qdoc/tokenizer.cpp6
-rw-r--r--src/qdoc/tokenizer.h8
-rw-r--r--src/qdoc/tree.cpp94
-rw-r--r--src/qdoc/tree.h180
-rw-r--r--src/qdoc/webxmlgenerator.cpp4
-rw-r--r--src/qdoc/yyindent.cpp318
60 files changed, 2102 insertions, 2102 deletions
diff --git a/src/qdoc/atom.cpp b/src/qdoc/atom.cpp
index 4cae4cb29..a739b0b69 100644
--- a/src/qdoc/atom.cpp
+++ b/src/qdoc/atom.cpp
@@ -238,27 +238,27 @@ static const struct {
{ nullptr, 0 }
};
-/*! \fn Atom::Atom(AtomType type, const QString& string)
+/*! \fn Atom::Atom(AtomType type, const QString &string)
Constructs an atom of the specified \a type with the single
parameter \a string and does not put the new atom in a list.
*/
-/*! \fn Atom::Atom(AtomType type, const QString& p1, const QString& p2)
+/*! \fn Atom::Atom(AtomType type, const QString &p1, const QString &p2)
Constructs an atom of the specified \a type with the two
parameters \a p1 and \a p2 and does not put the new atom
in a list.
*/
-/*! \fn Atom(Atom *previous, AtomType type, const QString& string)
+/*! \fn Atom(Atom *previous, AtomType type, const QString &string)
Constructs an atom of the specified \a type with the single
parameter \a string and inserts the new atom into the list
after the \a previous atom.
*/
-/*! \fn Atom::Atom(Atom* previous, AtomType type, const QString& p1, const QString& p2)
+/*! \fn Atom::Atom(Atom *previous, AtomType type, const QString &p1, const QString &p2)
Constructs an atom of the specified \a type with the two
parameters \a p1 and \a p2 and inserts the new atom into
@@ -272,7 +272,7 @@ static const struct {
\also string()
*/
-/*! \fn void Atom::appendString(const QString& string)
+/*! \fn void Atom::appendString(const QString &string)
Appends \a string to the string parameter of this atom.
@@ -293,7 +293,7 @@ static const struct {
Return the next Atom in the list if it is of AtomType \a t.
Otherwise return 0.
*/
-const Atom* Atom::next(AtomType t) const
+const Atom *Atom::next(AtomType t) const
{
return (next_ && (next_->type() == t)) ? next_ : nullptr;
}
@@ -302,7 +302,7 @@ const Atom* Atom::next(AtomType t) const
Return the next Atom in the list if it is of AtomType \a t
and its string part is \a s. Otherwise return 0.
*/
-const Atom* Atom::next(AtomType t, const QString& s) const
+const Atom *Atom::next(AtomType t, const QString &s) const
{
return (next_ && (next_->type() == t) && (next_->string() == s)) ? next_ : nullptr;
}
@@ -345,7 +345,7 @@ QString Atom::typeString() const
return QLatin1String(atms[i].english);
}
-/*! \fn const QString& Atom::string() const
+/*! \fn const QString &Atom::string() const
Returns the string parameter that together with the type
characterizes this atom.
@@ -379,7 +379,7 @@ void Atom::dump() const
words separated by spaces. The constructor splits \a p2 on
the space character.
*/
-LinkAtom::LinkAtom(const QString& p1, const QString& p2)
+LinkAtom::LinkAtom(const QString &p1, const QString &p2)
: Atom(p1),
resolved_(false),
genus_(Node::DontCare),
@@ -400,7 +400,7 @@ void LinkAtom::resolveSquareBracketParams()
if (resolved_)
return;
QStringList params = squareBracketParams_.toLower().split(QLatin1Char(' '));
- foreach (const QString& p, params) {
+ foreach (const QString &p, params) {
if (!domain_) {
domain_ = QDocDatabase::qdocDB()->findTree(p);
if (domain_) {
@@ -433,7 +433,7 @@ void LinkAtom::resolveSquareBracketParams()
/*!
Standard copy constructor of LinkAtom \a t.
*/
-LinkAtom::LinkAtom(const LinkAtom& t)
+LinkAtom::LinkAtom(const LinkAtom &t)
: Atom(Link, t.string()),
resolved_(t.resolved_),
genus_(t.genus_),
@@ -450,7 +450,7 @@ LinkAtom::LinkAtom(const LinkAtom& t)
where the new LinkAtom will not be the first one
in the list.
*/
-LinkAtom::LinkAtom(Atom* previous, const LinkAtom& t)
+LinkAtom::LinkAtom(Atom *previous, const LinkAtom &t)
: Atom(previous, Link, t.string()),
resolved_(t.resolved_),
genus_(t.genus_),
diff --git a/src/qdoc/atom.h b/src/qdoc/atom.h
index 9e8bab77b..f13d9012a 100644
--- a/src/qdoc/atom.h
+++ b/src/qdoc/atom.h
@@ -134,19 +134,19 @@ public:
friend class LinkAtom;
- Atom(const QString& string)
+ Atom(const QString &string)
: next_(nullptr), type_(Link)
{
strs << string;
}
- Atom(AtomType type, const QString& string = "")
+ Atom(AtomType type, const QString &string = "")
: next_(nullptr), type_(type)
{
strs << string;
}
- Atom(AtomType type, const QString& p1, const QString& p2)
+ Atom(AtomType type, const QString &p1, const QString &p2)
: next_(nullptr), type_(type)
{
strs << p1;
@@ -154,14 +154,14 @@ public:
strs << p2;
}
- Atom(Atom* previous, AtomType type, const QString& string = "")
+ Atom(Atom *previous, AtomType type, const QString &string = "")
: next_(previous->next_), type_(type)
{
strs << string;
previous->next_ = this;
}
- Atom(Atom* previous, AtomType type, const QString& p1, const QString& p2)
+ Atom(Atom *previous, AtomType type, const QString &p1, const QString &p2)
: next_(previous->next_), type_(type)
{
strs << p1;
@@ -173,34 +173,34 @@ public:
virtual ~Atom() { }
void appendChar(QChar ch) { strs[0] += ch; }
- void appendString(const QString& string) { strs[0] += string; }
+ void appendString(const QString &string) { strs[0] += string; }
void chopString() { strs[0].chop(1); }
- void setString(const QString& string) { strs[0] = string; }
- Atom* next() { return next_; }
- void setNext(Atom* newNext) { next_ = newNext; }
+ void setString(const QString &string) { strs[0] = string; }
+ Atom *next() { return next_; }
+ void setNext(Atom *newNext) { next_ = newNext; }
- const Atom* next() const { return next_; }
- const Atom* next(AtomType t) const;
- const Atom* next(AtomType t, const QString& s) const;
+ const Atom *next() const { return next_; }
+ const Atom *next(AtomType t) const;
+ const Atom *next(AtomType t, const QString &s) const;
AtomType type() const { return type_; }
QString typeString() const;
- const QString& string() const { return strs[0]; }
- const QString& string(int i) const { return strs[i]; }
+ const QString &string() const { return strs[0]; }
+ const QString &string(int i) const { return strs[i]; }
int count() const { return strs.size(); }
void dump() const;
- const QStringList& strings() const { return strs; }
+ const QStringList &strings() const { return strs; }
virtual bool isLinkAtom() const { return false; }
virtual Node::Genus genus() { return Node::DontCare; }
virtual bool specifiesDomain() { return false; }
- virtual Tree* domain() { return nullptr; }
+ virtual Tree *domain() { return nullptr; }
virtual Node::NodeType goal() { return Node::NoType; }
- virtual const QString& error() { return noError_; }
+ virtual const QString &error() { return noError_; }
virtual void resolveSquareBracketParams() { }
protected:
static QString noError_;
- Atom* next_;
+ Atom *next_;
AtomType type_;
QStringList strs;
};
@@ -208,26 +208,26 @@ public:
class LinkAtom : public Atom
{
public:
- LinkAtom(const QString& p1, const QString& p2);
- LinkAtom(const LinkAtom& t);
- LinkAtom(Atom* previous, const LinkAtom& t);
+ LinkAtom(const QString &p1, const QString &p2);
+ LinkAtom(const LinkAtom &t);
+ LinkAtom(Atom *previous, const LinkAtom &t);
virtual ~LinkAtom() { }
bool isLinkAtom() const override { return true; }
Node::Genus genus() override { resolveSquareBracketParams(); return genus_; }
bool specifiesDomain() override { resolveSquareBracketParams(); return (domain_ != nullptr); }
- Tree* domain() override { resolveSquareBracketParams(); return domain_; }
+ Tree *domain() override { resolveSquareBracketParams(); return domain_; }
Node::NodeType goal() override { resolveSquareBracketParams(); return goal_; }
- const QString& error() override { return error_; }
+ const QString &error() override { return error_; }
void resolveSquareBracketParams() override;
protected:
- bool resolved_;
+ bool resolved_;
Node::Genus genus_;
- Node::NodeType goal_;
- Tree* domain_;
- QString error_;
- QString squareBracketParams_;
+ Node::NodeType goal_;
+ Tree *domain_;
+ QString error_;
+ QString squareBracketParams_;
};
#define ATOM_FORMATTING_BOLD "bold"
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp
index 827a5cb0b..c9bebd446 100644
--- a/src/qdoc/clangcodeparser.cpp
+++ b/src/qdoc/clangcodeparser.cpp
@@ -92,7 +92,7 @@ static QDebug operator<<(QDebug debug, const std::vector<T> &v)
template <typename T> bool visitChildrenLambda(CXCursor cursor, T &&lambda)
{
CXCursorVisitor visitor = [](CXCursor c, CXCursor , CXClientData client_data) -> CXChildVisitResult
- { return (*static_cast<T*>(client_data))(c); };
+ { return (*static_cast<T *>(client_data))(c); };
return clang_visitChildren(cursor, visitor, &lambda);
}
@@ -218,7 +218,7 @@ static QString reconstructQualifiedPathForCursor(CXCursor cur) {
Find the node from the QDocDatabase \a qdb that corrseponds to the declaration
represented by the cursor \a cur, if it exists.
*/
-static Node *findNodeForCursor(QDocDatabase* qdb, CXCursor cur) {
+static Node *findNodeForCursor(QDocDatabase *qdb, CXCursor cur) {
auto kind = clang_getCursorKind(cur);
if (clang_isInvalid(kind))
return nullptr;
@@ -258,7 +258,7 @@ static Node *findNodeForCursor(QDocDatabase* qdb, CXCursor cur) {
for (Node *candidate : qAsConst(candidates)) {
if (!candidate->isFunction(Node::CPP))
continue;
- auto fn = static_cast<FunctionNode*>(candidate);
+ auto fn = static_cast<FunctionNode *>(candidate);
const Parameters &parameters = fn->parameters();
const int actualArg = numArg - parameters.isPrivateSignal();
if (parameters.count() != actualArg + isVariadic)
@@ -307,7 +307,7 @@ static Node *findNodeForCursor(QDocDatabase* qdb, CXCursor cur) {
corrseponds to the declaration represented by the cursor
\a cur, if it exists.
*/
-static Node *findFunctionNodeForCursor(QDocDatabase* qdb, CXCursor cur) {
+static Node *findFunctionNodeForCursor(QDocDatabase *qdb, CXCursor cur) {
auto kind = clang_getCursorKind(cur);
if (clang_isInvalid(kind))
return nullptr;
@@ -337,7 +337,7 @@ static Node *findFunctionNodeForCursor(QDocDatabase* qdb, CXCursor cur) {
for (Node *candidate : qAsConst(candidates)) {
if (!candidate->isFunction(Node::CPP))
continue;
- auto fn = static_cast<FunctionNode*>(candidate);
+ auto fn = static_cast<FunctionNode *>(candidate);
const Parameters &parameters = fn->parameters();
if (parameters.count() != (numArg + isVariadic))
continue;
@@ -379,7 +379,7 @@ public:
ClangVisitor(QDocDatabase *qdb, const QHash<QString, QString> &allHeaders)
: qdb_(qdb), parent_(qdb->primaryTreeRoot()), allHeaders_(allHeaders) { }
- QDocDatabase* qdocDB() { return qdb_; }
+ QDocDatabase *qdocDB() { return qdb_; }
CXChildVisitResult visitChildren(CXCursor cursor)
{
@@ -412,7 +412,7 @@ public:
Not sure about all the possibilities, when the cursor
location is not in the main file.
*/
- CXChildVisitResult visitFnArg(CXCursor cursor, Node** fnNode, bool &ignoreSignature)
+ CXChildVisitResult visitFnArg(CXCursor cursor, Node **fnNode, bool &ignoreSignature)
{
auto ret = visitChildrenLambda(cursor, [&](CXCursor cur) {
auto loc = clang_getCursorLocation(cur);
@@ -443,7 +443,7 @@ private:
*/
QMap<SimpleLoc, CXCursor> declMap_;
- QDocDatabase* qdb_;
+ QDocDatabase *qdb_;
Aggregate *parent_;
const QHash<QString, QString> allHeaders_;
QHash<CXFile, bool> isInterestingCache_; // doing a canonicalFilePath is slow, so keep a cache.
@@ -483,9 +483,9 @@ private:
CXChildVisitResult visitSource(CXCursor cursor, CXSourceLocation loc);
CXChildVisitResult visitHeader(CXCursor cursor, CXSourceLocation loc);
- CXChildVisitResult visitFnSignature(CXCursor cursor, CXSourceLocation loc, Node** fnNode, bool &ignoreSignature);
+ CXChildVisitResult visitFnSignature(CXCursor cursor, CXSourceLocation loc, Node **fnNode, bool &ignoreSignature);
void parseProperty(const QString &spelling, const Location &loc);
- void readParameterNamesAndAttributes(FunctionNode* fn, CXCursor cursor);
+ void readParameterNamesAndAttributes(FunctionNode *fn, CXCursor cursor);
Aggregate *getSemanticParent(CXCursor cursor);
};
@@ -515,15 +515,15 @@ Aggregate *ClangVisitor::getSemanticParent(CXCursor cursor)
CXCursor sp = clang_getCursorSemanticParent(cursor);
CXCursor lp = clang_getCursorLexicalParent(cursor);
if (!clang_equalCursors(sp, lp) && clang_isDeclaration(clang_getCursorKind(sp))) {
- Node* spn = findNodeForCursor(qdb_, sp);
+ Node *spn = findNodeForCursor(qdb_, sp);
if (spn && spn->isAggregate()) {
- return static_cast<Aggregate*>(spn);
+ return static_cast<Aggregate *>(spn);
}
}
return parent_;
}
-CXChildVisitResult ClangVisitor::visitFnSignature(CXCursor cursor, CXSourceLocation , Node** fnNode, bool &ignoreSignature)
+CXChildVisitResult ClangVisitor::visitFnSignature(CXCursor cursor, CXSourceLocation , Node **fnNode, bool &ignoreSignature)
{
switch (clang_getCursorKind(cursor)) {
case CXCursor_FunctionDecl:
@@ -539,7 +539,7 @@ CXChildVisitResult ClangVisitor::visitFnSignature(CXCursor cursor, CXSourceLocat
} else {
*fnNode = findFunctionNodeForCursor(qdb_, cursor);
if (*fnNode && (*fnNode)->isFunction(Node::CPP)) {
- FunctionNode* fn = static_cast<FunctionNode*>(*fnNode);
+ FunctionNode *fn = static_cast<FunctionNode *>(*fnNode);
readParameterNamesAndAttributes(fn, cursor);
}
}
@@ -564,7 +564,7 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
int lastBlank = typeAlias[0].lastIndexOf(QChar(' '));
if (lastBlank > 0) {
typeAlias[0] = typeAlias[0].right(typeAlias[0].size() - (lastBlank + 1));
- TypeAliasNode* ta = new TypeAliasNode(parent_, typeAlias[0], typeAlias[1]);
+ TypeAliasNode *ta = new TypeAliasNode(parent_, typeAlias[0], typeAlias[1]);
ta->setAccess(fromCX_CXXAccessSpecifier(clang_getCXXAccessSpecifier(cursor)));
ta->setLocation(fromCXSourceLocation(clang_getCursorLocation(cursor)));
}
@@ -586,7 +586,7 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
QString className = fromCXString(clang_getCursorSpelling(cursor));
- Aggregate* semanticParent = getSemanticParent(cursor);
+ Aggregate *semanticParent = getSemanticParent(cursor);
if (semanticParent && semanticParent->findNonfunctionChild(className, &Node::isClassNode)) {
return CXChildVisit_Continue;
}
@@ -618,21 +618,21 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
auto type = clang_getCursorType(cursor);
auto baseCursor = clang_getTypeDeclaration(type);
auto baseNode = findNodeForCursor(qdb_, baseCursor);
- auto classe = static_cast<ClassNode*>(parent_);
+ auto classe = static_cast<ClassNode *>(parent_);
if (baseNode == nullptr || !baseNode->isClassNode()) {
QString bcName = fromCXString(clang_getCursorSpelling(baseCursor));
classe->addUnresolvedBaseClass(access, QStringList(bcName), bcName);
return CXChildVisit_Continue;
}
- auto baseClasse = static_cast<ClassNode*>(baseNode);
+ auto baseClasse = static_cast<ClassNode *>(baseNode);
classe->addResolvedBaseClass(access, baseClasse);
return CXChildVisit_Continue;
}
case CXCursor_Namespace: {
QString namespaceName = fromCXString(clang_getCursorDisplayName(cursor));
- NamespaceNode* ns = nullptr;
+ NamespaceNode *ns = nullptr;
if (parent_)
- ns = static_cast<NamespaceNode*>(parent_->findNonfunctionChild(namespaceName, &Node::isNamespace));
+ ns = static_cast<NamespaceNode *>(parent_->findNonfunctionChild(namespaceName, &Node::isNamespace));
if (!ns) {
ns = new NamespaceNode(parent_, namespaceName);
ns->setAccess(Node::Public);
@@ -655,7 +655,7 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
CXType funcType = clang_getCursorType(cursor);
- FunctionNode* fn = new FunctionNode(parent_, name);
+ FunctionNode *fn = new FunctionNode(parent_, name);
CXSourceRange range = clang_Cursor_getCommentRange(cursor);
if (!clang_Range_isNull(range)) {
@@ -745,7 +745,7 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
Aggregate *ns = parent_;
while (ns && ns->isClassNode())
ns = ns->parent();
- QScopedValueRollback<Aggregate *> setParent(parent_, ns);
+ QScopedValueRollback<Aggregate *>setParent(parent_, ns);
// Visit the friend functions
return visitChildren(cursor);
}
@@ -754,13 +754,13 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
if (findNodeForCursor(qdb_, cursor)) // Was already parsed, propably in another tu
return CXChildVisit_Continue;
QString enumTypeName = fromCXString(clang_getCursorSpelling(cursor));
- EnumNode* en = nullptr;
+ EnumNode *en = nullptr;
if (enumTypeName.isEmpty()) {
enumTypeName = "anonymous";
if (parent_ && (parent_->isClassNode() || parent_->isNamespace())) {
- Node* n = parent_->findNonfunctionChild(enumTypeName, &Node::isEnumType);
+ Node *n = parent_->findNonfunctionChild(enumTypeName, &Node::isEnumType);
if (n)
- en = static_cast<EnumNode*>(n);
+ en = static_cast<EnumNode *>(n);
}
}
if (!en) {
@@ -811,7 +811,7 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
case CXCursor_TypedefDecl: {
if (findNodeForCursor(qdb_, cursor)) // Was already parsed, propably in another translation unit
return CXChildVisit_Continue;
- TypedefNode* td = new TypedefNode(parent_, fromCXString(clang_getCursorSpelling(cursor)));
+ TypedefNode *td = new TypedefNode(parent_, fromCXString(clang_getCursorSpelling(cursor)));
td->setAccess(fromCX_CXXAccessSpecifier(clang_getCXXAccessSpecifier(cursor)));
td->setLocation(fromCXSourceLocation(clang_getCursorLocation(cursor)));
// Search to see if this is a Q_DECLARE_FLAGS (if the type is QFlags<ENUM>)
@@ -825,7 +825,7 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
return CXChildVisit_Continue;
auto *en = findNodeForCursor(qdb_, clang_getTypeDeclaration(clang_getCursorType(cur)));
if (en && en->isEnumType())
- static_cast<EnumNode*>(en)->setFlagsType(td);
+ static_cast<EnumNode *>(en)->setFlagsType(td);
return CXChildVisit_Break;
});
return CXChildVisit_Break;
@@ -846,7 +846,7 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l
}
}
-void ClangVisitor::readParameterNamesAndAttributes(FunctionNode* fn, CXCursor cursor)
+void ClangVisitor::readParameterNamesAndAttributes(FunctionNode *fn, CXCursor cursor)
{
Parameters &parameters = fn->parameters();
// Visit the parameters and attributes
@@ -889,7 +889,7 @@ void ClangVisitor::readParameterNamesAndAttributes(FunctionNode* fn, CXCursor cu
});
}
-void ClangVisitor::parseProperty(const QString& spelling, const Location& loc)
+void ClangVisitor::parseProperty(const QString &spelling, const Location &loc)
{
int lpIdx = spelling.indexOf(QChar('('));
int rpIdx = spelling.lastIndexOf(QChar(')'));
@@ -971,7 +971,7 @@ void ClangVisitor::parseProperty(const QString& spelling, const Location& loc)
must be inbetween.
Returns nullptr if no suitable declaration was found between the two comments.
*/
-Node* ClangVisitor::nodeForCommentAtLocation(CXSourceLocation loc, CXSourceLocation nextCommentLoc)
+Node *ClangVisitor::nodeForCommentAtLocation(CXSourceLocation loc, CXSourceLocation nextCommentLoc)
{
ClangVisitor::SimpleLoc docloc;
clang_getPresumedLocation(loc, nullptr, &docloc.line, &docloc.column);
@@ -1001,7 +1001,7 @@ Node* ClangVisitor::nodeForCommentAtLocation(CXSourceLocation loc, CXSourceLocat
auto *node = findNodeForCursor(qdb_, *decl_it);
// borrow the parameter name from the definition
if (node && node->isFunction(Node::CPP))
- readParameterNamesAndAttributes(static_cast<FunctionNode*>(node), *decl_it);
+ readParameterNamesAndAttributes(static_cast<FunctionNode *>(node), *decl_it);
return node;
}
@@ -1368,7 +1368,7 @@ static float getUnpatchedVersion(QString t)
Call matchDocsAndStuff() to do all the parsing and tree building.
*/
-void ClangCodeParser::parseSourceFile(const Location& /*location*/, const QString& filePath)
+void ClangCodeParser::parseSourceFile(const Location &/*location*/, const QString &filePath)
{
/*
The set of open namespaces is cleared before parsing
@@ -1428,7 +1428,7 @@ void ClangCodeParser::parseSourceFile(const Location& /*location*/, const QStrin
DocList docs;
QString topic;
NodeList nodes;
- const TopicList& topics = doc.topicsUsed();
+ const TopicList &topics = doc.topicsUsed();
if (!topics.isEmpty())
topic = topics[0].topic;
@@ -1479,9 +1479,9 @@ void ClangCodeParser::parseSourceFile(const Location& /*location*/, const QStrin
command. \a location is used for reporting errors. \a fnArg
is the string to parse. It is always a function decl.
*/
-Node* ClangCodeParser::parseFnArg(const Location& location, const QString& fnArg)
+Node *ClangCodeParser::parseFnArg(const Location &location, const QString &fnArg)
{
- Node* fnNode = nullptr;
+ Node *fnNode = nullptr;
/*
If the \fn command begins with a tag, then don't try to
parse the \fn command with clang. Use the tag to search
@@ -1501,7 +1501,7 @@ Node* ClangCodeParser::parseFnArg(const Location& location, const QString& fnArg
parameter names from the \FN command, because
they will be the names used in the documentation.
*/
- FunctionNode* fn = static_cast<FunctionNode*>(fnNode);
+ FunctionNode *fn = static_cast<FunctionNode *>(fnNode);
QStringList leftParenSplit = fnArg.split('(');
if (leftParenSplit.size() > 1) {
QStringList rightParenSplit = leftParenSplit[1].split(')');
@@ -1599,7 +1599,7 @@ Node* ClangCodeParser::parseFnArg(const Location& location, const QString& fnArg
qualifier[i++] = QChar(' ');
if (i > 0)
qualifier = qualifier.simplified();
- ClassNode* cn = qdb_->findClassNode(QStringList(qualifier));
+ ClassNode *cn = qdb_->findClassNode(QStringList(qualifier));
if (cn && cn->isInternal())
report = false;
}
diff --git a/src/qdoc/clangcodeparser.h b/src/qdoc/clangcodeparser.h
index e1c9d7e30..6946cd238 100644
--- a/src/qdoc/clangcodeparser.h
+++ b/src/qdoc/clangcodeparser.h
@@ -53,13 +53,13 @@ class ClangCodeParser : public CppCodeParser
public:
~ClangCodeParser();
- void initializeParser(const Config& config) override;
+ void initializeParser(const Config &config) override;
void terminateParser() override;
QString language() override;
QStringList headerFileNameFilter() override;
QStringList sourceFileNameFilter() override;
- void parseHeaderFile(const Location& location, const QString& filePath) override;
- void parseSourceFile(const Location& location, const QString& filePath) override;
+ void parseHeaderFile(const Location &location, const QString &filePath) override;
+ void parseSourceFile(const Location &location, const QString &filePath) override;
void precompileHeaders() override;
Node *parseFnArg(const Location &location, const QString &fnArg) override;
diff --git a/src/qdoc/codechunk.cpp b/src/qdoc/codechunk.cpp
index 05aa5c444..27f26fdd6 100644
--- a/src/qdoc/codechunk.cpp
+++ b/src/qdoc/codechunk.cpp
@@ -84,7 +84,7 @@ static const bool needSpace[9][9] = {
/* ( */ { false, false, false, false, false, false, false, false, false },
};
-static int category( QChar ch )
+static int category(QChar ch)
{
return charCategory[static_cast<int>(ch.toLatin1())];
}
@@ -120,17 +120,17 @@ static int category( QChar ch )
Appends \a lexeme to the current string contents, inserting
a space if appropriate.
*/
-void CodeChunk::append( const QString& lexeme )
+void CodeChunk::append(const QString &lexeme)
{
- if ( !s.isEmpty() && !lexeme.isEmpty() ) {
+ if (!s.isEmpty() && !lexeme.isEmpty()) {
/*
Should there be a space or not between the code chunk so far and the
new lexeme?
*/
int cat1 = category(s.at(s.size() - 1));
int cat2 = category(lexeme[0]);
- if ( needSpace[cat1][cat2] )
- s += QLatin1Char( ' ' );
+ if (needSpace[cat1][cat2])
+ s += QLatin1Char(' ');
}
s += lexeme;
}
diff --git a/src/qdoc/codechunk.h b/src/qdoc/codechunk.h
index 4f2f5bd0b..b7cda1324 100644
--- a/src/qdoc/codechunk.h
+++ b/src/qdoc/codechunk.h
@@ -43,9 +43,9 @@ class CodeChunk
{
public:
CodeChunk() : hotspot(-1) {}
- CodeChunk(const QString& str) : s(str), hotspot(-1) {}
+ CodeChunk(const QString &str) : s(str), hotspot(-1) {}
- void append( const QString& lexeme );
+ void append(const QString &lexeme);
void appendHotspot() { if (hotspot == -1) hotspot = s.length(); }
bool isEmpty() const { return s.isEmpty(); }
@@ -60,28 +60,28 @@ private:
int hotspot;
};
-inline bool operator==( const CodeChunk& c, const CodeChunk& d ) {
+inline bool operator==(const CodeChunk& c, const CodeChunk& d) {
return c.toString() == d.toString();
}
-inline bool operator!=( const CodeChunk& c, const CodeChunk& d ) {
- return !( c == d );
+inline bool operator!=(const CodeChunk& c, const CodeChunk& d) {
+ return !(c == d);
}
-inline bool operator<( const CodeChunk& c, const CodeChunk& d ) {
+inline bool operator<(const CodeChunk& c, const CodeChunk& d) {
return c.toString() < d.toString();
}
-inline bool operator>( const CodeChunk& c, const CodeChunk& d ) {
+inline bool operator>(const CodeChunk& c, const CodeChunk& d) {
return d < c;
}
-inline bool operator<=( const CodeChunk& c, const CodeChunk& d ) {
- return !( c > d );
+inline bool operator<=(const CodeChunk& c, const CodeChunk& d) {
+ return !(c > d);
}
-inline bool operator>=( const CodeChunk& c, const CodeChunk& d ) {
- return !( c < d );
+inline bool operator>=(const CodeChunk& c, const CodeChunk& d) {
+ return !(c < d);
}
QT_END_NAMESPACE
diff --git a/src/qdoc/codemarker.cpp b/src/qdoc/codemarker.cpp
index a1ef6efef..2579c94e1 100644
--- a/src/qdoc/codemarker.cpp
+++ b/src/qdoc/codemarker.cpp
@@ -66,7 +66,7 @@ CodeMarker::~CodeMarker()
A code market performs no initialization by default. Marker-specific
initialization is performed in subclasses.
*/
-void CodeMarker::initializeMarker(const Config& ) // config
+void CodeMarker::initializeMarker(const Config &) // config
{
}
@@ -82,7 +82,7 @@ void CodeMarker::terminateMarker()
All the code markers in the static list are initialized
here, after the qdoc configuration file has been loaded.
*/
-void CodeMarker::initialize(const Config& config)
+void CodeMarker::initialize(const Config &config)
{
defaultLang = config.getString(CONFIG_LANGUAGE);
QList<CodeMarker *>::ConstIterator m = markers.constBegin();
@@ -104,7 +104,7 @@ void CodeMarker::terminate()
}
}
-CodeMarker *CodeMarker::markerForCode(const QString& code)
+CodeMarker *CodeMarker::markerForCode(const QString &code)
{
CodeMarker *defaultMarker = markerForLanguage(defaultLang);
if (defaultMarker != nullptr && defaultMarker->recognizeCode(code))
@@ -119,7 +119,7 @@ CodeMarker *CodeMarker::markerForCode(const QString& code)
return defaultMarker;
}
-CodeMarker *CodeMarker::markerForFileName(const QString& fileName)
+CodeMarker *CodeMarker::markerForFileName(const QString &fileName)
{
CodeMarker *defaultMarker = markerForLanguage(defaultLang);
int dot = -1;
@@ -138,7 +138,7 @@ CodeMarker *CodeMarker::markerForFileName(const QString& fileName)
return defaultMarker;
}
-CodeMarker *CodeMarker::markerForLanguage(const QString& lang)
+CodeMarker *CodeMarker::markerForLanguage(const QString &lang)
{
QList<CodeMarker *>::ConstIterator m = markers.constBegin();
while (m != markers.constEnd()) {
@@ -149,7 +149,7 @@ CodeMarker *CodeMarker::markerForLanguage(const QString& lang)
return nullptr;
}
-const Node *CodeMarker::nodeForString(const QString& string)
+const Node *CodeMarker::nodeForString(const QString &string)
{
#if QT_POINTER_SIZE == 4
const quintptr n = string.toUInt();
@@ -174,7 +174,7 @@ static const QString slt = QLatin1String("&lt;");
static const QString sgt = QLatin1String("&gt;");
static const QString squot = QLatin1String("&quot;");
-QString CodeMarker::protect(const QString& str)
+QString CodeMarker::protect(const QString &str)
{
int n = str.length();
QString marked;
@@ -260,7 +260,7 @@ QString CodeMarker::typified(const QString &string, bool trailingSpace)
return result;
}
-QString CodeMarker::taggedNode(const Node* node)
+QString CodeMarker::taggedNode(const Node *node)
{
QString tag;
QString name = node->name();
@@ -310,11 +310,11 @@ QString CodeMarker::taggedNode(const Node* node)
+ QLatin1String("</") + tag + QLatin1Char('>'));
}
-QString CodeMarker::taggedQmlNode(const Node* node)
+QString CodeMarker::taggedQmlNode(const Node *node)
{
QString tag;
if (node->isFunction()) {
- const FunctionNode* fn = static_cast<const FunctionNode*>(node);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(node);
switch (fn->metaness()) {
case FunctionNode::JsSignal:
case FunctionNode::QmlSignal:
@@ -341,7 +341,7 @@ QString CodeMarker::taggedQmlNode(const Node* node)
+ QLatin1String("</") + tag + QLatin1Char('>');
}
-QString CodeMarker::linkTag(const Node *node, const QString& body)
+QString CodeMarker::linkTag(const Node *node, const QString &body)
{
return QLatin1String("<@link node=\"") + stringForNode(node)
+ QLatin1String("\">") + body + QLatin1String("</@link>");
@@ -412,9 +412,9 @@ QStringList CodeMarker::macRefsForNode(Node *node)
break;
case Node::Property:
{
- NodeList list = static_cast<const PropertyNode*>(node)->functions();
+ NodeList list = static_cast<const PropertyNode *>(node)->functions();
QStringList stringList;
- foreach (Node* node, list) {
+ foreach (Node *node, list) {
stringList += macRefsForNode(node);
}
return stringList;
diff --git a/src/qdoc/codemarker.h b/src/qdoc/codemarker.h
index dcd8e61bb..b32d2e55a 100644
--- a/src/qdoc/codemarker.h
+++ b/src/qdoc/codemarker.h
@@ -42,35 +42,35 @@ public:
CodeMarker();
virtual ~CodeMarker();
- virtual void initializeMarker(const Config& config);
+ virtual void initializeMarker(const Config &config);
virtual void terminateMarker();
- virtual bool recognizeCode(const QString& /*code*/) { return true; }
- virtual bool recognizeExtension(const QString& /*extension*/) { return true; }
- virtual bool recognizeLanguage(const QString& /*language*/) { return false; }
+ virtual bool recognizeCode(const QString &/*code*/) { return true; }
+ virtual bool recognizeExtension(const QString &/*extension*/) { return true; }
+ virtual bool recognizeLanguage(const QString &/*language*/) { return false; }
virtual Atom::AtomType atomType() const { return Atom::Code; }
virtual QString markedUpCode(const QString &code,
- const Node* /*relative*/,
- const Location& /*location*/) { return protect(code); }
- virtual QString markedUpSynopsis(const Node* /*node*/,
- const Node* /*relative*/,
+ const Node */*relative*/,
+ const Location &/*location*/) { return protect(code); }
+ virtual QString markedUpSynopsis(const Node */*node*/,
+ const Node */*relative*/,
Section::Style /*style*/) { return QString(); }
- virtual QString markedUpQmlItem(const Node* , bool) { return QString(); }
- virtual QString markedUpName(const Node* /*node*/) { return QString(); }
- virtual QString markedUpFullName(const Node* /*node*/,
- const Node* /*relative*/) { return QString(); }
- virtual QString markedUpEnumValue(const QString& /*enumValue*/,
- const Node* /*relative*/) { return QString(); }
- virtual QString markedUpIncludes(const QStringList& /*includes*/) { return QString(); }
- virtual QString functionBeginRegExp(const QString& /*funcName*/) { return QString(); }
- virtual QString functionEndRegExp(const QString& /*funcName*/) { return QString(); }
- virtual QStringList macRefsForNode(Node* node);
+ virtual QString markedUpQmlItem(const Node *, bool) { return QString(); }
+ virtual QString markedUpName(const Node */*node*/) { return QString(); }
+ virtual QString markedUpFullName(const Node */*node*/,
+ const Node */*relative*/) { return QString(); }
+ virtual QString markedUpEnumValue(const QString &/*enumValue*/,
+ const Node */*relative*/) { return QString(); }
+ virtual QString markedUpIncludes(const QStringList &/*includes*/) { return QString(); }
+ virtual QString functionBeginRegExp(const QString &/*funcName*/) { return QString(); }
+ virtual QString functionEndRegExp(const QString &/*funcName*/) { return QString(); }
+ virtual QStringList macRefsForNode(Node *node);
- static void initialize(const Config& config);
+ static void initialize(const Config &config);
static void terminate();
- static CodeMarker *markerForCode(const QString& code);
- static CodeMarker *markerForFileName(const QString& fileName);
- static CodeMarker *markerForLanguage(const QString& lang);
- static const Node *nodeForString(const QString& string);
+ static CodeMarker *markerForCode(const QString &code);
+ static CodeMarker *markerForFileName(const QString &fileName);
+ static CodeMarker *markerForLanguage(const QString &lang);
+ static const Node *nodeForString(const QString &string);
static QString stringForNode(const Node *node);
QString typified(const QString &string, bool trailingSpace = false);
@@ -78,9 +78,9 @@ public:
protected:
static QString protect(const QString &string);
static void appendProtectedString(QString *output, const QStringRef &str);
- QString taggedNode(const Node* node);
- QString taggedQmlNode(const Node* node);
- QString linkTag(const Node *node, const QString& body);
+ QString taggedNode(const Node *node);
+ QString taggedQmlNode(const Node *node);
+ QString linkTag(const Node *node, const QString &body);
private:
QString macName(const Node *parent, const QString &name = QString());
diff --git a/src/qdoc/codeparser.cpp b/src/qdoc/codeparser.cpp
index 83ae25e55..a3c93ca4c 100644
--- a/src/qdoc/codeparser.cpp
+++ b/src/qdoc/codeparser.cpp
@@ -68,7 +68,7 @@ CodeParser::~CodeParser()
/*!
Initialize the code parser base class.
*/
-void CodeParser::initializeParser(const Config& config)
+void CodeParser::initializeParser(const Config &config)
{
showInternal_ = config.getBool(CONFIG_SHOWINTERNAL);
singleExec_ = config.getBool(CONFIG_SINGLEEXEC);
@@ -87,7 +87,7 @@ QStringList CodeParser::headerFileNameFilter()
return sourceFileNameFilter();
}
-void CodeParser::parseHeaderFile(const Location& location, const QString& filePath)
+void CodeParser::parseHeaderFile(const Location &location, const QString &filePath)
{
parseSourceFile(location, filePath);
}
@@ -96,7 +96,7 @@ void CodeParser::parseHeaderFile(const Location& location, const QString& filePa
All the code parsers in the static list are initialized here,
after the qdoc configuration variables have been set.
*/
-void CodeParser::initialize(const Config& config)
+void CodeParser::initialize(const Config &config)
{
QList<CodeParser *>::ConstIterator p = parsers.constBegin();
while (p != parsers.constEnd()) {
@@ -117,7 +117,7 @@ void CodeParser::terminate()
}
}
-CodeParser *CodeParser::parserForLanguage(const QString& language)
+CodeParser *CodeParser::parserForLanguage(const QString &language)
{
QList<CodeParser *>::ConstIterator p = parsers.constBegin();
while (p != parsers.constEnd()) {
@@ -168,7 +168,7 @@ static QSet<QString> commonMetaCommands_;
/*!
Returns the set of strings representing the common metacommands.
*/
-const QSet<QString>& CodeParser::commonMetaCommands()
+const QSet<QString> &CodeParser::commonMetaCommands()
{
if (commonMetaCommands_.isEmpty()) {
commonMetaCommands_ << COMMAND_ABSTRACT
@@ -204,9 +204,9 @@ const QSet<QString>& CodeParser::commonMetaCommands()
/*!
\internal
*/
-void CodeParser::extractPageLinkAndDesc(const QString& arg,
- QString* link,
- QString* desc)
+void CodeParser::extractPageLinkAndDesc(const QString &arg,
+ QString *link,
+ QString *desc)
{
QRegExp bracedRegExp(QLatin1String("\\{([^{}]*)\\}(?:\\{([^{}]*)\\})?"));
@@ -232,7 +232,7 @@ void CodeParser::extractPageLinkAndDesc(const QString& arg,
/*!
\internal
*/
-void CodeParser::setLink(Node* node, Node::LinkType linkType, const QString& arg)
+void CodeParser::setLink(Node *node, Node::LinkType linkType, const QString &arg)
{
QString link;
QString desc;
@@ -301,7 +301,7 @@ bool CodeParser::isParsingQdoc() const
In some cases it prints a qdoc warning that it has done this. Namely,
for C++ classes and namespaces.
*/
-void CodeParser::checkModuleInclusion(Node* n)
+void CodeParser::checkModuleInclusion(Node *n)
{
if (n->physicalModuleName().isEmpty()) {
n->setPhysicalModuleName(Generator::defaultModuleName());
diff --git a/src/qdoc/codeparser.h b/src/qdoc/codeparser.h
index ca2365cda..78ef8c931 100644
--- a/src/qdoc/codeparser.h
+++ b/src/qdoc/codeparser.h
@@ -48,41 +48,41 @@ public:
CodeParser();
virtual ~CodeParser();
- virtual void initializeParser(const Config& config);
+ virtual void initializeParser(const Config &config);
virtual void terminateParser();
virtual QString language() = 0;
virtual QStringList headerFileNameFilter();
virtual QStringList sourceFileNameFilter() = 0;
- virtual void parseHeaderFile(const Location& location, const QString& filePath);
- virtual void parseSourceFile(const Location& location, const QString& filePath) = 0;
+ virtual void parseHeaderFile(const Location &location, const QString &filePath);
+ virtual void parseSourceFile(const Location &location, const QString &filePath) = 0;
virtual void precompileHeaders() { }
virtual Node *parseFnArg(const Location &, const QString &) { return nullptr; }
bool isParsingH() const;
bool isParsingCpp() const;
bool isParsingQdoc() const;
- const QString& currentFile() const { return currentFile_; }
- const QString& moduleHeader() const { return moduleHeader_; }
- void setModuleHeader(const QString& t) { moduleHeader_ = t; }
- void checkModuleInclusion(Node* n);
+ const QString &currentFile() const { return currentFile_; }
+ const QString &moduleHeader() const { return moduleHeader_; }
+ void setModuleHeader(const QString &t) { moduleHeader_ = t; }
+ void checkModuleInclusion(Node *n);
- static void initialize(const Config& config);
+ static void initialize(const Config &config);
static void terminate();
- static CodeParser *parserForLanguage(const QString& language);
+ static CodeParser *parserForLanguage(const QString &language);
static CodeParser *parserForHeaderFile(const QString &filePath);
static CodeParser *parserForSourceFile(const QString &filePath);
- static void setLink(Node* node, Node::LinkType linkType, const QString& arg);
+ static void setLink(Node *node, Node::LinkType linkType, const QString &arg);
static bool isWorthWarningAbout(const Doc &doc);
protected:
- const QSet<QString>& commonMetaCommands();
- static void extractPageLinkAndDesc(const QString& arg,
- QString* link,
- QString* desc);
+ const QSet<QString> &commonMetaCommands();
+ static void extractPageLinkAndDesc(const QString &arg,
+ QString *link,
+ QString *desc);
static bool showInternal() { return showInternal_; }
QString moduleHeader_;
QString currentFile_;
- QDocDatabase* qdb_;
+ QDocDatabase *qdb_;
private:
static QList<CodeParser *> parsers;
diff --git a/src/qdoc/config.cpp b/src/qdoc/config.cpp
index ed277e98a..75915f134 100644
--- a/src/qdoc/config.cpp
+++ b/src/qdoc/config.cpp
@@ -176,8 +176,8 @@ class MetaStack : private QStack<MetaStackEntry>
public:
MetaStack();
- void process(QChar ch, const Location& location);
- QStringList getExpanded(const Location& location);
+ void process(QChar ch, const Location &location);
+ QStringList getExpanded(const Location &location);
};
/*!
@@ -195,7 +195,7 @@ MetaStack::MetaStack()
It really just builds up a name by appending \a ch to
it.
*/
-void MetaStack::process(QChar ch, const Location& location)
+void MetaStack::process(QChar ch, const Location &location)
{
if (ch == QLatin1Char('{')) {
push(MetaStackEntry());
@@ -236,7 +236,7 @@ void MetaStack::process(QChar ch, const Location& location)
/*!
Returns the accumulated string values.
*/
-QStringList MetaStack::getExpanded(const Location& location)
+QStringList MetaStack::getExpanded(const Location &location)
{
if (count() > 1)
location.fatal(tr("Missing '}'"));
@@ -268,7 +268,7 @@ QMap<QString, QStringList> Config::includeFilesMap_;
The constructor sets the \a programName and initializes all
internal state variables to empty values.
*/
-Config::Config(const QString& programName)
+Config::Config(const QString &programName)
: prog(programName)
{
loc = Location::null;
@@ -295,7 +295,7 @@ Config::~Config()
Intializes the location variables returned by location()
and lastLocation().
*/
-void Config::load(const QString& fileName)
+void Config::load(const QString &fileName)
{
load(Location::null, fileName);
if (loc.isEmpty())
@@ -313,7 +313,7 @@ void Config::load(const QString& fileName)
It also inserts the \a values string list into a separate map,
also with \a var as the key.
*/
-void Config::setStringList(const QString& var, const QStringList& values)
+void Config::setStringList(const QString &var, const QStringList &values)
{
configVars_.insert(var,ConfigVar(var, values, QDir::currentPath()));
}
@@ -322,7 +322,7 @@ void Config::setStringList(const QString& var, const QStringList& values)
Looks up the configuarion variable \a var in the string
map and returns the boolean value.
*/
-bool Config::getBool(const QString& var) const
+bool Config::getBool(const QString &var) const
{
return QVariant(getString(var)).toBool();
}
@@ -333,7 +333,7 @@ bool Config::getBool(const QString& var) const
string in the list as an integer and adding it to a total sum.
Returns the sum or \c -1 if \a var is not set.
*/
-int Config::getInt(const QString& var) const
+int Config::getInt(const QString &var) const
{
QStringList strs = getStringList(var);
if (strs.isEmpty())
@@ -405,7 +405,7 @@ QSet<QString> Config::getOutputFormats() const
This allows determining whether a configuration variable is
undefined (null string) or defined as empty (empty string).
*/
-QString Config::getString(const QString& var, const QString& defaultString) const
+QString Config::getString(const QString &var, const QString &defaultString) const
{
QList<ConfigVar> configVars = configVars_.values(var);
if (!configVars.empty()) {
@@ -436,7 +436,7 @@ QString Config::getString(const QString& var, const QString& defaultString) cons
list map, converts the string list it maps to into a set
of strings, and returns the set.
*/
-QSet<QString> Config::getStringSet(const QString& var) const
+QSet<QString> Config::getStringSet(const QString &var) const
{
const auto &stringList = getStringList(var);
return QSet<QString>(stringList.cbegin(), stringList.cend());
@@ -455,7 +455,7 @@ QSet<QString> Config::getStringSet(const QString& var) const
before the values are appended. \note '+=' should always be used.
The final list is returned.
*/
-QStringList Config::getStringList(const QString& var) const
+QStringList Config::getStringList(const QString &var) const
{
QList<ConfigVar> configVars = configVars_.values(var);
QStringList values;
@@ -489,7 +489,7 @@ QStringList Config::getStringList(const QString& var) const
\sa Location::canonicalRelativePath()
*/
-QStringList Config::getCanonicalPathList(const QString& var, bool validate) const
+QStringList Config::getCanonicalPathList(const QString &var, bool validate) const
{
QStringList t;
QList<ConfigVar> configVars = configVars_.values(var);
@@ -502,7 +502,7 @@ QStringList Config::getCanonicalPathList(const QString& var, bool validate) cons
if (!cv.plus_)
t.clear();
const QString d = cv.currentPath_;
- const QStringList& sl = cv.values_;
+ const QStringList &sl = cv.values_;
if (!sl.isEmpty()) {
t.reserve(t.size() + sl.size());
for (int i=0; i<sl.size(); ++i) {
@@ -535,7 +535,7 @@ QStringList Config::getCanonicalPathList(const QString& var, bool validate) cons
\sa getRegExpList()
*/
-QRegExp Config::getRegExp(const QString& var) const
+QRegExp Config::getRegExp(const QString &var) const
{
QString pattern;
QList<QRegExp> subRegExps = getRegExpList(var);
@@ -559,7 +559,7 @@ QRegExp Config::getRegExp(const QString& var) const
map, converts the string list to a list of regular expressions,
and returns it.
*/
-QList<QRegExp> Config::getRegExpList(const QString& var) const
+QList<QRegExp> Config::getRegExpList(const QString &var) const
{
QStringList strs = getStringList(var);
QStringList::ConstIterator s = strs.constBegin();
@@ -578,7 +578,7 @@ QList<QRegExp> Config::getRegExpList(const QString& var) const
the matching keys in a set, stripped of the matching prefix
and dot.
*/
-QSet<QString> Config::subVars(const QString& var) const
+QSet<QString> Config::subVars(const QString &var) const
{
QSet<QString> result;
QString varDot = var + QLatin1Char('.');
@@ -602,7 +602,7 @@ QSet<QString> Config::subVars(const QString& var) const
multimap with the matching keys (stripped of the prefix \a var
and mapped to their values. The pairs are inserted into \a t
*/
-void Config::subVarsAndValues(const QString& var, ConfigVarMultimap& t) const
+void Config::subVarsAndValues(const QString &var, ConfigVarMultimap &t) const
{
QString varDot = var + QLatin1Char('.');
ConfigVarMultimap::ConstIterator v = configVars_.constBegin();
@@ -621,7 +621,7 @@ void Config::subVarsAndValues(const QString& var, ConfigVarMultimap& t) const
/*!
Get all .qdocinc files.
*/
-QString Config::getIncludeFilePath(const QString& fileName) const
+QString Config::getIncludeFilePath(const QString &fileName) const
{
QString ext = fileName.mid(fileName.lastIndexOf('.'));
ext.prepend('*');
@@ -637,7 +637,7 @@ QString Config::getIncludeFilePath(const QString& fileName) const
}
includeFilesMap_.insert(ext, result);
}
- const QStringList& paths = (*includeFilesMap_.find(ext));
+ const QStringList &paths = (*includeFilesMap_.find(ext));
for (int i=0; i<paths.size(); ++i) {
if (paths[i].endsWith(fileName))
return paths[i];
@@ -711,10 +711,10 @@ QStringList Config::getExampleImageFiles(const QSet<QString> &excludedDirs,
\a location is used for obtaining the file and line numbers
for report qdoc errors.
*/
-QString Config::findFile(const Location& location,
- const QStringList& files,
- const QStringList& dirs,
- const QString& fileName,
+QString Config::findFile(const Location &location,
+ const QStringList &files,
+ const QStringList &dirs,
+ const QString &fileName,
QString *userFriendlyFilePath)
{
if (fileName.isEmpty() || fileName.startsWith(QLatin1Char('/'))) {
@@ -776,11 +776,11 @@ QString Config::findFile(const Location& location,
/*!
*/
-QString Config::findFile(const Location& location,
- const QStringList& files,
- const QStringList& dirs,
- const QString& fileBase,
- const QStringList& fileExtensions,
+QString Config::findFile(const Location &location,
+ const QStringList &files,
+ const QStringList &dirs,
+ const QString &fileBase,
+ const QStringList &fileExtensions,
QString *userFriendlyFilePath)
{
QStringList::ConstIterator e = fileExtensions.constBegin();
@@ -804,10 +804,10 @@ QString Config::findFile(const Location& location,
the file and line number where a qdoc error occurred. The
constructed output file name is returned.
*/
-QString Config::copyFile(const Location& location,
- const QString& sourceFilePath,
- const QString& userFriendlySourceFilePath,
- const QString& targetDirPath)
+QString Config::copyFile(const Location &location,
+ const QString &sourceFilePath,
+ const QString &userFriendlySourceFilePath,
+ const QString &targetDirPath)
{
QFile inFile(sourceFilePath);
if (!inFile.open(QFile::ReadOnly)) {
@@ -842,7 +842,7 @@ QString Config::copyFile(const Location& location,
Finds the largest unicode digit in \a value in the range
1..7 and returns it.
*/
-int Config::numParams(const QString& value)
+int Config::numParams(const QString &value)
{
int max = 0;
for (int i = 0; i != value.length(); i++) {
@@ -858,7 +858,7 @@ int Config::numParams(const QString& value)
It doesn't remove \a dir itself, but if it was called
recursively, then the caller will remove \a dir.
*/
-bool Config::removeDirContents(const QString& dir)
+bool Config::removeDirContents(const QString &dir)
{
QDir dirInfo(dir);
QFileInfoList entries = dirInfo.entryInfoList();
@@ -905,7 +905,7 @@ bool Config::isMetaKeyChar(QChar ch)
\a fileName is a master qdocconf file. It contains a list of
qdocconf files and nothing else. Read the list and return it.
*/
-QStringList Config::loadMaster(const QString& fileName)
+QStringList Config::loadMaster(const QString &fileName)
{
Location location = Location::null;
QFile fin(fileName);
@@ -937,7 +937,7 @@ QStringList Config::loadMaster(const QString& fileName)
this one is recursive, i.e., it calls itself when it sees
an \c{include} statement in the qdoc configuration file.
*/
-void Config::load(Location location, const QString& fileName)
+void Config::load(Location location, const QString &fileName)
{
QFileInfo fileInfo(fileName);
QString path = fileInfo.canonicalPath();
@@ -1191,8 +1191,8 @@ bool Config::isFileExcluded(const QString &fileName, const QSet<QString> &exclud
return excludedFiles.contains(fileName);
}
-QStringList Config::getFilesHere(const QString& uncleanDir,
- const QString& nameFilter,
+QStringList Config::getFilesHere(const QString &uncleanDir,
+ const QString &nameFilter,
const Location &location,
const QSet<QString> &excludedDirs,
const QSet<QString> &excludedFiles)
@@ -1235,7 +1235,7 @@ QStringList Config::getFilesHere(const QString& uncleanDir,
/*!
Push \a dir onto the stack of working directories.
*/
-void Config::pushWorkingDir(const QString& dir)
+void Config::pushWorkingDir(const QString &dir)
{
workingDirs_.push(dir);
}
diff --git a/src/qdoc/config.h b/src/qdoc/config.h
index 37b677999..2c24a991e 100644
--- a/src/qdoc/config.h
+++ b/src/qdoc/config.h
@@ -56,10 +56,10 @@ struct ConfigVar {
ConfigVar() : plus_(false) { }
- ConfigVar(const QString& name, const QStringList& values, const QString& dir)
+ ConfigVar(const QString &name, const QStringList &values, const QString &dir)
: plus_(true), name_(name), values_(values), currentPath_(dir) { }
- ConfigVar(const QString& name, const QStringList& values, const QString& dir, const Location& loc)
+ ConfigVar(const QString &name, const QStringList &values, const QString &dir, const Location &loc)
: plus_(false), name_(name), values_(values), currentPath_(dir), location_(loc) { }
};
@@ -73,48 +73,48 @@ class Config
Q_DECLARE_TR_FUNCTIONS(QDoc::Config)
public:
- Config(const QString& programName);
+ Config(const QString &programName);
~Config();
static bool debug_;
- void load(const QString& fileName);
- void setStringList(const QString& var, const QStringList& values);
+ void load(const QString &fileName);
+ void setStringList(const QString &var, const QStringList &values);
- const QString& programName() const { return prog; }
- const Location& location() const { return loc; }
- const Location& lastLocation() const { return lastLocation_; }
- bool getBool(const QString& var) const;
- int getInt(const QString& var) const;
+ const QString &programName() const { return prog; }
+ const Location &location() const { return loc; }
+ const Location &lastLocation() const { return lastLocation_; }
+ bool getBool(const QString &var) const;
+ int getInt(const QString &var) const;
QString getOutputDir(const QString &format = QString("HTML")) const;
QSet<QString> getOutputFormats() const;
- QString getString(const QString& var, const QString& defaultString = QString()) const;
- QSet<QString> getStringSet(const QString& var) const;
- QStringList getStringList(const QString& var) const;
- QStringList getCanonicalPathList(const QString& var, bool validate = false) const;
- QRegExp getRegExp(const QString& var) const;
- QList<QRegExp> getRegExpList(const QString& var) const;
- QSet<QString> subVars(const QString& var) const;
- void subVarsAndValues(const QString& var, ConfigVarMultimap& t) const;
- QStringList getAllFiles(const QString& filesVar,
- const QString& dirsVar,
+ QString getString(const QString &var, const QString &defaultString = QString()) const;
+ QSet<QString> getStringSet(const QString &var) const;
+ QStringList getStringList(const QString &var) const;
+ QStringList getCanonicalPathList(const QString &var, bool validate = false) const;
+ QRegExp getRegExp(const QString &var) const;
+ QList<QRegExp> getRegExpList(const QString &var) const;
+ QSet<QString> subVars(const QString &var) const;
+ void subVarsAndValues(const QString &var, ConfigVarMultimap &t) const;
+ QStringList getAllFiles(const QString &filesVar,
+ const QString &dirsVar,
const QSet<QString> &excludedDirs = QSet<QString>(),
const QSet<QString> &excludedFiles = QSet<QString>());
- QString getIncludeFilePath(const QString& fileName) const;
+ QString getIncludeFilePath(const QString &fileName) const;
QStringList getExampleQdocFiles(const QSet<QString> &excludedDirs, const QSet<QString> &excludedFiles);
QStringList getExampleImageFiles(const QSet<QString> &excludedDirs, const QSet<QString> &excludedFiles);
- static QStringList loadMaster(const QString& fileName);
+ static QStringList loadMaster(const QString &fileName);
static bool isFileExcluded(const QString &fileName, const QSet<QString> &excludedFiles);
- static QStringList getFilesHere(const QString& dir,
- const QString& nameFilter,
+ static QStringList getFilesHere(const QString &dir,
+ const QString &nameFilter,
const Location &location = Location(),
const QSet<QString> &excludedDirs = QSet<QString>(),
const QSet<QString> &excludedFiles = QSet<QString>());
- static QString findFile(const Location& location,
+ static QString findFile(const Location &location,
const QStringList &files,
- const QStringList& dirs,
- const QString& fileName,
+ const QStringList &dirs,
+ const QString &fileName,
QString *userFriendlyFilePath = nullptr);
static QString findFile(const Location &location,
const QStringList &files,
@@ -122,13 +122,13 @@ public:
const QString &fileBase,
const QStringList &fileExtensions,
QString *userFriendlyFilePath = nullptr);
- static QString copyFile(const Location& location,
- const QString& sourceFilePath,
- const QString& userFriendlySourceFilePath,
- const QString& targetDirPath);
- static int numParams(const QString& value);
- static bool removeDirContents(const QString& dir);
- static void pushWorkingDir(const QString& dir);
+ static QString copyFile(const Location &location,
+ const QString &sourceFilePath,
+ const QString &userFriendlySourceFilePath,
+ const QString &targetDirPath);
+ static int numParams(const QString &value);
+ static bool removeDirContents(const QString &dir);
+ static void pushWorkingDir(const QString &dir);
static QString popWorkingDir();
static const QString dot;
@@ -140,7 +140,7 @@ public:
private:
static bool isMetaKeyChar(QChar ch);
- void load(Location location, const QString& fileName);
+ void load(Location location, const QString &fileName);
QString prog;
Location loc;
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp
index 9b5acf9ce..325130399 100644
--- a/src/qdoc/cppcodemarker.cpp
+++ b/src/qdoc/cppcodemarker.cpp
@@ -62,7 +62,7 @@ CppCodeMarker::~CppCodeMarker()
/*!
Returns \c true.
*/
-bool CppCodeMarker::recognizeCode(const QString & /* code */)
+bool CppCodeMarker::recognizeCode(const QString &/* code */)
{
return true;
}
@@ -71,7 +71,7 @@ bool CppCodeMarker::recognizeCode(const QString & /* code */)
Returns \c true if \a ext is any of a list of file extensions
for the C++ language.
*/
-bool CppCodeMarker::recognizeExtension(const QString& extension)
+bool CppCodeMarker::recognizeExtension(const QString &extension)
{
QByteArray ext = extension.toLatin1();
return ext == "c" ||
@@ -316,23 +316,23 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node,
/*!
*/
-QString CppCodeMarker::markedUpQmlItem(const Node* node, bool summary)
+QString CppCodeMarker::markedUpQmlItem(const Node *node, bool summary)
{
QString name = taggedQmlNode(node);
if (summary)
name = linkTag(node,name);
else if (node->isQmlProperty() || node->isJsProperty()) {
- const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(node);
+ const QmlPropertyNode *pn = static_cast<const QmlPropertyNode *>(node);
if (pn->isAttached())
name.prepend(pn->element() + QLatin1Char('.'));
}
name = "<@name>" + name + "</@name>";
QString synopsis;
if (node->isQmlProperty() || node->isJsProperty()) {
- const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(node);
+ const QmlPropertyNode *pn = static_cast<const QmlPropertyNode *>(node);
synopsis = name + " : " + typified(pn->dataType());
} else if (node->isFunction(Node::QML) || node->isFunction(Node::JS)) {
- const FunctionNode* func = static_cast<const FunctionNode*>(node);
+ const FunctionNode *func = static_cast<const FunctionNode *>(node);
if (!func->returnType().isEmpty())
synopsis = typified(func->returnType(), true) + name;
else
@@ -422,7 +422,7 @@ QString CppCodeMarker::markedUpEnumValue(const QString &enumValue, const Node *r
return fullName;
}
-QString CppCodeMarker::markedUpIncludes(const QStringList& includes)
+QString CppCodeMarker::markedUpIncludes(const QStringList &includes)
{
QString code;
@@ -434,13 +434,13 @@ QString CppCodeMarker::markedUpIncludes(const QStringList& includes)
return code;
}
-QString CppCodeMarker::functionBeginRegExp(const QString& funcName)
+QString CppCodeMarker::functionBeginRegExp(const QString &funcName)
{
return QLatin1Char('^') + QRegExp::escape(funcName) + QLatin1Char('$');
}
-QString CppCodeMarker::functionEndRegExp(const QString& /* funcName */)
+QString CppCodeMarker::functionEndRegExp(const QString &/* funcName */)
{
return "^\\}$";
}
diff --git a/src/qdoc/cppcodemarker.h b/src/qdoc/cppcodemarker.h
index 24a672261..3719e7bf5 100644
--- a/src/qdoc/cppcodemarker.h
+++ b/src/qdoc/cppcodemarker.h
@@ -41,22 +41,22 @@ public:
CppCodeMarker();
~CppCodeMarker();
- bool recognizeCode(const QString& code) override;
- bool recognizeExtension(const QString& ext) override;
- bool recognizeLanguage(const QString& lang) override;
+ bool recognizeCode(const QString &code) override;
+ bool recognizeExtension(const QString &ext) override;
+ bool recognizeLanguage(const QString &lang) override;
Atom::AtomType atomType() const override;
- QString markedUpCode(const QString& code, const Node *relative, const Location &location) override;
+ QString markedUpCode(const QString &code, const Node *relative, const Location &location) override;
QString markedUpSynopsis(const Node *node, const Node *relative, Section::Style style) override;
QString markedUpQmlItem(const Node *node, bool summary) override;
QString markedUpName(const Node *node) override;
QString markedUpFullName(const Node *node, const Node *relative) override;
QString markedUpEnumValue(const QString &enumValue, const Node *relative) override;
- QString markedUpIncludes(const QStringList& includes) override;
- QString functionBeginRegExp(const QString& funcName) override;
- QString functionEndRegExp(const QString& funcName) override;
+ QString markedUpIncludes(const QStringList &includes) override;
+ QString functionBeginRegExp(const QString &funcName) override;
+ QString functionEndRegExp(const QString &funcName) override;
private:
- QString addMarkUp(const QString& protectedCode, const Node *relative, const Location &location);
+ QString addMarkUp(const QString &protectedCode, const Node *relative, const Location &location);
};
QT_END_NAMESPACE
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp
index a5e498f07..af0d9bd9b 100644
--- a/src/qdoc/cppcodeparser.cpp
+++ b/src/qdoc/cppcodeparser.cpp
@@ -207,7 +207,7 @@ QStringList CppCodeParser::sourceFileNameFilter()
/*!
Returns the set of strings reopresenting the topic commands.
*/
-const QSet<QString>& CppCodeParser::topicCommands()
+const QSet<QString> &CppCodeParser::topicCommands()
{
return topicCommands_;
}
@@ -215,9 +215,9 @@ const QSet<QString>& CppCodeParser::topicCommands()
/*!
Process the topic \a command found in the \a doc with argument \a arg.
*/
-Node* CppCodeParser::processTopicCommand(const Doc& doc,
- const QString& command,
- const ArgLocPair& arg)
+Node *CppCodeParser::processTopicCommand(const Doc &doc,
+ const QString &command,
+ const ArgLocPair &arg)
{
ExtraFuncData extra;
if (command == COMMAND_FN) {
@@ -253,7 +253,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
}
else if (node->isAggregate()) {
if (type == Node::Namespace) {
- NamespaceNode* ns = static_cast<NamespaceNode*>(node);
+ NamespaceNode *ns = static_cast<NamespaceNode *>(node);
ns->markSeen();
ns->setWhereDocumented(ns->tree()->camelCaseModuleName());
}
@@ -275,37 +275,37 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
}
else if (command == COMMAND_EXAMPLE) {
if (Config::generateExamples) {
- ExampleNode* en = new ExampleNode(qdb_->primaryTreeRoot(), arg.first);
+ ExampleNode *en = new ExampleNode(qdb_->primaryTreeRoot(), arg.first);
en->setLocation(doc.startLocation());
setExampleFileLists(en);
return en;
}
}
else if (command == COMMAND_EXTERNALPAGE) {
- ExternalPageNode* epn = new ExternalPageNode(qdb_->primaryTreeRoot(), arg.first);
+ ExternalPageNode *epn = new ExternalPageNode(qdb_->primaryTreeRoot(), arg.first);
epn->setLocation(doc.startLocation());
return epn;
}
else if (command == COMMAND_HEADERFILE) {
- HeaderNode* hn = new HeaderNode(qdb_->primaryTreeRoot(), arg.first);
+ HeaderNode *hn = new HeaderNode(qdb_->primaryTreeRoot(), arg.first);
hn->setLocation(doc.startLocation());
return hn;
}
else if (command == COMMAND_GROUP) {
- CollectionNode* cn = qdb_->addGroup(arg.first);
+ CollectionNode *cn = qdb_->addGroup(arg.first);
cn->setLocation(doc.startLocation());
cn->markSeen();
return cn;
}
else if (command == COMMAND_MODULE) {
- CollectionNode* cn = qdb_->addModule(arg.first);
+ CollectionNode *cn = qdb_->addModule(arg.first);
cn->setLocation(doc.startLocation());
cn->markSeen();
return cn;
}
else if (command == COMMAND_QMLMODULE) {
QStringList blankSplit = arg.first.split(QLatin1Char(' '));
- CollectionNode* cn = qdb_->addQmlModule(blankSplit[0]);
+ CollectionNode *cn = qdb_->addQmlModule(blankSplit[0]);
cn->setLogicalModuleInfo(blankSplit);
cn->setLocation(doc.startLocation());
cn->markSeen();
@@ -313,7 +313,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
}
else if (command == COMMAND_JSMODULE) {
QStringList blankSplit = arg.first.split(QLatin1Char(' '));
- CollectionNode* cn = qdb_->addJsModule(blankSplit[0]);
+ CollectionNode *cn = qdb_->addJsModule(blankSplit[0]);
cn->setLogicalModuleInfo(blankSplit);
cn->setLocation(doc.startLocation());
cn->markSeen();
@@ -339,14 +339,14 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
else if (t == "attribution")
ptype = Node::AttributionPage;
}
- PageNode* pn = new PageNode(qdb_->primaryTreeRoot(), args[0], ptype);
+ PageNode *pn = new PageNode(qdb_->primaryTreeRoot(), args[0], ptype);
pn->setLocation(doc.startLocation());
return pn;
} else if (command == COMMAND_QMLTYPE) {
QmlTypeNode *qcn = nullptr;
Node *candidate = qdb_->primaryTreeRoot()->findChildNode(arg.first, Node::QML);
if (candidate != nullptr && candidate->isQmlType())
- qcn = static_cast<QmlTypeNode*>(candidate);
+ qcn = static_cast<QmlTypeNode *>(candidate);
else
qcn = new QmlTypeNode(qdb_->primaryTreeRoot(), arg.first);
qcn->setLocation(doc.startLocation());
@@ -355,17 +355,17 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
QmlTypeNode *qcn = nullptr;
Node *candidate = qdb_->primaryTreeRoot()->findChildNode(arg.first, Node::JS);
if (candidate != nullptr && candidate->isJsType())
- qcn = static_cast<QmlTypeNode*>(candidate);
+ qcn = static_cast<QmlTypeNode *>(candidate);
else
qcn = new QmlTypeNode(qdb_->primaryTreeRoot(), arg.first, Node::JsType);
qcn->setLocation(doc.startLocation());
return qcn;
} else if (command == COMMAND_QMLBASICTYPE) {
- QmlBasicTypeNode* n = new QmlBasicTypeNode(qdb_->primaryTreeRoot(), arg.first);
+ QmlBasicTypeNode *n = new QmlBasicTypeNode(qdb_->primaryTreeRoot(), arg.first);
n->setLocation(doc.startLocation());
return n;
} else if (command == COMMAND_JSBASICTYPE) {
- QmlBasicTypeNode* n = new QmlBasicTypeNode(qdb_->primaryTreeRoot(), arg.first, Node::JsBasicType);
+ QmlBasicTypeNode *n = new QmlBasicTypeNode(qdb_->primaryTreeRoot(), arg.first, Node::JsBasicType);
n->setLocation(doc.startLocation());
return n;
}
@@ -401,11 +401,11 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
\note The two QML types \e{Component} and \e{QtObject}
never have a module qualifier.
*/
-bool CppCodeParser::splitQmlPropertyArg(const QString& arg,
- QString& type,
- QString& module,
- QString& qmlTypeName,
- QString& name,
+bool CppCodeParser::splitQmlPropertyArg(const QString &arg,
+ QString &type,
+ QString &module,
+ QString &qmlTypeName,
+ QString &name,
const Location &location)
{
QStringList blankSplit = arg.split(QLatin1Char(' '));
@@ -438,7 +438,7 @@ bool CppCodeParser::splitQmlPropertyArg(const QString& arg,
*/
void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocList &docs)
{
- const TopicList& topics = doc.topicsUsed();
+ const TopicList &topics = doc.topicsUsed();
if (topics.isEmpty())
return;
@@ -458,11 +458,11 @@ void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocLis
group = property.left(i);
}
- QmlTypeNode* qmlType = qdb_->findQmlType(module, qmlTypeName);
+ QmlTypeNode *qmlType = qdb_->findQmlType(module, qmlTypeName);
if (qmlType == nullptr)
qmlType = new QmlTypeNode(qdb_->primaryTreeRoot(), qmlTypeName);
- SharedCommentNode* scn = nullptr;
+ SharedCommentNode *scn = nullptr;
if (topics.size() > 1) {
scn = new SharedCommentNode(qmlType, topics.size(), group);
scn->setLocation(doc.startLocation());
@@ -491,7 +491,7 @@ void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocLis
doc.startLocation().warning(msg);
continue;
}
- QmlPropertyNode* qpn = new QmlPropertyNode(qmlType, property, type, attached);
+ QmlPropertyNode *qpn = new QmlPropertyNode(qmlType, property, type, attached);
if (scn != nullptr)
qpn->setSharedCommentNode(scn);
qpn->setLocation(doc.startLocation());
@@ -512,7 +512,7 @@ void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocLis
Returns the set of strings representing the common metacommands
plus some other metacommands.
*/
-const QSet<QString>& CppCodeParser::metaCommands()
+const QSet<QString> &CppCodeParser::metaCommands()
{
return metaCommands_;
}
@@ -532,7 +532,7 @@ void CppCodeParser::processMetaCommand(const Doc &doc,
QString arg = argLocPair.first;
if (command == COMMAND_INHEADERFILE) {
if (node->isAggregate())
- static_cast<Aggregate*>(node)->addIncludeFile(arg);
+ static_cast<Aggregate *>(node)->addIncludeFile(arg);
else
doc.location().warning(tr("Ignored '\\%1'").arg(COMMAND_INHEADERFILE));
}
@@ -544,16 +544,16 @@ void CppCodeParser::processMetaCommand(const Doc &doc,
in Aggregate::normalizeOverloads().
*/
if (node->isFunction())
- static_cast<FunctionNode*>(node)->setOverloadFlag();
+ static_cast<FunctionNode *>(node)->setOverloadFlag();
else if (node->isSharedCommentNode())
- static_cast<SharedCommentNode*>(node)->setOverloadFlags();
+ static_cast<SharedCommentNode *>(node)->setOverloadFlags();
else
doc.location().warning(tr("Ignored '\\%1'").arg(COMMAND_OVERLOAD));
}
else if (command == COMMAND_REIMP) {
if (node->parent() && !node->parent()->isInternal()) {
if (node->isFunction()) {
- FunctionNode *fn = static_cast<FunctionNode*>(node);
+ FunctionNode *fn = static_cast<FunctionNode *>(node);
// The clang visitor class will have set the
// qualified name of the ovverridden function.
// If the name of the overridden function isn't
@@ -628,13 +628,13 @@ void CppCodeParser::processMetaCommand(const Doc &doc,
if (node->name() == arg)
doc.location().warning(tr("%1 tries to inherit itself").arg(arg));
else if (node->isQmlType() || node->isJsType()) {
- QmlTypeNode* qmlType = static_cast<QmlTypeNode*>(node);
+ QmlTypeNode *qmlType = static_cast<QmlTypeNode *>(node);
qmlType->setQmlBaseName(arg);
}
}
else if (command == COMMAND_QMLINSTANTIATES) {
if (node->isQmlType() || node->isJsType()) {
- ClassNode* classNode = qdb_->findClassNode(arg.split("::"));
+ ClassNode *classNode = qdb_->findClassNode(arg.split("::"));
if (classNode)
node->setClassNode(classNode);
else
@@ -690,7 +690,7 @@ void CppCodeParser::processMetaCommand(const Doc &doc,
if (!node->setTitle(arg))
doc.location().warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE));
else if (node->isExample())
- qdb_->addExampleNode(static_cast<ExampleNode*>(node));
+ qdb_->addExampleNode(static_cast<ExampleNode *>(node));
} else if (command == COMMAND_SUBTITLE) {
if (!node->setSubtitle(arg))
doc.location().warning(tr("Ignored '\\%1'").arg(COMMAND_SUBTITLE));
@@ -797,7 +797,7 @@ FunctionNode *CppCodeParser::parseMacroArg(const Location &location, const QStri
if (leftParenSplit.isEmpty())
return nullptr;
QString macroName;
- FunctionNode* oldMacroNode = nullptr;
+ FunctionNode *oldMacroNode = nullptr;
QStringList blankSplit = leftParenSplit[0].split(' ');
if (blankSplit.size() > 0) {
macroName = blankSplit.last();
@@ -825,7 +825,7 @@ FunctionNode *CppCodeParser::parseMacroArg(const Location &location, const QStri
FunctionNode::Metaness metaness = FunctionNode::MacroWithParams;
if (params.isEmpty())
metaness = FunctionNode::MacroWithoutParams;
- FunctionNode* macro = new FunctionNode(metaness, qdb_->primaryTreeRoot(), macroName);
+ FunctionNode *macro = new FunctionNode(metaness, qdb_->primaryTreeRoot(), macroName);
macro->setAccess(Node::Public);
macro->setLocation(location);
macro->setReturnType(returnType);
@@ -917,7 +917,7 @@ void CppCodeParser::setExampleFileLists(PageNode *pn)
i = 0;
foreach (const QString &imageFile, imageFiles)
imageFiles[i++] = imageFile.mid(sizeOfBoringPartOfName);
- ExampleNode* en = static_cast<ExampleNode*>(pn);
+ ExampleNode *en = static_cast<ExampleNode *>(pn);
en->setFiles(exampleFiles);
en->setImages(imageFiles);
}
@@ -989,7 +989,7 @@ void CppCodeParser::processTopicArgs(const Doc &doc, const QString &topic, NodeL
docs.append(doc);
}
} else if (args.size() > 1) {
- QVector<SharedCommentNode*> sharedCommentNodes;
+ QVector<SharedCommentNode *> sharedCommentNodes;
ArgList::ConstIterator arg = args.constBegin();
while (arg != args.constEnd()) {
node = nullptr;
diff --git a/src/qdoc/cppcodeparser.h b/src/qdoc/cppcodeparser.h
index e0c866fe1..d5f23dde7 100644
--- a/src/qdoc/cppcodeparser.h
+++ b/src/qdoc/cppcodeparser.h
@@ -42,12 +42,12 @@ class CppCodeParser : public CodeParser
Q_DECLARE_TR_FUNCTIONS(QDoc::CppCodeParser)
struct ExtraFuncData {
- Aggregate* root; // Used as the parent.
+ Aggregate *root; // Used as the parent.
Node::NodeType type; // The node type: Function, etc.
bool isAttached; // If true, the method is attached.
bool isMacro; // If true, we are parsing a macro signature.
ExtraFuncData() : root(nullptr), type(Node::Function), isAttached(false), isMacro(false) { }
- ExtraFuncData(Aggregate* r, Node::NodeType t, bool a)
+ ExtraFuncData(Aggregate *r, Node::NodeType t, bool a)
: root(r), type(t), isAttached(a), isMacro(false) { }
};
@@ -55,7 +55,7 @@ public:
CppCodeParser();
~CppCodeParser() = default;
- void initializeParser(const Config& config) override;
+ void initializeParser(const Config &config) override;
void terminateParser() override;
QString language() override { return QStringLiteral("Cpp"); }
QStringList headerFileNameFilter() override;
@@ -68,18 +68,18 @@ public:
static bool isQMLPropertyTopic(const QString &t);
protected:
- static const QSet<QString>& topicCommands();
- static const QSet<QString>& metaCommands();
- virtual Node* processTopicCommand(const Doc& doc,
- const QString& command,
- const ArgLocPair& arg);
+ static const QSet<QString> &topicCommands();
+ static const QSet<QString> &metaCommands();
+ virtual Node *processTopicCommand(const Doc &doc,
+ const QString &command,
+ const ArgLocPair &arg);
void processQmlProperties(const Doc &doc, NodeList &nodes, DocList &docs);
- bool splitQmlPropertyArg(const QString& arg,
- QString& type,
- QString& module,
- QString& element,
- QString& name,
- const Location& location);
+ bool splitQmlPropertyArg(const QString &arg,
+ QString &type,
+ QString &module,
+ QString &element,
+ QString &name,
+ const Location &location);
void processMetaCommand(const Doc &doc, const QString &command, const ArgLocPair &argLocPair, Node *node);
void processMetaCommands(const Doc &doc, Node *node);
void processMetaCommands(NodeList &nodes, DocList &docs);
diff --git a/src/qdoc/doc.cpp b/src/qdoc/doc.cpp
index c149f366d..0e23f60a7 100644
--- a/src/qdoc/doc.cpp
+++ b/src/qdoc/doc.cpp
@@ -298,10 +298,10 @@ class DocPrivateExtra
public:
Doc::Sections granularity_;
Doc::Sections section_; // ###
- QList<Atom*> tableOfContents_;
+ QList<Atom *> tableOfContents_;
QVector<int> tableOfContentsLevels_;
- QList<Atom*> keywords_;
- QList<Atom*> targets_;
+ QList<Atom *> keywords_;
+ QList<Atom *> targets_;
QStringMultiMap metaMap_;
DocPrivateExtra()
@@ -334,12 +334,12 @@ typedef QMap<QString, ArgList> CommandMap;
class DocPrivate : public Shared
{
public:
- DocPrivate(const Location& start = Location::null,
- const Location& end = Location::null,
- const QString& source = QString());
+ DocPrivate(const Location &start = Location::null,
+ const Location &end = Location::null,
+ const QString &source = QString());
~DocPrivate();
- void addAlso(const Text& also);
+ void addAlso(const Text &also);
void constructExtra();
bool isEnumDocSimplifiable() const;
@@ -361,9 +361,9 @@ public:
DitaRefList ditamap_;
};
-DocPrivate::DocPrivate(const Location& start,
- const Location& end,
- const QString& source)
+DocPrivate::DocPrivate(const Location &start,
+ const Location &end,
+ const QString &source)
: start_loc(start),
end_loc(end),
src(source),
@@ -381,12 +381,12 @@ DocPrivate::DocPrivate(const Location& start,
DocPrivate::~DocPrivate()
{
delete extra;
- foreach (DitaRef* t, ditamap_) {
+ foreach (DitaRef *t, ditamap_) {
delete t;
}
}
-void DocPrivate::addAlso(const Text& also)
+void DocPrivate::addAlso(const Text &also)
{
alsoList.append(also);
}
@@ -426,15 +426,15 @@ public:
void parse(const QString &source,
DocPrivate *docPrivate,
const QSet<QString> &metaCommandSet,
- const QSet<QString>& possibleTopics);
+ const QSet<QString> &possibleTopics);
static int endCmdFor(int cmd);
static QString cmdName(int cmd);
static QString endCmdName(int cmd);
- static QString untabifyEtc(const QString& str);
- static int indentLevel(const QString& str);
- static QString unindent(int level, const QString& str);
- static QString slashed(const QString& str);
+ static QString untabifyEtc(const QString &str);
+ static int indentLevel(const QString &str);
+ static QString unindent(int level, const QString &str);
+ static QString slashed(const QString &str);
static int tabSize;
static QStringList exampleFiles;
@@ -444,21 +444,21 @@ public:
static bool quoting;
private:
- Location& location();
- QString detailsUnknownCommand(const QSet<QString>& metaCommandSet,
- const QString& str);
- void insertTarget(const QString& target, bool keyword);
- void include(const QString& fileName, const QString& identifier);
- void startFormat(const QString& format, int cmd);
+ Location &location();
+ QString detailsUnknownCommand(const QSet<QString> &metaCommandSet,
+ const QString &str);
+ void insertTarget(const QString &target, bool keyword);
+ void include(const QString &fileName, const QString &identifier);
+ void startFormat(const QString &format, int cmd);
bool openCommand(int cmd);
bool closeCommand(int endCmd);
void startSection(Doc::Sections unit, int cmd);
void endSection(int unit, int endCmd);
void parseAlso();
void append(const QString &string);
- void append(Atom::AtomType type, const QString& string = QString());
- void append(Atom::AtomType type, const QString& p1, const QString& p2);
- void append(const QString& p1, const QString& p2);
+ void append(Atom::AtomType type, const QString &string = QString());
+ void append(Atom::AtomType type, const QString &p1, const QString &p2);
+ void append(const QString &p1, const QString &p2);
void appendChar(QChar ch);
void appendWord(const QString &word);
void appendToCode(const QString &code);
@@ -466,14 +466,14 @@ private:
void startNewPara();
void enterPara(Atom::AtomType leftType = Atom::ParaLeft,
Atom::AtomType rightType = Atom::ParaRight,
- const QString& string = QString());
+ const QString &string = QString());
void leavePara();
void leaveValue();
void leaveValueList();
void leaveTableRow();
CodeMarker *quoteFromFile();
bool expandMacro();
- void expandMacro(const QString& name, const QString& def, int numParams);
+ void expandMacro(const QString &name, const QString &def, int numParams);
QString expandMacroToString(const QString &name, const QString &def, int numParams, const QString &matchExpr);
Doc::Sections getSectioningUnit();
QString getArgument(bool verbatim = false);
@@ -528,7 +528,7 @@ private:
QStack<int> openedCommands;
QStack<OpenedList> openedLists;
Quoter quoter;
- QStack<DitaRef*> ditarefs_;
+ QStack<DitaRef *> ditarefs_;
Atom *lastAtom;
};
@@ -548,10 +548,10 @@ bool DocParser::quoting = false;
found in \a source. These metacommands are not markup text
commands. They are topic commands and related metacommands.
*/
-void DocParser::parse(const QString& source,
+void DocParser::parse(const QString &source,
DocPrivate *docPrivate,
- const QSet<QString>& metaCommandSet,
- const QSet<QString>& possibleTopics)
+ const QSet<QString> &metaCommandSet,
+ const QSet<QString> &possibleTopics)
{
input_ = source;
pos = 0;
@@ -978,7 +978,7 @@ void DocParser::parse(const QString& source,
case CMD_TOPICREF:
case CMD_MAPREF:
if (openCommand(cmd)) {
- DitaRef* t = nullptr;
+ DitaRef *t = nullptr;
if (cmd == CMD_MAPREF)
t = new MapRef();
else
@@ -1682,7 +1682,7 @@ void DocParser::insertTarget(const QString &target, bool keyword)
}
}
-void DocParser::include(const QString& fileName, const QString& identifier)
+void DocParser::include(const QString &fileName, const QString &identifier)
{
if (location().depth() > 16)
location().fatal(tr("Too many nested '\\%1's").arg(cmdName(CMD_INCLUDE)));
@@ -1766,7 +1766,7 @@ void DocParser::include(const QString& fileName, const QString& identifier)
}
}
-void DocParser::startFormat(const QString& format, int cmd)
+void DocParser::startFormat(const QString &format, int cmd)
{
enterPara();
@@ -1966,7 +1966,7 @@ void DocParser::append(const QString &string)
priv->text << Atom(string); // The Atom type is Link.
}
-void DocParser::append(Atom::AtomType type, const QString& p1, const QString& p2)
+void DocParser::append(Atom::AtomType type, const QString &p1, const QString &p2)
{
Atom::AtomType lastType = priv->text.lastAtom()->type();
if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
@@ -1974,7 +1974,7 @@ void DocParser::append(Atom::AtomType type, const QString& p1, const QString& p2
priv->text << Atom(type, p1, p2);
}
-void DocParser::append(const QString& p1, const QString& p2)
+void DocParser::append(const QString &p1, const QString &p2)
{
Atom::AtomType lastType = priv->text.lastAtom()->type();
if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
@@ -2007,7 +2007,7 @@ void DocParser::appendWord(const QString &word)
priv->text.lastAtom()->appendString(word);
}
-void DocParser::appendToCode(const QString& markedCode)
+void DocParser::appendToCode(const QString &markedCode)
{
if (!isCode(lastAtom)) {
append(Atom::Code);
@@ -2034,7 +2034,7 @@ void DocParser::startNewPara()
void DocParser::enterPara(Atom::AtomType leftType,
Atom::AtomType rightType,
- const QString& string)
+ const QString &string)
{
if (paraState == OutsideParagraph) {
@@ -2749,7 +2749,7 @@ QString DocParser::endCmdName(int cmd)
return cmdName(endCmdFor(cmd));
}
-QString DocParser::untabifyEtc(const QString& str)
+QString DocParser::untabifyEtc(const QString &str)
{
QString result;
result.reserve(str.length());
@@ -2783,7 +2783,7 @@ QString DocParser::untabifyEtc(const QString& str)
return result;
}
-int DocParser::indentLevel(const QString& str)
+int DocParser::indentLevel(const QString &str)
{
int minIndent = INT_MAX;
int column = 0;
@@ -2801,7 +2801,7 @@ int DocParser::indentLevel(const QString& str)
return minIndent;
}
-QString DocParser::unindent(int level, const QString& str)
+QString DocParser::unindent(int level, const QString &str)
{
if (level == 0)
return str;
@@ -2823,7 +2823,7 @@ QString DocParser::unindent(int level, const QString& str)
return t;
}
-QString DocParser::slashed(const QString& str)
+QString DocParser::slashed(const QString &str)
{
QString result = str;
result.replace(QLatin1Char('/'), "\\/");
@@ -2862,18 +2862,18 @@ bool DocParser::isQuote(const Atom *atom)
QML documentation, there is the case where the qdoc \e{qmlproperty}
command can appear multiple times in a qdoc comment.
*/
-Doc::Doc(const Location& start_loc,
- const Location& end_loc,
- const QString& source,
- const QSet<QString>& metaCommandSet,
- const QSet<QString>& topics)
+Doc::Doc(const Location &start_loc,
+ const Location &end_loc,
+ const QString &source,
+ const QSet<QString> &metaCommandSet,
+ const QSet<QString> &topics)
{
priv = new DocPrivate(start_loc,end_loc,source);
DocParser parser;
parser.parse(source,priv,metaCommandSet,topics);
}
-Doc::Doc(const Doc& doc)
+Doc::Doc(const Doc &doc)
: priv(nullptr)
{
operator=(doc);
@@ -2885,7 +2885,7 @@ Doc::~Doc()
delete priv;
}
-Doc &Doc::operator=(const Doc& doc)
+Doc &Doc::operator=(const Doc &doc)
{
if (doc.priv)
doc.priv->ref();
@@ -2941,7 +2941,7 @@ const Location &Doc::location() const
/*!
Returns the starting location of a qdoc comment.
*/
-const Location& Doc::startLocation() const
+const Location &Doc::startLocation() const
{
return location();
}
@@ -2949,7 +2949,7 @@ const Location& Doc::startLocation() const
/*!
Returns the ending location of a qdoc comment.
*/
-const Location& Doc::endLocation() const
+const Location &Doc::endLocation() const
{
static const Location dummy;
return priv == nullptr ? dummy : priv->end_loc;
@@ -2966,7 +2966,7 @@ bool Doc::isEmpty() const
return priv == nullptr || priv->src.isEmpty();
}
-const Text& Doc::body() const
+const Text &Doc::body() const
{
static const Text dummy;
return priv == nullptr ? dummy : priv->text;
@@ -3103,12 +3103,12 @@ bool Doc::isMarkedReimp() const
current qdoc comment. Normally there is only one, but there
can be multiple \e{qmlproperty} commands, for example.
*/
-const TopicList& Doc::topicsUsed() const
+const TopicList &Doc::topicsUsed() const
{
return priv == nullptr ? *nullTopicList() : priv->topics_;
}
-ArgList Doc::metaCommandArgs(const QString& metacommand) const
+ArgList Doc::metaCommandArgs(const QString &metacommand) const
{
return priv == nullptr ? ArgList() : priv->metaCommandMap.value(metacommand);
}
@@ -3162,9 +3162,9 @@ const QStringMultiMap &Doc::metaTagMap() const
return priv && priv->extra ? priv->extra->metaMap_ : *null_QStringMultiMap();
}
-const Config* Doc::config_ = nullptr;
+const Config *Doc::config_ = nullptr;
-void Doc::initialize(const Config& config)
+void Doc::initialize(const Config &config)
{
DocParser::tabSize = config.getInt(CONFIG_TABSIZE);
DocParser::exampleFiles = config.getCanonicalPathList(CONFIG_EXAMPLES);
@@ -3280,7 +3280,7 @@ QString Doc::alias(const QString &english)
Trims the deadwood out of \a str. i.e., this function
cleans up \a str.
*/
-void Doc::trimCStyleComment(Location& location, QString& str)
+void Doc::trimCStyleComment(Location &location, QString &str)
{
QString cleaned;
Location m = location;
@@ -3423,7 +3423,7 @@ void Doc::detach()
*/
TopicRef::~TopicRef()
{
- foreach (DitaRef* t, subrefs_) {
+ foreach (DitaRef *t, subrefs_) {
delete t;
}
}
diff --git a/src/qdoc/doc.h b/src/qdoc/doc.h
index d6b63fd4d..84c198a4b 100644
--- a/src/qdoc/doc.h
+++ b/src/qdoc/doc.h
@@ -59,13 +59,13 @@ struct Topic
QString topic;
QString args;
Topic() { }
- Topic(QString& t, const QString &a) : topic(t), args(a) { }
+ Topic(QString &t, const QString &a) : topic(t), args(a) { }
bool isEmpty() const { return topic.isEmpty(); }
void clear() { topic.clear(); args.clear(); }
};
typedef QList<Topic> TopicList;
-typedef QList<DitaRef*> DitaRefList;
+typedef QList<DitaRef *> DitaRefList;
class DitaRef
{
@@ -73,13 +73,13 @@ public:
DitaRef() { }
virtual ~DitaRef() { }
- const QString& navtitle() const { return navtitle_; }
- const QString& href() const { return href_; }
- void setNavtitle(const QString& t) { navtitle_ = t; }
- void setHref(const QString& t) { href_ = t; }
+ const QString &navtitle() const { return navtitle_; }
+ const QString &href() const { return href_; }
+ void setNavtitle(const QString &t) { navtitle_ = t; }
+ void setHref(const QString &t) { href_ = t; }
virtual bool isMapRef() const = 0;
- virtual const DitaRefList* subrefs() const { return nullptr; }
- virtual void appendSubref(DitaRef* ) { }
+ virtual const DitaRefList *subrefs() const { return nullptr; }
+ virtual void appendSubref(DitaRef *) { }
private:
QString navtitle_;
@@ -93,8 +93,8 @@ public:
~TopicRef();
bool isMapRef() const override { return false; }
- const DitaRefList* subrefs() const override { return &subrefs_; }
- void appendSubref(DitaRef* t) override { subrefs_.append(t); }
+ const DitaRefList *subrefs() const override { return &subrefs_; }
+ void appendSubref(DitaRef *t) override { subrefs_.append(t); }
private:
DitaRefList subrefs_;
@@ -126,25 +126,25 @@ public:
};
Doc() : priv(nullptr) {}
- Doc(const Location& start_loc,
- const Location& end_loc,
- const QString& source,
- const QSet<QString>& metaCommandSet,
- const QSet<QString>& topics);
+ Doc(const Location &start_loc,
+ const Location &end_loc,
+ const QString &source,
+ const QSet<QString> &metaCommandSet,
+ const QSet<QString> &topics);
Doc(const Doc &doc);
~Doc();
- Doc& operator=( const Doc& doc );
+ Doc &operator=(const Doc &doc);
void simplifyEnumDoc();
void setBody(const Text &body);
const DitaRefList& ditamap() const;
const Location &location() const;
- const Location& startLocation() const;
- const Location& endLocation() const;
+ const Location &startLocation() const;
+ const Location &endLocation() const;
bool isEmpty() const;
- const QString& source() const;
- const Text& body() const;
+ const QString &source() const;
+ const Text &body() const;
Text briefText(bool inclusive = false) const;
Text trimmedBriefText(const QString &className) const;
Text legaleseText() const;
@@ -153,8 +153,8 @@ public:
const QStringList &enumItemNames() const;
const QStringList &omitEnumItemNames() const;
const QSet<QString> &metaCommandsUsed() const;
- const TopicList& topicsUsed() const;
- ArgList metaCommandArgs(const QString& metaCommand) const;
+ const TopicList &topicsUsed() const;
+ ArgList metaCommandArgs(const QString &metaCommand) const;
const QList<Text> &alsoList() const;
bool hasTableOfContents() const;
bool hasKeywords() const;
@@ -167,22 +167,22 @@ public:
const QList<Atom *> &targets() const;
const QStringMultiMap &metaTagMap() const;
- static void initialize( const Config &config );
+ static void initialize(const Config &config);
static void terminate();
- static QString alias( const QString &english );
- static void trimCStyleComment( Location& location, QString& str );
- static QString resolveFile(const Location &location,const QString &fileName,
+ static QString alias(const QString &english);
+ static void trimCStyleComment(Location &location, QString &str);
+ static QString resolveFile(const Location &location, const QString &fileName,
QString *userFriendlyFilePath = nullptr);
static CodeMarker *quoteFromFile(const Location &location,
Quoter &quoter,
const QString &fileName);
static QString canonicalTitle(const QString &title);
- static const Config* config() { return config_; }
+ static const Config *config() { return config_; }
private:
void detach();
DocPrivate *priv;
- static const Config* config_;
+ static const Config *config_;
};
Q_DECLARE_TYPEINFO(Doc, Q_MOVABLE_TYPE);
typedef QList<Doc> DocList;
diff --git a/src/qdoc/editdistance.cpp b/src/qdoc/editdistance.cpp
index aa7e16b3f..4731fbbdc 100644
--- a/src/qdoc/editdistance.cpp
+++ b/src/qdoc/editdistance.cpp
@@ -34,7 +34,7 @@
QT_BEGIN_NAMESPACE
-int editDistance( const QString& s, const QString& t )
+int editDistance(const QString &s, const QString &t)
{
#define D( i, j ) d[(i) * n + (j)]
int i;
@@ -66,7 +66,7 @@ int editDistance( const QString& s, const QString& t )
#undef D
}
-QString nearestName( const QString& actual, const QSet<QString>& candidates )
+QString nearestName(const QString &actual, const QSet<QString> &candidates)
{
if (actual.isEmpty())
return QString();
@@ -76,22 +76,22 @@ QString nearestName( const QString& actual, const QSet<QString>& candidates )
QString best;
QSet<QString>::ConstIterator c = candidates.constBegin();
- while ( c != candidates.constEnd() ) {
- if ( (*c)[0] == actual[0] ) {
- int delta = editDistance( actual, *c );
- if ( delta < deltaBest ) {
+ while (c != candidates.constEnd()) {
+ if ((*c)[0] == actual[0]) {
+ int delta = editDistance(actual, *c);
+ if (delta < deltaBest) {
deltaBest = delta;
numBest = 1;
best = *c;
- } else if ( delta == deltaBest ) {
+ } else if (delta == deltaBest) {
numBest++;
}
}
++c;
}
- if ( numBest == 1 && deltaBest <= 2 &&
- actual.length() + best.length() >= 5 ) {
+ if (numBest == 1 && deltaBest <= 2 &&
+ actual.length() + best.length() >= 5) {
return best;
} else {
return QString();
diff --git a/src/qdoc/editdistance.h b/src/qdoc/editdistance.h
index 63471b3b1..c7ea080cd 100644
--- a/src/qdoc/editdistance.h
+++ b/src/qdoc/editdistance.h
@@ -38,8 +38,8 @@
QT_BEGIN_NAMESPACE
-int editDistance( const QString& s, const QString& t );
-QString nearestName( const QString& actual, const QSet<QString>& candidates );
+int editDistance(const QString &s, const QString &t);
+QString nearestName(const QString &actual, const QSet<QString> &candidates);
QT_END_NAMESPACE
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index 93d4c9af1..87dba3d9f 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -51,7 +51,7 @@
QT_BEGIN_NAMESPACE
-Generator* Generator::currentGenerator_;
+Generator *Generator::currentGenerator_;
QStringList Generator::exampleDirs;
QStringList Generator::exampleImgExts;
QMap<QString, QMap<QString, QString> > Generator::fmtLeftMaps;
@@ -79,7 +79,7 @@ bool Generator::qdocSingleExec_ = false;
bool Generator::qdocWriteQaPages_ = false;
bool Generator::useOutputSubdirs_ = true;
bool Generator::useTimestamps_ = false;
-QmlTypeNode* Generator::qmlTypeContext_ = nullptr;
+QmlTypeNode *Generator::qmlTypeContext_ = nullptr;
static QRegExp tag("</?@[^>]*>");
static QLatin1String amp("&amp;");
@@ -92,13 +92,13 @@ static inline void setDebugEnabled(bool v)
const_cast<QLoggingCategory &>(lcQdoc()).setEnabled(QtDebugMsg, v);
}
-void Generator::startDebugging(const QString& message)
+void Generator::startDebugging(const QString &message)
{
setDebugEnabled(true);
qCDebug(lcQdoc, "START DEBUGGING: %s", qPrintable(message));
}
-void Generator::stopDebugging(const QString& message)
+void Generator::stopDebugging(const QString &message)
{
qCDebug(lcQdoc, "STOP DEBUGGING: %s", qPrintable(message));
setDebugEnabled(false);
@@ -138,7 +138,7 @@ Generator::~Generator()
generators.removeAll(this);
}
-void Generator::appendFullName(Text& text,
+void Generator::appendFullName(Text &text,
const Node *apparentNode,
const Node *relative,
const Node *actualNode)
@@ -151,9 +151,9 @@ void Generator::appendFullName(Text& text,
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
}
-void Generator::appendFullName(Text& text,
+void Generator::appendFullName(Text &text,
const Node *apparentNode,
- const QString& fullName,
+ const QString &fullName,
const Node *actualNode)
{
if (actualNode == nullptr)
@@ -164,7 +164,7 @@ void Generator::appendFullName(Text& text,
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
}
-void Generator::appendFullNames(Text& text, const NodeList& nodes, const Node* relative)
+void Generator::appendFullNames(Text &text, const NodeList &nodes, const Node *relative)
{
NodeList::ConstIterator n = nodes.constBegin();
int index = 0;
@@ -180,7 +180,7 @@ void Generator::appendFullNames(Text& text, const NodeList& nodes, const Node* r
\a text, so that is is a link to the documentation for that
function.
*/
-void Generator::appendSignature(Text& text, const Node* node)
+void Generator::appendSignature(Text &text, const Node *node)
{
text << Atom(Atom::LinkNode, CodeMarker::stringForNode(node))
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
@@ -193,7 +193,7 @@ void Generator::appendSignature(Text& text, const Node* node)
nodes are in \a nodes. It uses the \a relative node and the
\a marker for the generation.
*/
-void Generator::signatureList(const NodeList& nodes, const Node* relative, CodeMarker* marker)
+void Generator::signatureList(const NodeList &nodes, const Node *relative, CodeMarker *marker)
{
Text text;
int count = 0;
@@ -210,7 +210,7 @@ void Generator::signatureList(const NodeList& nodes, const Node* relative, CodeM
generateText(text, relative, marker);
}
-int Generator::appendSortedNames(Text& text, const ClassNode* cn, const QList<RelatedClass>& rc)
+int Generator::appendSortedNames(Text &text, const ClassNode *cn, const QList<RelatedClass> &rc)
{
QList<RelatedClass>::ConstIterator r;
QMap<QString,Text> classMap;
@@ -218,7 +218,7 @@ int Generator::appendSortedNames(Text& text, const ClassNode* cn, const QList<Re
r = rc.constBegin();
while (r != rc.constEnd()) {
- ClassNode* rcn = (*r).node_;
+ ClassNode *rcn = (*r).node_;
if (rcn && rcn->isInAPI()) {
Text className;
appendFullName(className, rcn, cn);
@@ -237,7 +237,7 @@ int Generator::appendSortedNames(Text& text, const ClassNode* cn, const QList<Re
return index;
}
-int Generator::appendSortedQmlNames(Text& text, const Node* base, const NodeList& subs)
+int Generator::appendSortedQmlNames(Text &text, const Node *base, const NodeList &subs)
{
QMap<QString,Text> classMap;
int index = 0;
@@ -283,7 +283,7 @@ void Generator::writeOutFileNames()
\sa beginSubPage()
*/
-void Generator::beginFilePage(const Node* node, const QString& fileName)
+void Generator::beginFilePage(const Node *node, const QString &fileName)
{
QString path = outputDir() + QLatin1Char('/');
if (Generator::useOutputSubdirs() && !node->outputSubdirectory().isEmpty() &&
@@ -318,10 +318,10 @@ void Generator::beginFilePage(const Node* node, const QString& fileName)
\sa beginFilePage()
*/
-void Generator::beginSubPage(const Node* node, const QString& fileName)
+void Generator::beginSubPage(const Node *node, const QString &fileName)
{
beginFilePage(node, fileName);
- const_cast<Node*>(node)->setOutputFileName(fileName);
+ const_cast<Node *>(node)->setOutputFileName(fileName);
}
/*!
@@ -433,7 +433,7 @@ QString Generator::fileBase(const Node *node) const
p = pp;
}
if (node->isNamespace() && !node->name().isEmpty()) {
- const NamespaceNode* ns = static_cast<const NamespaceNode*>(node);
+ const NamespaceNode *ns = static_cast<const NamespaceNode *>(node);
if (!ns->isDocumentedHere()) {
base.append(QLatin1String("-sub-"));
base.append(ns->tree()->camelCaseModuleName());
@@ -443,7 +443,7 @@ QString Generator::fileBase(const Node *node) const
QString res;
transmogrify(base, res);
- Node* n = const_cast<Node*>(node);
+ Node *n = const_cast<Node *>(node);
n->setFileNameBase(res);
return res;
}
@@ -473,7 +473,7 @@ QString Generator::linkForExampleFile(const QString &path, const Node *parent)
either the provided \a extension or fileExtension(), and
return the constructed name.
*/
-QString Generator::fileName(const Node* node, const QString &extension) const
+QString Generator::fileName(const Node *node, const QString &extension) const
{
if (!node->url().isEmpty())
return node->url();
@@ -482,7 +482,7 @@ QString Generator::fileName(const Node* node, const QString &extension) const
return extension.isNull() ? name + fileExtension() : name + extension;
}
-QString Generator::cleanRef(const QString& ref)
+QString Generator::cleanRef(const QString &ref)
{
QString clean;
@@ -535,12 +535,12 @@ QString Generator::cleanRef(const QString& ref)
return clean;
}
-QMap<QString, QString>& Generator::formattingLeftMap()
+QMap<QString, QString> &Generator::formattingLeftMap()
{
return fmtLeftMaps[format()];
}
-QMap<QString, QString>& Generator::formattingRightMap()
+QMap<QString, QString> &Generator::formattingRightMap()
{
return fmtRightMaps[format()];
}
@@ -794,7 +794,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
that has no documentation.
*/
if (node->isFunction()) {
- const FunctionNode* func = static_cast<const FunctionNode*>(node);
+ const FunctionNode *func = static_cast<const FunctionNode *>(node);
if (func->isDtor()) {
Text text;
text << "Destroys the instance of ";
@@ -946,7 +946,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
// For examples, generate either a link to the project directory
// (if url.examples is defined), or a list of files/images.
if (node->isExample()) {
- const ExampleNode* en = static_cast<const ExampleNode*>(node);
+ const ExampleNode *en = static_cast<const ExampleNode *>(node);
QString exampleUrl = config()->getString(CONFIG_URL + Config::dot + CONFIG_EXAMPLES);
if (!exampleUrl.isEmpty()) {
generateLinkToExample(en, marker, exampleUrl);
@@ -1007,7 +1007,7 @@ void Generator::generateLinkToExample(const ExampleNode *en,
example. The images are copied into a subtree of
\c{...doc/html/images/used-in-examples/...}
*/
-void Generator::generateFileList(const ExampleNode* en, CodeMarker* marker, bool images)
+void Generator::generateFileList(const ExampleNode *en, CodeMarker *marker, bool images)
{
Text text;
OpenedList openedList(OpenedList::Bullet);
@@ -1122,7 +1122,7 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker)
/*!
Recursive writing of HTML files from the root \a node.
*/
-void Generator::generateDocumentation(Node* node)
+void Generator::generateDocumentation(Node *node)
{
if (!node->url().isNull())
return;
@@ -1162,7 +1162,7 @@ void Generator::generateDocumentation(Node* node)
members of cn in the other modules and add them
to the members list.
*/
- CollectionNode* cn = static_cast<CollectionNode*>(node);
+ CollectionNode *cn = static_cast<CollectionNode *>(node);
if (cn->wasSeen()) {
qdb_->mergeCollections(cn);
beginSubPage(node, fileName(node));
@@ -1181,34 +1181,34 @@ void Generator::generateDocumentation(Node* node)
}
} else if (node->isTextPageNode()) {
beginSubPage(node, fileName(node));
- generatePageNode(static_cast<PageNode*>(node), marker);
+ generatePageNode(static_cast<PageNode *>(node), marker);
endSubPage();
} else if (node->isAggregate()) {
if ((node->isClassNode() || node->isHeader() || node->isNamespace()) &&
node->docMustBeGenerated()) {
beginSubPage(node, fileName(node));
- generateCppReferencePage(static_cast<Aggregate*>(node), marker);
+ generateCppReferencePage(static_cast<Aggregate *>(node), marker);
endSubPage();
} else if (node->isQmlType() || node->isJsType()) {
beginSubPage(node, fileName(node));
- QmlTypeNode* qcn = static_cast<QmlTypeNode*>(node);
+ QmlTypeNode *qcn = static_cast<QmlTypeNode *>(node);
generateQmlTypePage(qcn, marker);
endSubPage();
} else if (node->isQmlBasicType() || node->isJsBasicType()) {
beginSubPage(node, fileName(node));
- QmlBasicTypeNode* qbtn = static_cast<QmlBasicTypeNode*>(node);
+ QmlBasicTypeNode *qbtn = static_cast<QmlBasicTypeNode *>(node);
generateQmlBasicTypePage(qbtn, marker);
endSubPage();
} else if (node->isProxyNode()) {
beginSubPage(node, fileName(node));
- generateProxyPage(static_cast<Aggregate*>(node), marker);
+ generateProxyPage(static_cast<Aggregate *>(node), marker);
endSubPage();
}
}
}
if (node->isAggregate()) {
- Aggregate* aggregate = static_cast<Aggregate*>(node);
+ Aggregate *aggregate = static_cast<Aggregate *>(node);
const NodeList &children = aggregate->childNodes();
foreach (Node *n, children) {
if (n->isPageNode() && !n->isPrivate())
@@ -1220,7 +1220,7 @@ void Generator::generateDocumentation(Node* node)
/*!
Generate a list of maintainers in the output
*/
-void Generator::generateMaintainerList(const Aggregate* node, CodeMarker* marker)
+void Generator::generateMaintainerList(const Aggregate *node, CodeMarker *marker)
{
QStringList sl = getMetadataElements(node,"maintainer");
@@ -1243,8 +1243,8 @@ void Generator::generateMaintainerList(const Aggregate* node, CodeMarker* marker
Output the "Inherit by" list for the QML element,
if it is inherited by any other elements.
*/
-void Generator::generateQmlInheritedBy(const QmlTypeNode* qcn,
- CodeMarker* marker)
+void Generator::generateQmlInheritedBy(const QmlTypeNode *qcn,
+ CodeMarker *marker)
{
if (qcn) {
NodeList subs;
@@ -1263,12 +1263,12 @@ void Generator::generateQmlInheritedBy(const QmlTypeNode* qcn,
Extract sections of markup text surrounded by \e qmltext
and \e endqmltext and output them.
*/
-bool Generator::generateQmlText(const Text& text,
+bool Generator::generateQmlText(const Text &text,
const Node *relative,
CodeMarker *marker,
- const QString& /* qmlName */ )
+ const QString &/* qmlName */ )
{
- const Atom* atom = text.firstAtom();
+ const Atom *atom = text.firstAtom();
bool result = false;
if (atom != nullptr) {
@@ -1294,7 +1294,7 @@ void Generator::generateReimplementsClause(const FunctionNode *fn, CodeMarker *m
{
if (!fn->overridesThis().isEmpty()) {
if (fn->parent()->isClassNode()) {
- ClassNode* cn = static_cast<ClassNode*>(fn->parent());
+ ClassNode *cn = static_cast<ClassNode *>(fn->parent());
const FunctionNode *overrides = cn->findOverriddenFunction(fn);
if (overrides && !overrides->isPrivate() && !overrides->parent()->isPrivate()) {
if (overrides->hasDoc()) {
@@ -1307,7 +1307,7 @@ void Generator::generateReimplementsClause(const FunctionNode *fn, CodeMarker *m
return;
}
}
- const PropertyNode* sameName = cn->findOverriddenProperty(fn);
+ const PropertyNode *sameName = cn->findOverriddenProperty(fn);
if (sameName && sameName->hasDoc()) {
Text text;
text << Atom::ParaLeft << "Reimplements an access function for property: ";
@@ -1398,7 +1398,7 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker)
"The signal is private, not emitted by the user.
The function is public so the user can pass it to connect()."
*/
-void Generator::generatePrivateSignalNote(const Node* node, CodeMarker* marker)
+void Generator::generatePrivateSignalNote(const Node *node, CodeMarker *marker)
{
Text text;
text << Atom::ParaLeft
@@ -1414,7 +1414,7 @@ void Generator::generatePrivateSignalNote(const Node* node, CodeMarker* marker)
Generates a bold line that says:
"This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE."
*/
-void Generator::generateInvokableNote(const Node* node, CodeMarker* marker)
+void Generator::generateInvokableNote(const Node *node, CodeMarker *marker)
{
Text text;
text << Atom::ParaLeft
@@ -1436,7 +1436,7 @@ void Generator::generateInvokableNote(const Node* node, CodeMarker* marker)
is the node that reporesentas the entity where a qdoc comment
was found, and \a text represents the qdoc comment.
*/
-bool Generator::generateText(const Text& text,
+bool Generator::generateText(const Text &text,
const Node *relative,
CodeMarker *marker)
{
@@ -1463,14 +1463,14 @@ bool Generator::generateText(const Text& text,
nonreentrant, and true is returned. If there are no exceptions,
the three node lists remain empty and false is returned.
*/
-static bool hasExceptions(const Node* node,
- NodeList& reentrant,
- NodeList& threadsafe,
- NodeList& nonreentrant)
+static bool hasExceptions(const Node *node,
+ NodeList &reentrant,
+ NodeList &threadsafe,
+ NodeList &nonreentrant)
{
bool result = false;
Node::ThreadSafeness ts = node->threadSafeness();
- const NodeList &children = static_cast<const Aggregate*>(node)->childNodes();
+ const NodeList &children = static_cast<const Aggregate *>(node)->childNodes();
foreach (Node *n, children) {
if (!n->isObsolete()){
switch (n->threadSafeness()) {
@@ -1496,7 +1496,7 @@ static bool hasExceptions(const Node* node,
return result;
}
-static void startNote(Text& text)
+static void startNote(Text &text)
{
text << Atom::ParaLeft
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
@@ -1625,7 +1625,7 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker)
function is supposed to do, so I have not tried to complete the comment
yet.
*/
-void Generator::generateOverloadedSignal(const Node* node, CodeMarker* marker)
+void Generator::generateOverloadedSignal(const Node *node, CodeMarker *marker)
{
if (!node->isFunction())
return;
@@ -1681,7 +1681,7 @@ void Generator::generateDocs()
generateDocumentation(qdb_->primaryTreeRoot());
}
-Generator *Generator::generatorForFormat(const QString& format)
+Generator *Generator::generatorForFormat(const QString &format)
{
QList<Generator *>::ConstIterator g = generators.constBegin();
while (g != generators.constEnd()) {
@@ -1701,7 +1701,7 @@ Generator *Generator::generatorForFormat(const QString& format)
i.e. Once you call this function for a particular \a t,
you consume \a t.
*/
-QString Generator::getMetadataElement(const Aggregate* inner, const QString& t)
+QString Generator::getMetadataElement(const Aggregate *inner, const QString &t)
{
QString s;
QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap());
@@ -1722,7 +1722,7 @@ QString Generator::getMetadataElement(const Aggregate* inner, const QString& t)
having the key \a t are erased. i.e. Once you call this
function for a particular \a t, you consume \a t.
*/
-QStringList Generator::getMetadataElements(const Aggregate* inner, const QString& t)
+QStringList Generator::getMetadataElements(const Aggregate *inner, const QString &t)
{
QStringList s;
QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap());
@@ -1735,7 +1735,7 @@ QStringList Generator::getMetadataElements(const Aggregate* inner, const QString
/*!
Returns a relative path name for an image.
*/
-QString Generator::imageFileName(const Node *relative, const QString& fileBase)
+QString Generator::imageFileName(const Node *relative, const QString &fileBase)
{
QString userFriendlyFilePath;
QString filePath = Config::findFile(relative->doc().location(),
@@ -1759,7 +1759,7 @@ QString Generator::imageFileName(const Node *relative, const QString& fileBase)
return relImagePath;
}
-QString Generator::indent(int level, const QString& markedCode)
+QString Generator::indent(int level, const QString &markedCode)
{
if (level == 0)
return markedCode;
@@ -1937,7 +1937,7 @@ void Generator::initializeFormat(const Config &config)
Appends each directory path in \a moreImageDirs to the
list of image directories.
*/
-void Generator::augmentImageDirs(QSet<QString>& moreImageDirs)
+void Generator::augmentImageDirs(QSet<QString> &moreImageDirs)
{
if (moreImageDirs.isEmpty())
return;
@@ -1951,7 +1951,7 @@ void Generator::augmentImageDirs(QSet<QString>& moreImageDirs)
/*!
Sets the generator's pointer to the Config instance.
*/
-void Generator::initializeGenerator(const Config& config)
+void Generator::initializeGenerator(const Config &config)
{
config_ = &config;
showInternal_ = config.getBool(CONFIG_SHOWINTERNAL);
@@ -1975,7 +1975,7 @@ QTextStream &Generator::out()
QString Generator::outFileName()
{
- return QFileInfo(static_cast<QFile*>(out().device())->fileName()).fileName();
+ return QFileInfo(static_cast<QFile *>(out().device())->fileName()).fileName();
}
QString Generator::outputPrefix(const Node *node)
@@ -1999,12 +1999,12 @@ QString Generator::outputSuffix(const Node *node)
return QString();
}
-bool Generator::parseArg(const QString& src,
- const QString& tag,
- int* pos,
+bool Generator::parseArg(const QString &src,
+ const QString &tag,
+ int *pos,
int n,
- QStringRef* contents,
- QStringRef* par1,
+ QStringRef *contents,
+ QStringRef *par1,
bool debug)
{
#define SKIP_CHAR(c) \
@@ -2097,7 +2097,7 @@ bool Generator::parseArg(const QString& src,
#undef SKIP_CHAR
}
-QString Generator::plainCode(const QString& markedCode)
+QString Generator::plainCode(const QString &markedCode)
{
QString t = markedCode;
t.replace(tag, QString());
@@ -2108,12 +2108,12 @@ QString Generator::plainCode(const QString& markedCode)
return t;
}
-void Generator::setImageFileExtensions(const QStringList& extensions)
+void Generator::setImageFileExtensions(const QStringList &extensions)
{
imgFileExts[format()] = extensions;
}
-void Generator::singularPlural(Text& text, const NodeList& nodes)
+void Generator::singularPlural(Text &text, const NodeList &nodes)
{
if (nodes.count() == 1)
text << " is";
@@ -2223,7 +2223,7 @@ void Generator::terminateGenerator()
Trims trailing whitespace off the \a string and returns
the trimmed string.
*/
-QString Generator::trimmedTrailing(const QString& string, const QString &prefix, const QString &suffix)
+QString Generator::trimmedTrailing(const QString &string, const QString &prefix, const QString &suffix)
{
QString trimmed = string;
while (trimmed.length() > 0 && trimmed[trimmed.length() - 1].isSpace())
@@ -2256,7 +2256,7 @@ QString Generator::typeString(const Node *node)
case Node::Typedef:
return "typedef";
case Node::Function: {
- const FunctionNode *fn = static_cast<const FunctionNode*>(node);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(node);
switch (fn->metaness()) {
case FunctionNode::JsSignal:
case FunctionNode::QmlSignal:
diff --git a/src/qdoc/generator.h b/src/qdoc/generator.h
index 68b788beb..27a65bc8a 100644
--- a/src/qdoc/generator.h
+++ b/src/qdoc/generator.h
@@ -40,8 +40,8 @@
QT_BEGIN_NAMESPACE
-typedef QMultiMap<QString, Node*> NodeMultiMap;
-typedef QMap<Node*, NodeMultiMap> ParentMaps;
+typedef QMultiMap<QString, Node *> NodeMultiMap;
+typedef QMap<Node *, NodeMultiMap> ParentMaps;
class Config;
class CodeMarker;
@@ -67,20 +67,20 @@ public:
virtual void terminateGenerator();
QString fullDocumentLocation(const Node *node, bool useSubdir = false);
- const Config* config() { return config_; }
+ const Config *config() { return config_; }
QString linkForExampleFile(const QString &path, const Node *parent);
static Generator *currentGenerator() { return currentGenerator_; }
- static Generator *generatorForFormat(const QString& format);
- static void initialize(const Config& config);
- static const QString& outputDir() { return outDir_; }
- static const QString& outputSubdir() { return outSubdir_; }
+ static Generator *generatorForFormat(const QString &format);
+ static void initialize(const Config &config);
+ static const QString &outputDir() { return outDir_; }
+ static const QString &outputSubdir() { return outSubdir_; }
static void terminate();
- static const QStringList& outputFileNames() { return outFileNames_; }
+ static const QStringList &outputFileNames() { return outFileNames_; }
static void writeOutFileNames();
- static void augmentImageDirs(QSet<QString>& moreImageDirs);
- static void startDebugging(const QString& message);
- static void stopDebugging(const QString& message);
+ static void augmentImageDirs(QSet<QString> &moreImageDirs);
+ static void startDebugging(const QString &message);
+ static void stopDebugging(const QString &message);
static bool debugging();
static bool noLinkErrors() { return noLinkErrors_; }
static bool autolinkErrors() { return autolinkErrors_; }
@@ -96,18 +96,18 @@ public:
static QString defaultModuleName() { return project_; }
static void resetUseOutputSubdirs() { useOutputSubdirs_ = false; }
static bool useOutputSubdirs() { return useOutputSubdirs_; }
- static void setQmlTypeContext(QmlTypeNode* t) { qmlTypeContext_ = t; }
- static QmlTypeNode* qmlTypeContext() { return qmlTypeContext_; }
- static QString cleanRef(const QString& ref);
- static QString plainCode(const QString& markedCode);
+ static void setQmlTypeContext(QmlTypeNode *t) { qmlTypeContext_ = t; }
+ static QmlTypeNode *qmlTypeContext() { return qmlTypeContext_; }
+ static QString cleanRef(const QString &ref);
+ static QString plainCode(const QString &markedCode);
static bool useTimestamps() { return useTimestamps_; }
protected:
- void beginFilePage(const Node* node, const QString& fileName);
+ void beginFilePage(const Node *node, const QString &fileName);
void endFilePage() { endSubPage(); } // for symmetry
- void beginSubPage(const Node* node, const QString& fileName);
+ void beginSubPage(const Node *node, const QString &fileName);
void endSubPage();
- virtual QString fileBase(const Node* node) const;
+ virtual QString fileBase(const Node *node) const;
virtual QString fileExtension() const = 0;
virtual void generateQAPage() { }
virtual void generateExampleFilePage(const Node *, const QString &, CodeMarker *) {}
@@ -123,61 +123,61 @@ protected:
virtual void generateGenericCollectionPage(CollectionNode *, CodeMarker *) {}
virtual void generateInheritedBy(const ClassNode *classe, CodeMarker *marker);
virtual void generateInherits(const ClassNode *classe, CodeMarker *marker);
- virtual void generateDocumentation(Node* node);
- virtual void generateMaintainerList(const Aggregate* node, CodeMarker* marker);
- virtual void generateQmlInheritedBy(const QmlTypeNode* qcn, CodeMarker* marker);
+ virtual void generateDocumentation(Node *node);
+ virtual void generateMaintainerList(const Aggregate *node, CodeMarker *marker);
+ virtual void generateQmlInheritedBy(const QmlTypeNode *qcn, CodeMarker *marker);
virtual void generateQmlInherits(QmlTypeNode *, CodeMarker *) {}
- virtual bool generateQmlText(const Text& text,
+ virtual bool generateQmlText(const Text &text,
const Node *relative,
CodeMarker *marker,
- const QString& qmlName);
- virtual bool generateText(const Text& text, const Node *relative, CodeMarker *marker);
- virtual QString imageFileName(const Node *relative, const QString& fileBase);
+ const QString &qmlName);
+ virtual bool generateText(const Text &text, const Node *relative, CodeMarker *marker);
+ virtual QString imageFileName(const Node *relative, const QString &fileBase);
virtual int skipAtoms(const Atom *atom, Atom::AtomType type) const;
virtual QString typeString(const Node *node);
static bool matchAhead(const Atom *atom, Atom::AtomType expectedAtomType);
- static QString outputPrefix(const Node* node);
- static QString outputSuffix(const Node* node);
- static void singularPlural(Text& text, const NodeList& nodes);
+ static QString outputPrefix(const Node *node);
+ static QString outputSuffix(const Node *node);
+ static void singularPlural(Text &text, const NodeList &nodes);
static void supplementAlsoList(const Node *node, QList<Text> &alsoList);
static QString trimmedTrailing(const QString &string,
const QString &prefix,
const QString &suffix);
void initializeTextOutput();
- QString fileName(const Node* node, const QString &extension = QString()) const;
+ QString fileName(const Node *node, const QString &extension = QString()) const;
QMap<QString, QString> &formattingLeftMap();
QMap<QString, QString> &formattingRightMap();
- const Atom* generateAtomList(const Atom *atom,
+ const Atom *generateAtomList(const Atom *atom,
const Node *relative,
CodeMarker *marker,
bool generate,
- int& numGeneratedAtoms);
+ int &numGeneratedAtoms);
void generateLinkToExample(const ExampleNode *en,
CodeMarker *marker,
const QString &baseUrl);
- void generateFileList(const ExampleNode* en, CodeMarker* marker, bool images);
+ void generateFileList(const ExampleNode *en, CodeMarker *marker, bool images);
void generateSince(const Node *node, CodeMarker *marker);
void generateStatus(const Node *node, CodeMarker *marker);
- void generatePrivateSignalNote(const Node* node, CodeMarker* marker);
- void generateInvokableNote(const Node* node, CodeMarker* marker);
+ void generatePrivateSignalNote(const Node *node, CodeMarker *marker);
+ void generateInvokableNote(const Node *node, CodeMarker *marker);
void generateThreadSafeness(const Node *node, CodeMarker *marker);
- QString getMetadataElement(const Aggregate* inner, const QString& t);
- QStringList getMetadataElements(const Aggregate* inner, const QString& t);
+ QString getMetadataElement(const Aggregate *inner, const QString &t);
+ QStringList getMetadataElements(const Aggregate *inner, const QString &t);
void generateOverloadedSignal(const Node *node, CodeMarker *marker);
- QString indent(int level, const QString& markedCode);
+ QString indent(int level, const QString &markedCode);
QTextStream& out();
QString outFileName();
- bool parseArg(const QString& src,
- const QString& tag,
- int* pos,
+ bool parseArg(const QString &src,
+ const QString &tag,
+ int *pos,
int n,
- QStringRef* contents,
- QStringRef* par1 = nullptr,
+ QStringRef *contents,
+ QStringRef *par1 = nullptr,
bool debug = false);
- void setImageFileExtensions(const QStringList& extensions);
+ void setImageFileExtensions(const QStringList &extensions);
void unknownAtom(const Atom *atom);
- int appendSortedQmlNames(Text& text, const Node* base, const NodeList& subs);
+ int appendSortedQmlNames(Text &text, const Node *base, const NodeList &subs);
QMap<QString, QStringList> editionGroupMap;
QMap<QString, QStringList> editionModuleMap;
@@ -187,23 +187,23 @@ protected:
QString outputEncoding;
#endif
QString tagFile_;
- QStack<QTextStream*> outStreamStack;
+ QStack<QTextStream *> outStreamStack;
- void appendFullName(Text& text,
+ void appendFullName(Text &text,
const Node *apparentNode,
const Node *relative,
const Node *actualNode = nullptr);
- void appendFullName(Text& text,
+ void appendFullName(Text &text,
const Node *apparentNode,
- const QString& fullName,
+ const QString &fullName,
const Node *actualNode);
- void appendFullNames(Text& text, const NodeList& nodes, const Node* relative);
- int appendSortedNames(Text& text, const ClassNode *classe, const QList<RelatedClass> &classes);
- void appendSignature(Text& text, const Node* node);
- void signatureList(const NodeList& nodes, const Node* relative, CodeMarker* marker);
+ void appendFullNames(Text &text, const NodeList &nodes, const Node *relative);
+ int appendSortedNames(Text &text, const ClassNode *classe, const QList<RelatedClass> &classes);
+ void appendSignature(Text &text, const Node *node);
+ void signatureList(const NodeList &nodes, const Node *relative, CodeMarker *marker);
private:
- static Generator* currentGenerator_;
+ static Generator *currentGenerator_;
static QStringList exampleDirs;
static QStringList exampleImgExts;
static QMap<QString, QMap<QString, QString> > fmtLeftMaps;
@@ -231,7 +231,7 @@ private:
static bool qdocWriteQaPages_;
static bool useOutputSubdirs_;
static bool useTimestamps_;
- static QmlTypeNode* qmlTypeContext_;
+ static QmlTypeNode *qmlTypeContext_;
void generateReimplementsClause(const FunctionNode *fn, CodeMarker *marker);
static bool compareNodes(Node *a, Node *b) { return (a->name() < b->name()); }
@@ -241,8 +241,8 @@ private:
const QString &subDir);
protected:
- const Config* config_;
- QDocDatabase* qdb_;
+ const Config *config_;
+ QDocDatabase *qdb_;
bool inLink_;
bool inContents_;
bool inSectionHeading_;
diff --git a/src/qdoc/helpprojectwriter.cpp b/src/qdoc/helpprojectwriter.cpp
index c3840d83f..4a07f023f 100644
--- a/src/qdoc/helpprojectwriter.cpp
+++ b/src/qdoc/helpprojectwriter.cpp
@@ -43,14 +43,14 @@ QT_BEGIN_NAMESPACE
HelpProjectWriter::HelpProjectWriter(const Config &config,
const QString &defaultFileName,
- Generator* g)
+ Generator *g)
{
reset(config, defaultFileName, g);
}
void HelpProjectWriter::reset(const Config &config,
const QString &defaultFileName,
- Generator* g)
+ Generator *g)
{
projects.clear();
gen_ = g;
@@ -271,8 +271,8 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
// Add all group members for '[group|module|qmlmodule]:name' selector
if (node->isGroup() || node->isModule() || node->isQmlModule()) {
if (project.subprojects[i].groups.contains(node->name().toLower())) {
- const CollectionNode* cn = static_cast<const CollectionNode*>(node);
- foreach (const Node* m, cn->members()) {
+ const CollectionNode *cn = static_cast<const CollectionNode *>(node);
+ foreach (const Node *m, cn->members()) {
QString memberName = m->isTextPageNode()
? m->fullTitle() : m->fullDocumentName();
project.subprojects[i].nodes[memberName] = m;
@@ -306,7 +306,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
case Node::JsType:
case Node::JsBasicType:
if (node->doc().hasKeywords()) {
- foreach (const Atom* keyword, node->doc().keywords()) {
+ foreach (const Atom *keyword, node->doc().keywords()) {
if (!keyword->string().isEmpty()) {
QStringList details;
details << keyword->string()
@@ -328,7 +328,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
case Node::Enum:
project.keywords.append(keywordDetails(node));
{
- const EnumNode *enumNode = static_cast<const EnumNode*>(node);
+ const EnumNode *enumNode = static_cast<const EnumNode *>(node);
foreach (const EnumItem &item, enumNode->items()) {
QStringList details;
@@ -353,10 +353,10 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
case Node::QmlModule:
case Node::JsModule:
{
- const CollectionNode* cn = static_cast<const CollectionNode*>(node);
+ const CollectionNode *cn = static_cast<const CollectionNode *>(node);
if (!cn->fullTitle().isEmpty()) {
if (cn->doc().hasKeywords()) {
- foreach (const Atom* keyword, cn->doc().keywords()) {
+ foreach (const Atom *keyword, cn->doc().keywords()) {
if (!keyword->string().isEmpty()) {
QStringList details;
details << keyword->string()
@@ -436,7 +436,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
// Page nodes (such as manual pages) contain subtypes, titles and other
// attributes.
case Node::Page: {
- const PageNode *pn = static_cast<const PageNode*>(node);
+ const PageNode *pn = static_cast<const PageNode *>(node);
if (!pn->fullTitle().isEmpty()) {
if (pn->doc().hasKeywords()) {
foreach (const Atom *keyword, pn->doc().keywords()) {
@@ -489,7 +489,7 @@ void HelpProjectWriter::generateSections(HelpProject &project, QXmlStreamWriter
const Aggregate *aggregate = static_cast<const Aggregate *>(node);
// Ensure that we don't visit nodes more than once.
- QSet<const Node*> childSet;
+ QSet<const Node *> childSet;
const NodeList &children = aggregate->childNodes();
foreach (const Node *child, children) {
if (child->isIndexNode() || child->isPrivate())
@@ -499,7 +499,7 @@ void HelpProjectWriter::generateSections(HelpProject &project, QXmlStreamWriter
} else {
// Store member status of children
project.memberStatus[node].insert(child->status());
- if (child->isFunction() && static_cast<const FunctionNode*>(child)->isOverload())
+ if (child->isFunction() && static_cast<const FunctionNode *>(child)->isOverload())
continue;
childSet << child;
}
@@ -612,7 +612,7 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer
case Node::Page: {
// Page nodes (such as manual pages) contain subtypes, titles and other
// attributes.
- const PageNode *pn = static_cast<const PageNode*>(node);
+ const PageNode *pn = static_cast<const PageNode *>(node);
writer.writeStartElement("section");
writer.writeAttribute("ref", href);
@@ -626,7 +626,7 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer
case Node::JsModule:
case Node::QmlModule:
{
- const CollectionNode* cn = static_cast<const CollectionNode*>(node);
+ const CollectionNode *cn = static_cast<const CollectionNode *>(node);
writer.writeStartElement("section");
writer.writeAttribute("ref", href);
writer.writeAttribute("title", cn->fullTitle());
@@ -643,7 +643,7 @@ void HelpProjectWriter::generateProject(HelpProject &project)
const Node *rootNode;
// Restrict searching only to the local (primary) tree
- QVector<Tree*> searchOrder = qdb_->searchOrder();
+ QVector<Tree *> searchOrder = qdb_->searchOrder();
qdb_->setLocalSearch();
if (!project.indexRoot.isEmpty())
@@ -698,7 +698,7 @@ void HelpProjectWriter::generateProject(HelpProject &project)
writer.writeStartElement("toc");
writer.writeStartElement("section");
- const Node* node = qdb_->findPageNodeByTitle(project.indexTitle);
+ const Node *node = qdb_->findPageNodeByTitle(project.indexTitle);
if (node == nullptr)
node = qdb_->findNodeByNameAndType(QStringList("index.html"), &Node::isPageNode);
QString indexPath;
@@ -811,7 +811,7 @@ void HelpProjectWriter::generateProject(HelpProject &project)
}
// No contents/nextpage links found, write all nodes unsorted
if (!contentsFound) {
- QList<const Node*> subnodes = subproject.nodes.values();
+ QList<const Node *> subnodes = subproject.nodes.values();
std::sort(subnodes.begin(), subnodes.end(), Node::nodeNameLessThan);
diff --git a/src/qdoc/helpprojectwriter.h b/src/qdoc/helpprojectwriter.h
index 05460769c..64ad3aaec 100644
--- a/src/qdoc/helpprojectwriter.h
+++ b/src/qdoc/helpprojectwriter.h
@@ -39,7 +39,7 @@ QT_BEGIN_NAMESPACE
class QDocDatabase;
class Generator;
-typedef QPair<QString, const Node*> QStringNodePair;
+typedef QPair<QString, const Node *> QStringNodePair;
using NodeTypeSet = QSet<unsigned char>;
@@ -71,7 +71,7 @@ struct HelpProject
QSet<QString> files;
QSet<QString> extraFiles;
QSet<QString> filterAttributes;
- QHash<QString, QSet<QString> > customFilters;
+ QHash<QString, QSet<QString>> customFilters;
QSet<QString> excluded;
QList<SubProject> subprojects;
QHash<const Node *, NodeStatusSet> memberStatus;
@@ -85,10 +85,10 @@ class HelpProjectWriter
public:
HelpProjectWriter(const Config &config,
const QString &defaultFileName,
- Generator* g);
+ Generator *g);
void reset(const Config &config,
const QString &defaultFileName,
- Generator* g);
+ Generator *g);
void addExtraFile(const QString &file);
void addExtraFiles(const QSet<QString> &files);
void generate();
@@ -108,8 +108,8 @@ private:
void writeSection(QXmlStreamWriter &writer, const QString &path,
const QString &value);
- QDocDatabase* qdb_;
- Generator* gen_;
+ QDocDatabase *qdb_;
+ Generator *gen_;
QString outputDir;
QList<HelpProject> projects;
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
index 47b833ba5..68831d716 100644
--- a/src/qdoc/htmlgenerator.cpp
+++ b/src/qdoc/htmlgenerator.cpp
@@ -302,15 +302,15 @@ QString HtmlGenerator::format()
Generate targets for any \keyword commands that were seen
in the qdoc comment for the \a node.
*/
-void HtmlGenerator::generateKeywordAnchors(const Node* node)
+void HtmlGenerator::generateKeywordAnchors(const Node *node)
{
Q_UNUSED(node);
// Disabled: keywords always link to the top of the QDoc
// comment they appear in, and do not use a dedicated anchor.
#if 0
if (!node->doc().isEmpty()) {
- const QList<Atom*>& keywords = node->doc().keywords();
- foreach (Atom* a, keywords) {
+ const QList<Atom *> &keywords = node->doc().keywords();
+ foreach (Atom *a, keywords) {
out() << QLatin1String("<a name=\"") << Doc::canonicalTitle(a->string()) << QLatin1String("\"></a>");
}
}
@@ -327,7 +327,7 @@ void HtmlGenerator::generateKeywordAnchors(const Node* node)
*/
void HtmlGenerator::generateDocs()
{
- Node* qflags = qdb_->findClassNode(QStringList("QFlags"));
+ Node *qflags = qdb_->findClassNode(QStringList("QFlags"));
if (qflags)
qflagsHref_ = linkForNode(qflags, nullptr);
if (!preparing())
@@ -358,9 +358,9 @@ void HtmlGenerator::generateDocs()
*/
void HtmlGenerator::generateQAPage()
{
- NamespaceNode* node = qdb_->primaryTreeRoot();
+ NamespaceNode *node = qdb_->primaryTreeRoot();
beginSubPage(node, "aaa-" + defaultModuleName().toLower() + "-qa-page.html");
- CodeMarker* marker = CodeMarker::markerForFileName(node->location().filePath());
+ CodeMarker *marker = CodeMarker::markerForFileName(node->location().filePath());
QString title = "Quality Assurance Page for " + defaultModuleName();
QString t = "Quality assurance information for checking the " + defaultModuleName() + " documentation.";
generateHeader(title, node, marker);
@@ -445,9 +445,9 @@ void HtmlGenerator::generateExampleFilePage(const Node *en,
go to targets in the specified \a module. The \a marker
is used for the same thing the marker is always used for.
*/
-QString HtmlGenerator::generateLinksToLinksPage(const QString& module, CodeMarker* marker)
+QString HtmlGenerator::generateLinksToLinksPage(const QString &module, CodeMarker *marker)
{
- NamespaceNode* node = qdb_->primaryTreeRoot();
+ NamespaceNode *node = qdb_->primaryTreeRoot();
QString fileName = "aaa-links-to-" + module + ".html";
beginSubPage(node, fileName);
QString title = "Links from " + defaultModuleName() + " to " + module;
@@ -487,10 +487,10 @@ QString HtmlGenerator::generateLinksToLinksPage(const QString& module, CodeMarke
broken links that were found. The \a marker is used for
the same thing the marker is always used for.
*/
-QString HtmlGenerator::generateLinksToBrokenLinksPage(CodeMarker* marker, int& count)
+QString HtmlGenerator::generateLinksToBrokenLinksPage(CodeMarker *marker, int &count)
{
QString fileName;
- NamespaceNode* node = qdb_->primaryTreeRoot();
+ NamespaceNode *node = qdb_->primaryTreeRoot();
TargetList* tlist = qdb_->getTargetList("broken");
if (tlist && !tlist->isEmpty()) {
count = tlist->size();
@@ -698,7 +698,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
break;
case Atom::AnnotatedList:
{
- const CollectionNode* cn = qdb_->getCollectionNode(atom->string(), Node::Group);
+ const CollectionNode *cn = qdb_->getCollectionNode(atom->string(), Node::Group);
if (cn)
generateList(cn, marker, atom->string());
}
@@ -735,8 +735,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
type = Node::JsModule;
else if (atom->string().startsWith(QLatin1String("groups")))
type = Node::Group;
- QDocDatabase* qdb = QDocDatabase::qdocDB();
- const CollectionNode* cn = qdb->getCollectionNode(moduleName, type);
+ QDocDatabase *qdb = QDocDatabase::qdocDB();
+ const CollectionNode *cn = qdb->getCollectionNode(moduleName, type);
if (cn) {
if (type == Node::Module) {
NodeMap m;
@@ -766,7 +766,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
int secondArg = atom->string().indexOf(" ");
if (secondArg != -1)
regExp = atom->string().mid(++secondArg);
- generateFileList(static_cast<const PageNode*>(relative), marker, subType, regExp);
+ generateFileList(static_cast<const PageNode *>(relative), marker, subType, regExp);
#endif
qDebug() << "GENERATE FILE LIST CALLED" << relative->name() << atom->string();
}
@@ -812,9 +812,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
else if (atom->string() == QLatin1String("related")) {
generateList(relative, marker, "related");
} else {
- const CollectionNode* cn = qdb_->getCollectionNode(atom->string(), Node::Group);
+ const CollectionNode *cn = qdb_->getCollectionNode(atom->string(), Node::Group);
if (cn) {
- if (!generateGroupList(const_cast<CollectionNode*>(cn)))
+ if (!generateGroupList(const_cast<CollectionNode *>(cn)))
relative->location().warning(QString("'\\generatelist \1' group is empty").arg(atom->string()));
} else {
relative->location().warning(QString("'\\generatelist \1' no such group").arg(atom->string()));
@@ -823,12 +823,12 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
break;
case Atom::SinceList:
{
- const NodeMultiMap& nsmap = qdb_->getSinceMap(atom->string());
+ const NodeMultiMap &nsmap = qdb_->getSinceMap(atom->string());
if (nsmap.isEmpty())
break;
- const NodeMap& ncmap = qdb_->getClassMap(atom->string());
- const NodeMap& nqcmap = qdb_->getQmlTypeMap(atom->string());
+ const NodeMap &ncmap = qdb_->getClassMap(atom->string());
+ const NodeMap &nqcmap = qdb_->getQmlTypeMap(atom->string());
Sections sections(nsmap);
out() << "<ul>\n";
@@ -863,7 +863,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
ParentMaps::iterator pmap;
NodeVector::const_iterator i = s->members().constBegin();
while (i != s->members().constEnd()) {
- Node* p = (*i)->parent();
+ Node *p = (*i)->parent();
pmap = parentmaps.find(p);
if (pmap == parentmaps.end())
pmap = parentmaps.insert(p,NodeMultiMap());
@@ -925,9 +925,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
out() << " />";
helpProjectWriter->addExtraFile(fileName);
if (relative->isExample()) {
- const ExampleNode* cen = static_cast<const ExampleNode*>(relative);
+ const ExampleNode *cen = static_cast<const ExampleNode *>(relative);
if (cen->imageFileName().isEmpty()) {
- ExampleNode* en = const_cast<ExampleNode*>(cen);
+ ExampleNode *en = const_cast<ExampleNode *>(cen);
en->setImageFileName(fileName);
}
}
@@ -1098,7 +1098,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
out() << "<dt>";
}
else { // (atom->string() == ATOM_LIST_VALUE)
- const Atom* lookAhead = atom->next();
+ const Atom *lookAhead = atom->next();
QString t = lookAhead->string();
lookAhead = lookAhead->next();
Q_ASSERT(lookAhead->type() == Atom::ListTagRight);
@@ -1376,7 +1376,7 @@ void HtmlGenerator::generateCppReferencePage(Aggregate *aggregate, CodeMarker *m
QString title;
QString rawTitle;
QString fullTitle;
- NamespaceNode* ns = nullptr;
+ NamespaceNode *ns = nullptr;
SectionVector *summarySections = nullptr;
SectionVector *detailsSections = nullptr;
@@ -1386,7 +1386,7 @@ void HtmlGenerator::generateCppReferencePage(Aggregate *aggregate, CodeMarker *m
rawTitle = aggregate->plainName();
fullTitle = aggregate->plainFullName();
title = rawTitle + " Namespace";
- ns = static_cast<NamespaceNode*>(aggregate);
+ ns = static_cast<NamespaceNode *>(aggregate);
summarySections = &sections.stdSummarySections();
detailsSections = &sections.stdDetailsSections();
}
@@ -1424,7 +1424,7 @@ void HtmlGenerator::generateCppReferencePage(Aggregate *aggregate, CodeMarker *m
generateKeywordAnchors(aggregate);
generateTitle(title, subtitleText, SmallSubTitle, aggregate, marker);
if (ns && !ns->hasDoc() && ns->docNode()) {
- NamespaceNode* NS = ns->docNode();
+ NamespaceNode *NS = ns->docNode();
Text brief;
brief << "The " << ns->name() << " namespace includes the following elements from module "
<< ns->tree()->camelCaseModuleName() << ". The full namespace is "
@@ -1570,7 +1570,7 @@ void HtmlGenerator::generateCppReferencePage(Aggregate *aggregate, CodeMarker *m
if (!prop->notifiers().isEmpty())
names << prop->notifiers().first()->name();
} else if ((*m)->isEnumType()) {
- const EnumNode *enume = reinterpret_cast<const EnumNode*>(*m);
+ const EnumNode *enume = reinterpret_cast<const EnumNode *>(*m);
if (enume->flagsType())
names << enume->flagsType()->name();
const auto &enumItemNameList = enume->doc().enumItemNames();
@@ -1668,7 +1668,7 @@ void HtmlGenerator::generateProxyPage(Aggregate *aggregate, CodeMarker *marker)
if (func->isSomeCtor() || func->isDtor() || func->overloadNumber() != 0)
names.clear();
} else if ((*m)->isEnumType()) {
- const EnumNode *enume = reinterpret_cast<const EnumNode*>(*m);
+ const EnumNode *enume = reinterpret_cast<const EnumNode *>(*m);
if (enume->flagsType())
names << enume->flagsType()->name();
const auto &enumItemNameList = enume->doc().enumItemNames();
@@ -1694,7 +1694,7 @@ void HtmlGenerator::generateProxyPage(Aggregate *aggregate, CodeMarker *marker)
Generate the HTML page for a QML type. \qcn is the QML type.
\marker is the code markeup object.
*/
-void HtmlGenerator::generateQmlTypePage(QmlTypeNode* qcn, CodeMarker* marker)
+void HtmlGenerator::generateQmlTypePage(QmlTypeNode *qcn, CodeMarker *marker)
{
Generator::setQmlTypeContext(qcn);
SubTitleSize subTitleSize = LargeSubTitle;
@@ -1745,7 +1745,7 @@ void HtmlGenerator::generateQmlTypePage(QmlTypeNode* qcn, CodeMarker* marker)
out() << "<a name=\"" << detailsRef << "\"></a>" << divNavTop << '\n';
out() << "<h2 id=\"" << detailsRef << "\">" << "Detailed Description" << "</h2>\n";
generateBody(qcn, marker);
- ClassNode* cn = qcn->classNode();
+ ClassNode *cn = qcn->classNode();
if (cn)
generateQmlText(cn->doc().body(), cn, marker, qcn->name());
generateAlsoList(qcn, marker);
@@ -1773,7 +1773,7 @@ void HtmlGenerator::generateQmlTypePage(QmlTypeNode* qcn, CodeMarker* marker)
Generate the HTML page for the QML basic type represented
by the QML basic type node \a qbtn.
*/
-void HtmlGenerator::generateQmlBasicTypePage(QmlBasicTypeNode* qbtn, CodeMarker* marker)
+void HtmlGenerator::generateQmlBasicTypePage(QmlBasicTypeNode *qbtn, CodeMarker *marker)
{
SubTitleSize subTitleSize = LargeSubTitle;
QString htmlTitle = qbtn->fullTitle();
@@ -1834,7 +1834,7 @@ void HtmlGenerator::generateQmlBasicTypePage(QmlBasicTypeNode* qbtn, CodeMarker*
Generate the HTML page for an entity that doesn't map
to any underlying parsable C++, QML, or Javascript element.
*/
-void HtmlGenerator::generatePageNode(PageNode* pn, CodeMarker* marker)
+void HtmlGenerator::generatePageNode(PageNode *pn, CodeMarker *marker)
{
SubTitleSize subTitleSize = LargeSubTitle;
QString fullTitle = pn->fullTitle();
@@ -1871,7 +1871,7 @@ void HtmlGenerator::generatePageNode(PageNode* pn, CodeMarker* marker)
/*!
Generate the HTML page for a group, module, or QML module.
*/
-void HtmlGenerator::generateCollectionNode(CollectionNode* cn, CodeMarker* marker)
+void HtmlGenerator::generateCollectionNode(CollectionNode *cn, CodeMarker *marker)
{
SubTitleSize subTitleSize = LargeSubTitle;
QString fullTitle = cn->fullTitle();
@@ -2048,7 +2048,7 @@ void HtmlGenerator::generateNavigationBar(const QString &title,
}
else {
if (node->isAggregate()) {
- QStringList groups = static_cast<const Aggregate*>(node)->groupNames();
+ QStringList groups = static_cast<const Aggregate *>(node)->groupNames();
if (groups.length() == 1) {
const Node *groupNode = qdb_->findNodeByNameAndType(QStringList(groups[0]), &Node::isGroup);
if (groupNode && !groupNode->title().isEmpty()) {
@@ -2098,7 +2098,7 @@ void HtmlGenerator::generateNavigationBar(const QString &title,
out() << "</li>\n";
}
-void HtmlGenerator::generateHeader(const QString& title,
+void HtmlGenerator::generateHeader(const QString &title,
const Node *node,
CodeMarker *marker)
{
@@ -2251,7 +2251,7 @@ void HtmlGenerator::generateHeader(const QString& title,
out() << "<p class=\"naviNextPrevious headerNavi\">\n" << navigationLinks << "</p><p/>\n";
}
-void HtmlGenerator::generateTitle(const QString& title,
+void HtmlGenerator::generateTitle(const QString &title,
const Text &subtitle,
SubTitleSize subTitleSize,
const Node *relative,
@@ -2335,7 +2335,7 @@ void HtmlGenerator::generateRequisites(Aggregate *aggregate, CodeMarker *marker)
if (aggregate->isClassNode() || aggregate->isNamespace()) {
//add the QT variable to the map
if (!aggregate->physicalModuleName().isEmpty()) {
- const CollectionNode* cn = qdb_->getCollectionNode(aggregate->physicalModuleName(), Node::Module);
+ const CollectionNode *cn = qdb_->getCollectionNode(aggregate->physicalModuleName(), Node::Module);
if (cn && !cn->qtVariable().isEmpty()) {
text.clear();
text << "QT += " + cn->qtVariable();
@@ -2345,7 +2345,7 @@ void HtmlGenerator::generateRequisites(Aggregate *aggregate, CodeMarker *marker)
}
if (aggregate->isClassNode()) {
- ClassNode* classe = static_cast<ClassNode*>(aggregate);
+ ClassNode *classe = static_cast<ClassNode *>(aggregate);
if (classe->qmlElement() != nullptr && !classe->isInternal()) {
text.clear();
text << Atom(Atom::LinkNode, CodeMarker::stringForNode(classe->qmlElement()))
@@ -2444,7 +2444,7 @@ void HtmlGenerator::generateQmlRequisites(QmlTypeNode *qcn, CodeMarker *marker)
//add the module name and version to the map
QString logicalModuleVersion;
- const CollectionNode* collection = qdb_->getCollectionNode(qcn->logicalModuleName(), qcn->nodeType());
+ const CollectionNode *collection = qdb_->getCollectionNode(qcn->logicalModuleName(), qcn->nodeType());
if (collection != nullptr)
logicalModuleVersion = collection->logicalModuleVersion();
else
@@ -2470,7 +2470,7 @@ void HtmlGenerator::generateQmlRequisites(QmlTypeNode *qcn, CodeMarker *marker)
}
//add the instantiates to the map
- ClassNode* cn = qcn->classNode();
+ ClassNode *cn = qcn->classNode();
if (cn && !cn->isInternal()) {
text.clear();
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn));
@@ -2483,7 +2483,7 @@ void HtmlGenerator::generateQmlRequisites(QmlTypeNode *qcn, CodeMarker *marker)
}
//add the inherits to the map
- QmlTypeNode* base = qcn->qmlBaseNode();
+ QmlTypeNode *base = qcn->qmlBaseNode();
while (base && base->isInternal()) {
base = base->qmlBaseNode();
}
@@ -2567,9 +2567,9 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
*/
void HtmlGenerator::generateTableOfContents(const Node *node,
CodeMarker *marker,
- QVector<Section>* sections)
+ QVector<Section> *sections)
{
- QList<Atom*> toc;
+ QList<Atom *> toc;
if (node->doc().hasTableOfContents())
toc = node->doc().tableOfContents();
if (tocDepth == 0 || (toc.isEmpty() && !sections && !node->isModule())) {
@@ -2722,7 +2722,7 @@ QString HtmlGenerator::generateAllMembersFile(const Section &section, CodeMarker
including the inherited members. The \a marker is used for
formatting stuff.
*/
-QString HtmlGenerator::generateAllQmlMembersFile(const Sections &sections, CodeMarker* marker)
+QString HtmlGenerator::generateAllQmlMembersFile(const Sections &sections, CodeMarker *marker)
{
if (sections.allMembersSection().isEmpty())
@@ -2743,10 +2743,10 @@ QString HtmlGenerator::generateAllQmlMembersFile(const Sections &sections, CodeM
if (!cknl.isEmpty()) {
for (int i=0; i<cknl.size(); i++) {
ClassKeysNodes* ckn = cknl[i];
- const QmlTypeNode* qcn = ckn->first;
+ const QmlTypeNode *qcn = ckn->first;
KeysAndNodes& kn = ckn->second;
- QStringList& keys = kn.first;
- NodeVector& nodes = kn.second;
+ QStringList &keys = kn.first;
+ NodeVector &nodes = kn.second;
if (nodes.isEmpty())
continue;
if (i != 0) {
@@ -2892,7 +2892,7 @@ QString HtmlGenerator::generateObsoleteQmlMembersFile(const Sections &sections,
return fileName;
}
-void HtmlGenerator::generateClassHierarchy(const Node *relative, NodeMap& classMap)
+void HtmlGenerator::generateClassHierarchy(const Node *relative, NodeMap &classMap)
{
if (classMap.isEmpty())
return;
@@ -2916,7 +2916,7 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative, NodeMap& classM
out() << "</ul>\n";
}
else {
- ClassNode* child = static_cast<ClassNode*>(*stack.top().begin());
+ ClassNode *child = static_cast<ClassNode *>(*stack.top().begin());
out() << "<li>";
generateFullName(child, relative);
out() << "</li>\n";
@@ -2939,9 +2939,9 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative, NodeMap& classM
Output an annotated list of the nodes in \a nodeMap.
A two-column table is output.
*/
-void HtmlGenerator::generateAnnotatedList(const Node* relative,
- CodeMarker* marker,
- const NodeMultiMap& nmm)
+void HtmlGenerator::generateAnnotatedList(const Node *relative,
+ CodeMarker *marker,
+ const NodeMultiMap &nmm)
{
if (nmm.isEmpty())
return;
@@ -2952,11 +2952,11 @@ void HtmlGenerator::generateAnnotatedList(const Node* relative,
*/
void HtmlGenerator::generateAnnotatedList(const Node *relative,
CodeMarker *marker,
- const NodeList& unsortedNodes)
+ const NodeList &unsortedNodes)
{
NodeMultiMap nmm;
bool allInternal = true;
- foreach (Node* node, unsortedNodes) {
+ foreach (Node *node, unsortedNodes) {
if (!node->isInternal() && !node->isObsolete()) {
allInternal = false;
nmm.insert(node->fullName(relative), node);
@@ -2969,7 +2969,7 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
NodeList nodes = nmm.values();
std::sort(nodes.begin(), nodes.end(), Node::nodeNameLessThan);
- foreach (const Node* node, nodes) {
+ foreach (const Node *node, nodes) {
if (++row % 2 == 1)
out() << "<tr class=\"odd topAlign\">";
else
@@ -3009,9 +3009,9 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
Outputs a series of annotated lists from the nodes in \a nmm,
divided into sections based by the key names in the multimap.
*/
-void HtmlGenerator::generateAnnotatedLists(const Node* relative,
- CodeMarker* marker,
- const NodeMultiMap& nmm)
+void HtmlGenerator::generateAnnotatedLists(const Node *relative,
+ CodeMarker *marker,
+ const NodeMultiMap &nmm)
{
foreach (const QString &name, nmm.uniqueKeys()) {
if (!name.isEmpty()) {
@@ -3219,7 +3219,7 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative)
char currentLetter;
out() << "<ul>\n";
- NodeMapMap& funcIndex = qdb_->getFunctionIndex();
+ NodeMapMap &funcIndex = qdb_->getFunctionIndex();
QMap<QString, NodeMap >::ConstIterator f = funcIndex.constBegin();
while (f != funcIndex.constEnd()) {
out() << "<li>";
@@ -3246,7 +3246,7 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative)
void HtmlGenerator::generateLegaleseList(const Node *relative, CodeMarker *marker)
{
- TextToNodeMap& legaleseTexts = qdb_->getLegaleseTexts();
+ TextToNodeMap &legaleseTexts = qdb_->getLegaleseTexts();
QMap<Text, const Node *>::ConstIterator it = legaleseTexts.constBegin();
while (it != legaleseTexts.constEnd()) {
Text text = it.key();
@@ -3300,13 +3300,13 @@ void HtmlGenerator::generateQmlItem(const Node *node,
and must not be empty. If it is empty, nothing is output, and
false is returned. Otherewise, the list is generated and true is returned.
*/
-bool HtmlGenerator::generateGroupList(CollectionNode* cn)
+bool HtmlGenerator::generateGroupList(CollectionNode *cn)
{
qdb_->mergeCollections(cn);
if (cn->members().isEmpty())
return false;
out() << "<ul>\n";
- foreach (const Node* node, cn->members()) {
+ foreach (const Node *node, cn->members()) {
out() << "<li>"
<< "<a href=\"#"
<< Doc::canonicalTitle(node->title())
@@ -3318,7 +3318,7 @@ bool HtmlGenerator::generateGroupList(CollectionNode* cn)
return true;
}
-void HtmlGenerator::generateList(const Node* relative, CodeMarker* marker, const QString& selector)
+void HtmlGenerator::generateList(const Node *relative, CodeMarker *marker, const QString &selector)
{
CNMap cnm;
Node::NodeType type = Node::NoType;
@@ -3334,7 +3334,7 @@ void HtmlGenerator::generateList(const Node* relative, CodeMarker* marker, const
NodeList nl;
qdb_->mergeCollections(type, cnm, relative);
CollectionList cl = cnm.values();
- foreach (CollectionNode* cn, cl)
+ foreach (CollectionNode *cn, cl)
nl.append(cn);
generateAnnotatedList(relative, marker, nl);
}
@@ -3349,14 +3349,14 @@ void HtmlGenerator::generateList(const Node* relative, CodeMarker* marker, const
"\\module, \\qmlmodule, and \\jsmodule comments.").arg(selector));
return;
}
- Node* n = const_cast<Node*>(relative);
- CollectionNode* cn = static_cast<CollectionNode*>(n);
+ Node *n = const_cast<Node *>(relative);
+ CollectionNode *cn = static_cast<CollectionNode *>(n);
qdb_->mergeCollections(cn);
generateAnnotatedList(cn, marker, cn->members());
}
}
-void HtmlGenerator::generateSection(const NodeVector& nv, const Node *relative, CodeMarker *marker)
+void HtmlGenerator::generateSection(const NodeVector &nv, const Node *relative, CodeMarker *marker)
{
bool alignNames = true;
if (!nv.isEmpty()) {
@@ -3456,14 +3456,14 @@ void HtmlGenerator::generateSectionList(const Section& section,
}
QString prefix;
- const QStringList& keys = section.keys(status);
+ const QStringList &keys = section.keys(status);
if (!keys.isEmpty()) {
prefix = keys.at(i).mid(1);
prefix = prefix.left(keys.at(i).indexOf("::") + 1);
}
generateSynopsis(*m, relative, marker, section.style(), alignNames, &prefix);
if ((*m)->isFunction()) {
- const FunctionNode* fn = static_cast<const FunctionNode*>(*m);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(*m);
if (fn->isPrivateSignal()) {
hasPrivateSignals = true;
if (alignNames)
@@ -3528,7 +3528,7 @@ void HtmlGenerator::generateSynopsis(const Node *node,
CodeMarker *marker,
Section::Style style,
bool alignNames,
- const QString* prefix)
+ const QString *prefix)
{
QString marked = marker->markedUpSynopsis(node, relative, style);
@@ -3568,8 +3568,8 @@ void HtmlGenerator::generateSynopsis(const Node *node,
out() << highlightedCode(marked, relative, alignNames);
}
-QString HtmlGenerator::highlightedCode(const QString& markedCode,
- const Node* relative,
+QString HtmlGenerator::highlightedCode(const QString &markedCode,
+ const Node *relative,
bool alignNames, Node::Genus genus)
{
QString src = markedCode;
@@ -3599,7 +3599,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
i += 2;
if (parseArg(src, linkTag, &i, srcSize, &arg, &par1)) {
html += QLatin1String("<b>");
- const Node* n = CodeMarker::nodeForString(par1.toString());
+ const Node *n = CodeMarker::nodeForString(par1.toString());
QString link = linkForNode(n, relative);
addLink(link, arg, &html);
html += QLatin1String("</b>");
@@ -3612,7 +3612,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
}
else if (parseArg(src, typeTag, &i, srcSize, &arg, &par1)) {
par1 = QStringRef();
- const Node* n = qdb_->findTypeNode(arg.toString(), relative, genus);
+ const Node *n = qdb_->findTypeNode(arg.toString(), relative, genus);
html += QLatin1String("<span class=\"type\">");
if (n && (n->isQmlBasicType() || n->isJsBasicType())) {
if (relative && (relative->genus() == n->genus() || genus == n->genus()))
@@ -3629,7 +3629,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
if (arg.startsWith(QLatin1Char('&')))
html += arg;
else {
- const Node* n = qdb_->findNodeForInclude(QStringList(arg.toString()));
+ const Node *n = qdb_->findNodeForInclude(QStringList(arg.toString()));
if (n && n != relative)
addLink(linkForNode(n,relative), arg, &html);
else
@@ -3725,7 +3725,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
return html;
}
-void HtmlGenerator::generateLink(const Atom* atom, CodeMarker* marker)
+void HtmlGenerator::generateLink(const Atom *atom, CodeMarker *marker)
{
static QRegExp camelCase("[A-Z][A-Z][a-z]|[a-z][A-Z0-9]|_");
@@ -3746,12 +3746,12 @@ void HtmlGenerator::generateLink(const Atom* atom, CodeMarker* marker)
}
}
-QString HtmlGenerator::registerRef(const QString& ref)
+QString HtmlGenerator::registerRef(const QString &ref)
{
QString clean = Generator::cleanRef(ref);
for (;;) {
- QString& prevRef = refMap[clean.toLower()];
+ QString &prevRef = refMap[clean.toLower()];
if (prevRef.isEmpty()) {
prevRef = ref;
break;
@@ -3839,7 +3839,7 @@ QString HtmlGenerator::refForNode(const Node *node)
break;
case Node::Typedef:
{
- const TypedefNode* tdn = static_cast<const TypedefNode *>(node);
+ const TypedefNode *tdn = static_cast<const TypedefNode *>(node);
if (tdn->associatedEnum())
return refForNode(tdn->associatedEnum());
else
@@ -3913,7 +3913,7 @@ QString HtmlGenerator::refForNode(const Node *node)
*/
QString HtmlGenerator::getLink(const Atom *atom, const Node *relative, const Node** node)
{
- const QString& t = atom->string();
+ const QString &t = atom->string();
if (t.at(0) == QChar('h')) {
if (t.startsWith("http:") || t.startsWith("https:"))
return t;
@@ -4047,11 +4047,11 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
generateKeywordAnchors(node);
QString nodeRef = nullptr;
if (node->isSharedCommentNode()) {
- const SharedCommentNode *scn = reinterpret_cast<const SharedCommentNode*>(node);
- const QVector<Node*>& collective = scn->collective();
+ const SharedCommentNode *scn = reinterpret_cast<const SharedCommentNode *>(node);
+ const QVector<Node *> &collective = scn->collective();
if (collective.size() > 1)
out() << "<div class=\"fngroup\">\n";
- foreach (const Node* n, collective) {
+ foreach (const Node *n, collective) {
if (n->isFunction()) {
nodeRef = refForNode(n);
out() << "<h3 class=\"fn fngroupitem\" id=\"" << nodeRef << "\">";
@@ -4114,12 +4114,12 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
}
}
else if (node->isFunction()) {
- const FunctionNode* fn = static_cast<const FunctionNode*>(node);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(node);
if (fn->isPrivateSignal())
generatePrivateSignalNote(node, marker);
if (fn->isInvokable())
generateInvokableNote(node, marker);
- generateAssociatedPropertyNotes(const_cast<FunctionNode*>(fn));
+ generateAssociatedPropertyNotes(const_cast<FunctionNode *>(fn));
}
else if (node->isEnumType()) {
const EnumNode *etn = static_cast<const EnumNode *>(node);
@@ -4177,7 +4177,7 @@ const QPair<QString,QString> HtmlGenerator::anchorForNode(const Node *node)
anchorPair.first = Generator::fileName(node);
if (node->isPageNode()) {
- const PageNode *pn = static_cast<const PageNode*>(node);
+ const PageNode *pn = static_cast<const PageNode *>(node);
anchorPair.second = pn->title();
}
@@ -4264,9 +4264,9 @@ void HtmlGenerator::generateQmlSummary(const NodeVector &members,
out() << "<li class=\"fn\">";
generateQmlItem(*m, relative, marker, true);
if ((*m)->isPropertyGroup()) {
- const SharedCommentNode* scn = static_cast<const SharedCommentNode*>(*m);
+ const SharedCommentNode *scn = static_cast<const SharedCommentNode *>(*m);
if (scn->count() > 0) {
- QVector<Node*>::ConstIterator p = scn->collective().constBegin();
+ QVector<Node *>::ConstIterator p = scn->collective().constBegin();
out() << "<ul>\n";
while (p != scn->collective().constEnd()) {
if ((*p)->isQmlProperty() || (*p)->isJsProperty()) {
@@ -4294,7 +4294,7 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
const Aggregate *relative,
CodeMarker *marker)
{
- QmlPropertyNode* qpn = nullptr;
+ QmlPropertyNode *qpn = nullptr;
#ifdef GENERATE_MAC_REFS
generateMacRef(node, marker);
#endif
@@ -4313,8 +4313,8 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
out() << "<div class=\"qmlitem\">";
QString nodeRef;
if (node->isPropertyGroup()) {
- const SharedCommentNode* scn = static_cast<const SharedCommentNode*>(node);
- QVector<Node*>::ConstIterator p = scn->collective().constBegin();
+ const SharedCommentNode *scn = static_cast<const SharedCommentNode*>(node);
+ QVector<Node *>::ConstIterator p = scn->collective().constBegin();
out() << "<div class=\"qmlproto\">";
out() << "<div class=\"table\"><table class=\"qmlname\">";
if (!scn->name().isEmpty()) {
@@ -4328,7 +4328,7 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
}
while (p != scn->collective().constEnd()) {
if ((*p)->isQmlProperty() || (*p)->isJsProperty()) {
- qpn = static_cast<QmlPropertyNode*>(*p);
+ qpn = static_cast<QmlPropertyNode *>(*p);
nodeRef = refForNode(qpn);
out() << "<tr valign=\"top\" class=\"odd\" id=\"" << nodeRef << "\">";
out() << "<td class=\"tblQmlPropNode\"><p>";
@@ -4346,7 +4346,7 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
out() << "</table></div>";
out() << "</div>";
} else if (node->isQmlProperty() || node->isJsProperty()) {
- qpn = static_cast<QmlPropertyNode*>(node);
+ qpn = static_cast<QmlPropertyNode *>(node);
out() << qmlItemHeader;
out() << qmlItemStart.arg(nodeRef, "tblQmlPropNode", refForNode(qpn));
@@ -4363,8 +4363,8 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
out() << qmlItemEnd;
out() << qmlItemFooter;
} else if (node->isSharedCommentNode()) {
- const SharedCommentNode *scn = reinterpret_cast<const SharedCommentNode*>(node);
- const QVector<Node*>& collective = scn->collective();
+ const SharedCommentNode *scn = reinterpret_cast<const SharedCommentNode *>(node);
+ const QVector<Node *> &collective = scn->collective();
if (collective.size() > 1)
out() << "<div class=\"fngroup\">\n";
out() << qmlItemHeader;
@@ -4400,11 +4400,11 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node,
Output the "Inherits" line for the QML element,
if there should be one.
*/
-void HtmlGenerator::generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker)
+void HtmlGenerator::generateQmlInherits(QmlTypeNode *qcn, CodeMarker *marker)
{
if (!qcn)
return;
- QmlTypeNode* base = qcn->qmlBaseNode();
+ QmlTypeNode *base = qcn->qmlBaseNode();
while (base && base->isInternal()) {
base = base->qmlBaseNode();
}
@@ -4427,9 +4427,9 @@ void HtmlGenerator::generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker)
If there is no class node, or if the class node status
is set to Node::Internal, do nothing.
*/
-void HtmlGenerator::generateQmlInstantiates(QmlTypeNode* qcn, CodeMarker* marker)
+void HtmlGenerator::generateQmlInstantiates(QmlTypeNode *qcn, CodeMarker *marker)
{
- ClassNode* cn = qcn->classNode();
+ ClassNode *cn = qcn->classNode();
if (cn && !cn->isInternal()) {
Text text;
text << Atom::ParaLeft;
@@ -4461,10 +4461,10 @@ void HtmlGenerator::generateQmlInstantiates(QmlTypeNode* qcn, CodeMarker* marker
If there is no QML element, or if the class node status
is set to Node::Internal, do nothing.
*/
-void HtmlGenerator::generateInstantiatedBy(ClassNode* cn, CodeMarker* marker)
+void HtmlGenerator::generateInstantiatedBy(ClassNode *cn, CodeMarker *marker)
{
if (cn && !cn->isInternal() && cn->qmlElement() != nullptr) {
- const QmlTypeNode* qcn = cn->qmlElement();
+ const QmlTypeNode *qcn = cn->qmlElement();
Text text;
text << Atom::ParaLeft;
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn));
@@ -4542,7 +4542,7 @@ void HtmlGenerator::generateManifestFiles()
*/
void HtmlGenerator::generateManifestFile(const QString &manifest, const QString &element)
{
- ExampleNodeMap& exampleNodeMap = qdb_->exampleNodeMap();
+ ExampleNodeMap &exampleNodeMap = qdb_->exampleNodeMap();
if (exampleNodeMap.isEmpty())
return;
QString fileName = manifest +"-manifest.xml";
@@ -4554,7 +4554,7 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
bool proceed = false;
ExampleNodeMap::Iterator i = exampleNodeMap.begin();
while (i != exampleNodeMap.end()) {
- const ExampleNode* en = i.value();
+ const ExampleNode *en = i.value();
if (demos) {
if (en->name().startsWith("demos")) {
proceed = true;
@@ -4580,7 +4580,7 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
QStringList usedAttributes;
i = exampleNodeMap.begin();
while (i != exampleNodeMap.end()) {
- const ExampleNode* en = i.value();
+ const ExampleNode *en = i.value();
if (demos) {
if (!en->name().startsWith("demos")) {
++i;
@@ -4806,9 +4806,9 @@ void HtmlGenerator::readManifestMetaContent(const Config &config)
\e{relates} comand. Report these as errors if they
are not also marked \e {internal}.
*/
-void HtmlGenerator::reportOrphans(const Aggregate* parent)
+void HtmlGenerator::reportOrphans(const Aggregate *parent)
{
- const NodeList& children = parent->childNodes();
+ const NodeList &children = parent->childNodes();
if (children.size() == 0)
return;
@@ -4825,7 +4825,7 @@ void HtmlGenerator::reportOrphans(const Aggregate* parent)
break;
case Node::Function:
{
- const FunctionNode* fn = static_cast<const FunctionNode*>(child);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(child);
switch (fn->metaness()) {
case FunctionNode::QmlSignal:
child->location().warning(tr("Global QML, signal, %1 %2").arg(child->name()).arg(message));
@@ -4877,7 +4877,7 @@ void HtmlGenerator::reportOrphans(const Aggregate* parent)
output generator, it is perhaps impossible for there to ever
be more than one writer open.
*/
-QXmlStreamWriter& HtmlGenerator::xmlWriter()
+QXmlStreamWriter &HtmlGenerator::xmlWriter()
{
return *xmlWriterStack.top();
}
@@ -4894,7 +4894,7 @@ void HtmlGenerator::generateAssociatedPropertyNotes(FunctionNode *fn)
std::sort(nodes.begin(), nodes.end(), Node::nodeNameLessThan);
foreach (const Node *n, nodes) {
QString msg;
- const PropertyNode *pn = static_cast<const PropertyNode*>(n);
+ const PropertyNode *pn = static_cast<const PropertyNode *>(n);
switch (pn->role(fn)) {
case PropertyNode::Getter:
msg = QStringLiteral("Getter function ");
diff --git a/src/qdoc/htmlgenerator.h b/src/qdoc/htmlgenerator.h
index ac2ed2f3c..26bdb7c43 100644
--- a/src/qdoc/htmlgenerator.h
+++ b/src/qdoc/htmlgenerator.h
@@ -55,7 +55,7 @@ public:
HtmlGenerator();
~HtmlGenerator();
- void initializeGenerator(const Config& config) override;
+ void initializeGenerator(const Config &config) override;
void terminateGenerator() override;
QString format() override;
void generateDocs() override;
@@ -67,17 +67,17 @@ public:
protected:
void generateQAPage() override;
void generateExampleFilePage(const Node *en, const QString &file, CodeMarker *marker) override;
- QString generateLinksToLinksPage(const QString& module, CodeMarker* marker);
- QString generateLinksToBrokenLinksPage(CodeMarker* marker, int& count);
+ QString generateLinksToLinksPage(const QString &module, CodeMarker *marker);
+ QString generateLinksToBrokenLinksPage(CodeMarker *marker, int &count);
virtual int generateAtom(const Atom *atom,
const Node *relative,
CodeMarker *marker) override;
void generateCppReferencePage(Aggregate *aggregate, CodeMarker *marker) override;
void generateProxyPage(Aggregate *aggregate, CodeMarker *marker) override;
- void generateQmlTypePage(QmlTypeNode* qcn, CodeMarker* marker) override;
- void generateQmlBasicTypePage(QmlBasicTypeNode* qbtn, CodeMarker* marker) override;
- void generatePageNode(PageNode* pn, CodeMarker* marker) override;
- void generateCollectionNode(CollectionNode* cn, CodeMarker* marker) override;
+ void generateQmlTypePage(QmlTypeNode *qcn, CodeMarker *marker) override;
+ void generateQmlBasicTypePage(QmlBasicTypeNode *qbtn, CodeMarker *marker) override;
+ void generatePageNode(PageNode *pn, CodeMarker *marker) override;
+ void generateCollectionNode(CollectionNode *cn, CodeMarker *marker) override;
void generateGenericCollectionPage(CollectionNode *cn, CodeMarker *marker) override;
QString fileExtension() const override;
virtual QString refForNode(const Node *node);
@@ -85,7 +85,7 @@ protected:
void generateManifestFile(const QString &manifest, const QString &element);
void readManifestMetaContent(const Config &config);
- void generateKeywordAnchors(const Node* node);
+ void generateKeywordAnchors(const Node *node);
void generateAssociatedPropertyNotes(FunctionNode *fn);
QString getLink(const Atom *atom, const Node *relative, const Node **node);
@@ -113,10 +113,10 @@ private:
CodeMarker *marker,
const QString &buildversion,
bool tableItems = false);
- void generateHeader(const QString& title,
+ void generateHeader(const QString &title,
const Node *node = nullptr,
CodeMarker *marker = nullptr);
- void generateTitle(const QString& title,
+ void generateTitle(const QString &title,
const Text &subTitle,
SubTitleSize subTitleSize,
const Node *relative,
@@ -131,16 +131,16 @@ private:
const Node *relative = nullptr, bool addLink=true);
void generateTableOfContents(const Node *node,
CodeMarker *marker,
- QVector<Section>* sections = nullptr);
+ QVector<Section> *sections = nullptr);
void generateSidebar();
QString generateAllMembersFile(const Section &section, CodeMarker *marker);
- QString generateAllQmlMembersFile(const Sections &sections, CodeMarker* marker);
+ QString generateAllQmlMembersFile(const Sections &sections, CodeMarker *marker);
QString generateObsoleteMembersFile(const Sections &sections, CodeMarker *marker);
QString generateObsoleteQmlMembersFile(const Sections &sections, CodeMarker *marker);
void generateClassHierarchy(const Node *relative, NodeMap &classMap);
- void generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeMultiMap& nodeMap);
- void generateAnnotatedLists(const Node* relative, CodeMarker* marker, const NodeMultiMap& nodeMap);
- void generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeList& nodes);
+ void generateAnnotatedList(const Node *relative, CodeMarker *marker, const NodeMultiMap &nodeMap);
+ void generateAnnotatedLists(const Node *relative, CodeMarker *marker, const NodeMultiMap &nodeMap);
+ void generateAnnotatedList(const Node *relative, CodeMarker *marker, const NodeList &nodes);
void generateCompactList(ListType listType,
const Node *relative,
const NodeMultiMap &classMap,
@@ -148,8 +148,8 @@ private:
QString commonPrefix);
void generateFunctionIndex(const Node *relative);
void generateLegaleseList(const Node *relative, CodeMarker *marker);
- bool generateGroupList(CollectionNode* cn);
- void generateList(const Node* relative, CodeMarker* marker, const QString& selector);
+ bool generateGroupList(CollectionNode *cn);
+ void generateList(const Node *relative, CodeMarker *marker, const QString &selector);
void generateSectionList(const Section& section,
const Node *relative,
CodeMarker *marker,
@@ -164,20 +164,20 @@ private:
void generateDetailedQmlMember(Node *node,
const Aggregate *relative,
CodeMarker *marker);
- void generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker) override;
- void generateQmlInstantiates(QmlTypeNode* qcn, CodeMarker* marker);
- void generateInstantiatedBy(ClassNode* cn, CodeMarker* marker);
+ void generateQmlInherits(QmlTypeNode *qcn, CodeMarker *marker) override;
+ void generateQmlInstantiates(QmlTypeNode *qcn, CodeMarker *marker);
+ void generateInstantiatedBy(ClassNode *cn, CodeMarker *marker);
- void generateSection(const NodeVector& nv, const Node *relative, CodeMarker *marker);
+ void generateSection(const NodeVector &nv, const Node *relative, CodeMarker *marker);
void generateSynopsis(const Node *node,
const Node *relative,
CodeMarker *marker,
Section::Style style,
bool alignNames = false,
- const QString* prefix = nullptr);
+ const QString *prefix = nullptr);
void generateSectionInheritedList(const Section& section, const Node *relative);
- QString highlightedCode(const QString& markedCode,
- const Node* relative,
+ QString highlightedCode(const QString &markedCode,
+ const Node *relative,
bool alignNames = false,
Node::Genus genus = Node::DontCare);
@@ -186,7 +186,7 @@ private:
void generateLink(const Atom *atom, CodeMarker *marker);
inline bool hasBrief(const Node *node);
- QString registerRef(const QString& ref);
+ QString registerRef(const QString &ref);
QString fileBase(const Node *node) const override;
QString fileName(const Node *node);
static int hOffset(const Node *node);
@@ -198,9 +198,9 @@ private:
void beginLink(const QString &link, const Node *node, const Node *relative);
void endLink();
void generateExtractionMark(const Node *node, ExtractionMarkType markType);
- void reportOrphans(const Aggregate* parent);
+ void reportOrphans(const Aggregate *parent);
- QXmlStreamWriter& xmlWriter();
+ QXmlStreamWriter &xmlWriter();
QHash<QString, QString> refMap;
int codeIndent;
@@ -230,7 +230,7 @@ private:
QStringList stylesheets;
QStringList customHeadElements;
bool obsoleteLinks;
- QStack<QXmlStreamWriter*> xmlWriterStack;
+ QStack<QXmlStreamWriter *> xmlWriterStack;
static int id;
QList<ManifestMetaFilter> manifestMetaContent;
QString homepage;
diff --git a/src/qdoc/location.cpp b/src/qdoc/location.cpp
index ae972c233..f10f53b65 100644
--- a/src/qdoc/location.cpp
+++ b/src/qdoc/location.cpp
@@ -76,7 +76,7 @@ Location::Location()
Constructs a location with (fileName, 1, 1) on its file
position stack.
*/
-Location::Location(const QString& fileName)
+Location::Location(const QString &fileName)
: stk(nullptr), stkTop(&stkBottom), stkDepth(0), etcetera(false)
{
push(fileName);
@@ -86,7 +86,7 @@ Location::Location(const QString& fileName)
The copy constructor copies the contents of \a other into
this Location using the assignment operator.
*/
-Location::Location(const Location& other)
+Location::Location(const Location &other)
: stk(nullptr), stkTop(&stkBottom), stkDepth(0), etcetera(false)
{
*this = other;
@@ -96,7 +96,7 @@ Location::Location(const Location& other)
The assignment operator does a deep copy of the entire
state of \a other into this Location.
*/
-Location& Location::operator=(const Location& other)
+Location &Location::operator=(const Location &other)
{
QStack<StackEntry> *oldStk = stk;
@@ -157,7 +157,7 @@ void Location::advance(QChar ch)
\sa pop()
*/
-void Location::push(const QString& filePath)
+void Location::push(const QString &filePath)
{
if (stkDepth++ >= 1) {
if (stk == nullptr)
@@ -202,7 +202,7 @@ void Location::pop()
must not be called on an empty Location object.
*/
-/*! \fn const QString& Location::filePath() const
+/*! \fn const QString &Location::filePath() const
Returns the current path and file name. If the Location is
empty, the returned string is null.
@@ -264,7 +264,7 @@ QString Location::canonicalRelativePath(const QString &path)
warning message. Does not write the message if qdoc is in
the Prepare phase.
*/
-void Location::warning(const QString& message, const QString& details) const
+void Location::warning(const QString &message, const QString &details) const
{
if (!Generator::preparing() || Generator::singleExec())
emitMessage(Warning, message, details);
@@ -275,7 +275,7 @@ void Location::warning(const QString& message, const QString& details) const
error message. Does not write the message if qdoc is in
the Prepare phase.
*/
-void Location::error(const QString& message, const QString& details) const
+void Location::error(const QString &message, const QString &details) const
{
if (!Generator::preparing() || Generator::singleExec())
emitMessage(Error, message, details);
@@ -304,7 +304,7 @@ int Location::exitCode()
error message and then exits the program. qdoc prints fatal
errors in either phase (Prepare or Generate).
*/
-void Location::fatal(const QString& message, const QString& details) const
+void Location::fatal(const QString &message, const QString &details) const
{
emitMessage(Error, message, details);
information(message);
@@ -317,7 +317,7 @@ void Location::fatal(const QString& message, const QString& details) const
Writes \a message and \a detals to stderr as a formatted
report message.
*/
-void Location::report(const QString& message, const QString& details) const
+void Location::report(const QString &message, const QString &details) const
{
emitMessage(Report, message, details);
}
@@ -328,7 +328,7 @@ void Location::report(const QString& message, const QString& details) const
appears to be used for matching certain error messages
so that emitMessage() can avoid printing them.
*/
-void Location::initialize(const Config& config)
+void Location::initialize(const Config &config)
{
tabSize = config.getInt(CONFIG_TABSIZE);
programName = config.programName();
@@ -362,7 +362,7 @@ void Location::terminate()
/*!
Prints \a message to \c stdout followed by a \c{'\n'}.
*/
-void Location::information(const QString& message)
+void Location::information(const QString &message)
{
printf("%s\n", message.toLatin1().data());
fflush(stdout);
@@ -372,7 +372,7 @@ void Location::information(const QString& message)
Prints \a message to \c stderr followed by a \c{'\n'},
but only if the -log-progress option is set.
*/
-void Location::logToStdErr(const QString& message)
+void Location::logToStdErr(const QString &message)
{
if (logProgress_) {
fprintf(stderr, "LOG: %s\n", message.toLatin1().data());
@@ -384,7 +384,7 @@ void Location::logToStdErr(const QString& message)
Always prints the current time and \a message to \c stderr
followed by a \c{'\n'}.
*/
-void Location::logToStdErrAlways(const QString& message)
+void Location::logToStdErrAlways(const QString &message)
{
if (Generator::useTimestamps()) {
QTime t = QTime::currentTime();
@@ -398,7 +398,7 @@ void Location::logToStdErrAlways(const QString& message)
/*!
Report a program bug, including the \a hint.
*/
-void Location::internalError(const QString& hint)
+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"
@@ -412,8 +412,8 @@ void Location::internalError(const QString& hint)
whether the \a message is an error or a warning.
*/
void Location::emitMessage(MessageType type,
- const QString& message,
- const QString& details) const
+ const QString &message,
+ const QString &details) const
{
if (type == Warning &&
spuriousRegExp != nullptr &&
diff --git a/src/qdoc/location.h b/src/qdoc/location.h
index 65f1b55b7..7a472ab5a 100644
--- a/src/qdoc/location.h
+++ b/src/qdoc/location.h
@@ -47,17 +47,17 @@ class Location
public:
Location();
- Location(const QString& filePath);
- Location(const Location& other);
+ Location(const QString &filePath);
+ Location(const Location &other);
~Location() { delete stk; }
- Location& operator=(const Location& other);
+ Location &operator=(const Location &other);
void start();
void advance(QChar ch);
void advanceLines(int n) { stkTop->lineNo += n; stkTop->columnNo = 1; }
- void push(const QString& filePath);
+ void push(const QString &filePath);
void pop();
void setEtc(bool etc) { etcetera = etc; }
void setLineNo(int no) { stkTop->lineNo = no; }
@@ -65,29 +65,29 @@ public:
bool isEmpty() const { return stkDepth == 0; }
int depth() const { return stkDepth; }
- const QString& filePath() const { return stkTop->filePath; }
+ const QString &filePath() const { return stkTop->filePath; }
QString fileName() const;
QString fileSuffix() const;
int lineNo() const { return stkTop->lineNo; }
int columnNo() const { return stkTop->columnNo; }
bool etc() const { return etcetera; }
- void warning(const QString& message,
- const QString& details = QString()) const;
- void error(const QString& message,
- const QString& details = QString()) const;
- void fatal(const QString& message,
- const QString& details = QString()) const;
- void report(const QString& message,
- const QString& details = QString()) const;
+ void warning(const QString &message,
+ const QString &details = QString()) const;
+ void error(const QString &message,
+ const QString &details = QString()) const;
+ 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(const Config& config);
+ static void initialize(const Config &config);
static void terminate();
- static void information(const QString& message);
- static void internalError(const QString& hint);
- static void logToStdErr(const QString& message);
- static void logToStdErrAlways(const QString& message);
+ static void information(const QString &message);
+ static void internalError(const QString &hint);
+ static void logToStdErr(const QString &message);
+ static void logToStdErrAlways(const QString &message);
static void startLoggingProgress() { logProgress_ = true; }
static void stopLoggingProgress() { logProgress_ = false; }
static QString canonicalRelativePath(const QString &path);
@@ -105,8 +105,8 @@ private:
friend class QTypeInfo<StackEntry>;
void emitMessage(MessageType type,
- const QString& message,
- const QString& details) const;
+ const QString &message,
+ const QString &details) const;
QString toString() const;
QString top() const;
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp
index 3e70778c4..623bb0228 100644
--- a/src/qdoc/main.cpp
+++ b/src/qdoc/main.cpp
@@ -73,7 +73,7 @@ bool creationTimeBefore(const QFileInfo &fi1, const QFileInfo &fi2)
}
#ifndef QT_NO_TRANSLATION
-typedef QPair<QString, QTranslator*> Translator;
+typedef QPair<QString, QTranslator *> Translator;
static QList<Translator> translators;
#endif
@@ -89,9 +89,9 @@ static QDocGlobals qdocGlobals;
a list of output formats; each format may have a different
output subdirectory where index files are located.
*/
-static void loadIndexFiles(Config& config, const QSet<QString> &formats)
+static void loadIndexFiles(Config &config, const QSet<QString> &formats)
{
- QDocDatabase* qdb = QDocDatabase::qdocDB();
+ QDocDatabase *qdb = QDocDatabase::qdocDB();
QStringList indexFiles;
QStringList configIndexes = config.getStringList(CONFIG_INDEXES);
foreach (const QString &index, configIndexes) {
@@ -336,7 +336,7 @@ static void processQdocconfFile(const QString &fileName, Config &config)
Note: qdocDB() allocates a new instance only if no instance exists.
So it is safe to call qdocDB() any time.
*/
- QDocDatabase* qdb = QDocDatabase::qdocDB();
+ QDocDatabase *qdb = QDocDatabase::qdocDB();
qdb->setVersion(config.getString(CONFIG_VERSION));
qdb->setShowInternal(config.getBool(CONFIG_SHOWINTERNAL));
qdb->setSingleExec(config.getBool(CONFIG_SINGLEEXEC));
@@ -369,7 +369,7 @@ static void processQdocconfFile(const QString &fileName, Config &config)
qdb->setSearchOrder(qdocGlobals.dependModules());
// Store the title of the index (landing) page
- NamespaceNode* root = qdb->primaryTreeRoot();
+ NamespaceNode *root = qdb->primaryTreeRoot();
if (root) {
QString title = config.getString(CONFIG_NAVIGATION
+ Config::dot
@@ -497,7 +497,7 @@ static void processQdocconfFile(const QString &fileName, Config &config)
qCDebug(lcQdoc, "Generating docs");
QSet<QString>::ConstIterator of = outputFormats.constBegin();
while (of != outputFormats.constEnd()) {
- Generator* generator = Generator::generatorForFormat(*of);
+ Generator *generator = Generator::generatorForFormat(*of);
if (generator == nullptr)
outputFormatsLocation.fatal(QCoreApplication::translate("QDoc",
"Unknown output format '%1'").arg(*of));
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index 564c75b54..32a6bc025 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
int Node::propertyGroupCount_ = 0;
QStringMap Node::operators_;
-QMap<QString,Node::NodeType> Node::goals_;
+QMap<QString, Node::NodeType> Node::goals_;
/*!
\class Node
@@ -159,8 +159,8 @@ bool Node::changeType(NodeType from, NodeType to)
bool Node::nodeNameLessThan(const Node *n1, const Node *n2)
{
if (n1->isPageNode() && n2->isPageNode()) {
- const PageNode* f1 = static_cast<const PageNode*>(n1);
- const PageNode* f2 = static_cast<const PageNode*>(n2);
+ const PageNode *f1 = static_cast<const PageNode *>(n1);
+ const PageNode *f2 = static_cast<const PageNode *>(n2);
if (f1->fullTitle() < f2->fullTitle())
return true;
else if (f1->fullTitle() > f2->fullTitle())
@@ -168,8 +168,8 @@ bool Node::nodeNameLessThan(const Node *n1, const Node *n2)
}
if (n1->isFunction() && n2->isFunction()) {
- const FunctionNode* f1 = static_cast<const FunctionNode*>(n1);
- const FunctionNode* f2 = static_cast<const FunctionNode*>(n2);
+ const FunctionNode *f1 = static_cast<const FunctionNode *>(n1);
+ const FunctionNode *f2 = static_cast<const FunctionNode *>(n2);
if (f1->isConst() < f2->isConst())
return true;
@@ -624,13 +624,13 @@ QString Node::plainName() const
\a relative. Almost all calls to this function pass 0 for
\a relative.
*/
-QString Node::plainFullName(const Node* relative) const
+QString Node::plainFullName(const Node *relative) const
{
if (name_.isEmpty())
return QLatin1String("global");
QString fullName;
- const Node* node = this;
+ const Node *node = this;
while (node) {
fullName.prepend(node->plainName());
if (node->parent() == relative || node->parent()->name().isEmpty())
@@ -653,7 +653,7 @@ QString Node::plainSignature() const
return QLatin1String("global");
QString fullName;
- const Node* node = this;
+ const Node *node = this;
while (node) {
fullName.prepend(node->signature(false, true));
if (node->parent()->name().isEmpty())
@@ -669,7 +669,7 @@ QString Node::plainSignature() const
often just the title(). When it is not the title, it is the
plainFullName().
*/
-QString Node::fullName(const Node* relative) const
+QString Node::fullName(const Node *relative) const
{
if ((isTextPageNode() || isGroup()) && !title().isEmpty())
return title();
@@ -681,7 +681,7 @@ QString Node::fullName(const Node* relative) const
If a match is found, return true. If no match is found,
return false.
*/
-bool Node::match(const QList<int>& types) const
+bool Node::match(const QList<int> &types) const
{
for (int i=0; i<types.size(); ++i) {
if (nodeType() == types.at(i))
@@ -698,7 +698,7 @@ bool Node::match(const QList<int>& types) const
previous Doc was found. If \a replace is true, the Doc is
replaced silently.
*/
-void Node::setDoc(const Doc& doc, bool replace)
+void Node::setDoc(const Doc &doc, bool replace)
{
if (!doc_.isEmpty() && !replace && !doc.isMarkedReimp()) {
doc.location().warning(tr("Overrides a previous doc"));
@@ -712,7 +712,7 @@ void Node::setDoc(const Doc& doc, bool replace)
given \a parent and \a name. The new node is added to the
parent's child list.
*/
-Node::Node(NodeType type, Aggregate *parent, const QString& name)
+Node::Node(NodeType type, Aggregate *parent, const QString &name)
: nodeType_(type),
access_(Public),
safeness_(UnspecifiedSafeness),
@@ -729,48 +729,48 @@ Node::Node(NodeType type, Aggregate *parent, const QString& name)
parent_->addChild(this);
outSubDir_ = Generator::outputSubdir();
if (operators_.isEmpty()) {
- operators_.insert("++","inc");
- operators_.insert("--","dec");
- operators_.insert("==","eq");
- operators_.insert("!=","ne");
- operators_.insert("<<","lt-lt");
- operators_.insert(">>","gt-gt");
- operators_.insert("+=","plus-assign");
- operators_.insert("-=","minus-assign");
- operators_.insert("*=","mult-assign");
- operators_.insert("/=","div-assign");
- operators_.insert("%=","mod-assign");
- operators_.insert("&=","bitwise-and-assign");
- operators_.insert("|=","bitwise-or-assign");
- operators_.insert("^=","bitwise-xor-assign");
- operators_.insert("<<=","bitwise-left-shift-assign");
- operators_.insert(">>=","bitwise-right-shift-assign");
- operators_.insert("||","logical-or");
- operators_.insert("&&","logical-and");
- operators_.insert("()","call");
- operators_.insert("[]","subscript");
- operators_.insert("->","pointer");
- operators_.insert("->*","pointer-star");
- operators_.insert("+","plus");
- operators_.insert("-","minus");
- operators_.insert("*","mult");
- operators_.insert("/","div");
- operators_.insert("%","mod");
- operators_.insert("|","bitwise-or");
- operators_.insert("&","bitwise-and");
- operators_.insert("^","bitwise-xor");
- operators_.insert("!","not");
- operators_.insert("~","bitwise-not");
- operators_.insert("<=","lt-eq");
- operators_.insert(">=","gt-eq");
- operators_.insert("<","lt");
- operators_.insert(">","gt");
- operators_.insert("=","assign");
- operators_.insert(",","comma");
- operators_.insert("delete[]","delete-array");
- operators_.insert("delete","delete");
- operators_.insert("new[]","new-array");
- operators_.insert("new","new");
+ operators_.insert("++", "inc");
+ operators_.insert("--", "dec");
+ operators_.insert("==", "eq");
+ operators_.insert("!=", "ne");
+ operators_.insert("<<", "lt-lt");
+ operators_.insert(">>", "gt-gt");
+ operators_.insert("+=", "plus-assign");
+ operators_.insert("-=", "minus-assign");
+ operators_.insert("*=", "mult-assign");
+ operators_.insert("/=", "div-assign");
+ operators_.insert("%=", "mod-assign");
+ operators_.insert("&=", "bitwise-and-assign");
+ operators_.insert("|=", "bitwise-or-assign");
+ operators_.insert("^=", "bitwise-xor-assign");
+ operators_.insert("<<=" ,"bitwise-left-shift-assign");
+ operators_.insert(">>=" ,"bitwise-right-shift-assign");
+ operators_.insert("||", "logical-or");
+ operators_.insert("&&", "logical-and");
+ operators_.insert("()", "call");
+ operators_.insert("[]", "subscript");
+ operators_.insert("->", "pointer");
+ operators_.insert("->*", "pointer-star");
+ operators_.insert("+", "plus");
+ operators_.insert("-", "minus");
+ operators_.insert("*", "mult");
+ operators_.insert("/", "div");
+ operators_.insert("%", "mod");
+ operators_.insert("|", "bitwise-or");
+ operators_.insert("&", "bitwise-and");
+ operators_.insert("^", "bitwise-xor");
+ operators_.insert("!", "not");
+ operators_.insert("~", "bitwise-not");
+ operators_.insert("<=", "lt-eq");
+ operators_.insert(">=", "gt-eq");
+ operators_.insert("<", "lt");
+ operators_.insert(">", "gt");
+ operators_.insert("=", "assign");
+ operators_.insert(",", "comma");
+ operators_.insert("delete[]", "delete-array");
+ operators_.insert("delete", "delete");
+ operators_.insert("new[]", "new-array");
+ operators_.insert("new", "new");
}
setPageType(getPageType(type));
setGenus(getGenus(type));
@@ -928,7 +928,7 @@ QString Node::pageTypeString(PageType t)
QString Node::nodeTypeString() const
{
if (isFunction()) {
- const FunctionNode *fn = static_cast<const FunctionNode*>(this);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(this);
return fn->kindString();
}
return nodeTypeString(nodeType());
@@ -1005,7 +1005,7 @@ QString Node::nodeTypeString(NodeType t)
/*!
Set the page type according to the string \a t.
*/
-void Node::setPageType(const QString& t)
+void Node::setPageType(const QString &t)
{
if ((t == "API") || (t == "api"))
pageType_ = ApiPage;
@@ -1062,7 +1062,7 @@ bool Node::fromFlagValue(FlagValue fv, bool defaultValue)
*/
void Node::setLink(LinkType linkType, const QString &link, const QString &desc)
{
- QPair<QString,QString> linkPair;
+ QPair<QString, QString> linkPair;
linkPair.first = link;
linkPair.second = desc;
linkMap_[linkType] = linkPair;
@@ -1155,14 +1155,14 @@ Node::ThreadSafeness Node::inheritedThreadSafeness() const
pointer to its parent QMLor JS type node. Otherwise return
0;
*/
-QmlTypeNode* Node::qmlTypeNode()
+QmlTypeNode *Node::qmlTypeNode()
{
if (isQmlNode() || isJsNode()) {
- Node* n = this;
+ Node *n = this;
while (n && !(n->isQmlType() || n->isJsType()))
n = n->parent();
if (n && (n->isQmlType() || n->isJsType()))
- return static_cast<QmlTypeNode*>(n);
+ return static_cast<QmlTypeNode *>(n);
}
return nullptr;
}
@@ -1174,9 +1174,9 @@ QmlTypeNode* Node::qmlTypeNode()
class node is a component. It will be non-null if
the QML class node is a QML element.
*/
-ClassNode* Node::declarativeCppNode()
+ClassNode *Node::declarativeCppNode()
{
- QmlTypeNode* qcn = qmlTypeNode();
+ QmlTypeNode *qcn = qmlTypeNode();
if (qcn)
return qcn->classNode();
return nullptr;
@@ -1205,7 +1205,7 @@ bool Node::isInternal() const
Aggregate *Node::root() const
{
if (parent() == nullptr)
- return (this->isAggregate() ? static_cast<Aggregate*>(const_cast<Node*>(this)) : nullptr);
+ return (this->isAggregate() ? static_cast<Aggregate *>(const_cast<Node *>(this)) : nullptr);
Aggregate *t = parent();
while (t->parent() != nullptr)
t = t->parent();
@@ -1241,7 +1241,7 @@ void Node::setLocation(const Location& t)
/*!
Adds this node to the shared comment node \a t.
*/
-void Node::setSharedCommentNode(SharedCommentNode* t)
+void Node::setSharedCommentNode(SharedCommentNode *t)
{
sharedCommentNode_ = t;
t->append(this);
@@ -1320,7 +1320,7 @@ bool Node::isWrapper() const
QString Node::fullDocumentName() const
{
QStringList pieces;
- const Node* n = this;
+ const Node *n = this;
do {
if (!n->name().isEmpty())
@@ -1365,9 +1365,9 @@ QString Node::cleanId(const QString &str)
if (name.isEmpty())
return clean;
- name = name.replace("::","-");
+ name = name.replace("::", "-");
name = name.replace(QLatin1Char(' '), QLatin1Char('-'));
- name = name.replace("()","-call");
+ name = name.replace("()", "-call");
clean.reserve(name.size() + 20);
if (!str.startsWith("id-"))
@@ -1535,7 +1535,7 @@ QString Node::physicalModuleName() const
If this node is not a FunctionNode, this function returns plainName().
*/
-/*! \fn const QString& Node::fileNameBase() const
+/*! \fn const QString &Node::fileNameBase() const
Returns the node's file name base string, which is built once, when
Generator::fileBase() is called and stored in the Node.
*/
@@ -1546,7 +1546,7 @@ QString Node::physicalModuleName() const
\sa Node::fileNameBase()
*/
-/*! \fn void Node::setFileNameBase(const QString& t)
+/*! \fn void Node::setFileNameBase(const QString &t)
Sets the node's file name base to \a t. Only called by
Generator::fileBase().
*/
@@ -1587,7 +1587,7 @@ QString Node::physicalModuleName() const
I think this is needed for linking to something in the brief clause.
*/
-/*! \fn void Node::setParent(Aggregate* n)
+/*! \fn void Node::setParent(Aggregate *n)
Sets the node's parent pointer to \a n. Such a thing
is not lightly done. All the calls to this function
are in other member functions of Node subclasses. See
@@ -1609,12 +1609,12 @@ QString Node::physicalModuleName() const
of something. This function is called when the \c relates command is seen.
*/
-/*! \fn void Node::setOutputFileName(const QString& f)
+/*! \fn void Node::setOutputFileName(const QString &f)
In a PageNode, this function sets the node's output file name to \a f.
In a non-PageNode, this function does nothing.
*/
-/*! \fn void Node::addMember(Node* node)
+/*! \fn void Node::addMember(Node *node)
In a CollectionNode, this function adds \a node to the collection
node's members list. It does nothing if this node is not a CollectionNode.
*/
@@ -1654,7 +1654,7 @@ QString Node::physicalModuleName() const
members that are classes.
*/
-/*! \fn void Node::setDataType(const QString& dataType)
+/*! \fn void Node::setDataType(const QString &dataType)
If this node is a PropertyNode or a QmlPropertyNode, its
data type data member is set to \a dataType. Otherwise,
this function does nothing.
@@ -1667,7 +1667,7 @@ QString Node::physicalModuleName() const
documented has been found.
*/
-/*! \fn void appendGroupName(const QString& t)
+/*! \fn void appendGroupName(const QString &t)
If this node is a PageNode, the group name \a t is appended to the node's
list of group names. It is not clear to me what this list of group names
is used for, but it is written to the index file, and it is used in the
@@ -1717,7 +1717,7 @@ QString Node::physicalModuleName() const
the title() is returned.
*/
-/*! \fn bool Node::setTitle(const QString& title)
+/*! \fn bool Node::setTitle(const QString &title)
Sets the node's \a title, which is used for the title of
the documentation page, if one is generated for this node.
Returns \c true if the title is set. In this base class,
@@ -1726,7 +1726,7 @@ QString Node::physicalModuleName() const
the PageNode class is where the title is set.
*/
-/*! \fn bool Node::setSubtitle(const QString& subtitle)
+/*! \fn bool Node::setSubtitle(const QString &subtitle)
Sets the node's \a subtitle, which is used for the subtitle
of the documentation page, if one is generated for this node.
Returns \c true if the subtitle is set. In this base class,
@@ -1746,11 +1746,11 @@ QString Node::physicalModuleName() const
flag is set to \a flag.
*/
-/*! \fn Aggregate* Node::parent() const
+/*! \fn Aggregate *Node::parent() const
Returns the node's paprent pointer.
*/
-/*! \fn const QString& Node::name() const
+/*! \fn const QString &Node::name() const
Returns the node's name data member.
*/
@@ -1769,12 +1769,12 @@ QString Node::physicalModuleName() const
page is returned. Otherwise an empty string is returned.
*/
-/*! \fn void Node::setObsoleteLink(const QString& t)
+/*! \fn void Node::setObsoleteLink(const QString &t)
If this node is a ClassNode or a QmlTypeNode, the link to the obsolete members
page is set to \a t. Otherwise the function does nothing.
*/
-/*! \fn void Node::setQtVariable(const QString& v)
+/*! \fn void Node::setQtVariable(const QString &v)
If this node is a CollectionNode, its QT variable is set to \a v.
Otherwise the function does nothing. I don't know what the QT variable
is used for.
@@ -1786,13 +1786,13 @@ QString Node::physicalModuleName() const
variable is used for.
*/
-/*! \fn bool Node::hasTag(const QString& t) const
+/*! \fn bool Node::hasTag(const QString &t) const
If this node is a FunctionNode, the function returns \c true if
the function has the tag \a t. Otherwise the function returns
\c false. I don't know what the tag is used for.
*/
-/*! \fn const QMap<LinkType, QPair<QString,QString> >& Node::links() const
+/*! \fn const QMap<LinkType, QPair<QString, QString> > &Node::links() const
Returns a reference to this node's link map. The link map should
probably be moved to the PageNode, because it contains links to the
start page, next page, previous page, and contents page, and these
@@ -1828,7 +1828,7 @@ QString Node::physicalModuleName() const
\sa Location
*/
-/*! \fn const Doc& Node::doc() const
+/*! \fn const Doc &Node::doc() const
Returns a reference to the node's Doc data member.
\sa Doc
@@ -1856,11 +1856,11 @@ QString Node::physicalModuleName() const
represents a templated element.
*/
-/*! \fn const QString& Node::reconstitutedBrief() const
+/*! \fn const QString &Node::reconstitutedBrief() const
Returns the node's reconstituted brief data member.
*/
-/*! \fn void Node::addPageKeywords(const QString& t)
+/*! \fn void Node::addPageKeywords(const QString &t)
If this is a PageNode, the function appends the string \a t
to the page keywords data member. Otherwise the function does
nothing.
@@ -1899,7 +1899,7 @@ QString Node::physicalModuleName() const
module identifier. Otherwise it returns an empty string.
*/
-/*! \fn void Node::setLogicalModuleInfo(const QString& arg)
+/*! \fn void Node::setLogicalModuleInfo(const QString &arg)
If this node is a CollectionNode, this function splits \a arg
on the blank character to get a logical module name and version
number. If the version number is present, it splits the version
@@ -1912,7 +1912,7 @@ QString Node::physicalModuleName() const
when the QML or javascript module page is generated.
*/
-/*! \fn void Node::setLogicalModuleInfo(const QStringList& info)
+/*! \fn void Node::setLogicalModuleInfo(const QStringList &info)
If this node is a CollectionNode, this function accepts the
logical module \a info as a string list. If the logical module
info contains the version number, it splits the version number
@@ -1925,42 +1925,42 @@ QString Node::physicalModuleName() const
of the function is called when qdoc is reading an index file.
*/
-/*! \fn CollectionNode* Node::logicalModule() const
+/*! \fn CollectionNode *Node::logicalModule() const
If this is a QmlTypeNode, a pointer to its QML module is returned,
which is a pointer to a CollectionNode. Otherwise the \c nullptr
is returned.
*/
-/*! \fn void Node::setQmlModule(CollectionNode* t)
+/*! \fn void Node::setQmlModule(CollectionNode *t)
If this is a QmlTypeNode, this function sets the QML type's QML module
pointer to the CollectionNode \a t. Otherwise the function does nothing.
*/
-/*! \fn ClassNode* Node::classNode()
+/*! \fn ClassNode *Node::classNode()
If this is a QmlTypeNode, this function returns the pointer to
the C++ ClassNode that this QML type represents. Otherwise the
\c nullptr is returned.
*/
-/*! \fn void Node::setClassNode(ClassNode* cn)
+/*! \fn void Node::setClassNode(ClassNode *cn)
If this is a QmlTypeNode, this function sets the C++ class node
to \a cn. The C++ ClassNode is the C++ implementation of the QML
type.
*/
-/*! \fn const QString& Node::outputSubdirectory() const
+/*! \fn const QString &Node::outputSubdirectory() const
Returns the node's output subdirector, which is the subdirectory
of the output directory where the node's documentation file is
written.
*/
-/*! \fn void Node::setOutputSubdirectory(const QString& t)
+/*! \fn void Node::setOutputSubdirectory(const QString &t)
Sets the node's output subdirectory to \a t. This is the subdirector
of the output directory where the node's documentation file will be
written.
*/
-/*! \fn NodeType Node::goal(const QString& t)
+/*! \fn NodeType Node::goal(const QString &t)
When a square-bracket parameter is used in a qdoc command, this
function might be called to convert the text string \a t obtained
from inside the square brackets to be a Goal value, which is returned.
@@ -2025,7 +2025,7 @@ Aggregate::~Aggregate()
find all this node's children that have the given \a name,
and return the one that satisfies the \a genus requirement.
*/
-Node *Aggregate::findChildNode(const QString& name, Node::Genus genus, int findFlags) const
+Node *Aggregate::findChildNode(const QString &name, Node::Genus genus, int findFlags) const
{
if (genus == Node::DontCare) {
Node *node = nonfunctionMap_.value(name);
@@ -2035,7 +2035,7 @@ Node *Aggregate::findChildNode(const QString& name, Node::Genus genus, int findF
NodeList nodes = nonfunctionMap_.values(name);
if (!nodes.isEmpty()) {
for (int i = 0; i < nodes.size(); ++i) {
- Node* node = nodes.at(i);
+ Node *node = nodes.at(i);
if (genus == node->genus()) {
if (findFlags & TypesOnly) {
if (!node->isTypedef()
@@ -2099,11 +2099,11 @@ void Aggregate::findChildren(const QString &name, NodeVector &nodes) const
passed must be one of the isXxx() functions in class Node
that tests the node type.
*/
-Node* Aggregate::findNonfunctionChild(const QString& name, bool (Node::*isMatch) () const)
+Node *Aggregate::findNonfunctionChild(const QString &name, bool (Node::*isMatch) () const)
{
NodeList nodes = nonfunctionMap_.values(name);
for (int i=0; i<nodes.size(); ++i) {
- Node* node = nodes.at(i);
+ Node *node = nodes.at(i);
if ((node->*(isMatch))())
return node;
}
@@ -2188,10 +2188,10 @@ void Aggregate::markUndocumentedChildrenInternal()
if (!child->isSharingComment() && !child->hasDoc() && !child->isDontDocument()) {
if (!child->docMustBeGenerated()) {
if (child->isFunction()) {
- if (static_cast<FunctionNode*>(child)->hasAssociatedProperties())
+ if (static_cast<FunctionNode *>(child)->hasAssociatedProperties())
continue;
} else if (child->isTypedef()) {
- if (static_cast<TypedefNode*>(child)->hasAssociatedEnum())
+ if (static_cast<TypedefNode *>(child)->hasAssociatedEnum())
continue;
}
child->setAccess(Node::Private);
@@ -2199,7 +2199,7 @@ void Aggregate::markUndocumentedChildrenInternal()
}
}
if (child->isAggregate()) {
- static_cast<Aggregate*>(child)->markUndocumentedChildrenInternal();
+ static_cast<Aggregate *>(child)->markUndocumentedChildrenInternal();
}
}
}
@@ -2260,7 +2260,7 @@ void Aggregate::normalizeOverloads()
*/
foreach (Node *n, children_) {
if (n->isAggregate())
- static_cast<Aggregate*>(n)->normalizeOverloads();
+ static_cast<Aggregate *>(n)->normalizeOverloads();
}
}
@@ -2425,7 +2425,7 @@ void Aggregate::adoptFunction(FunctionNode *fn)
again, because it is presumed to already be there. We just
want to be able to find the child by its \a title.
*/
-void Aggregate::addChildByTitle(Node* child, const QString& title)
+void Aggregate::addChildByTitle(Node *child, const QString &title)
{
nonfunctionMap_.insertMulti(title, child);
}
@@ -2456,7 +2456,7 @@ void Aggregate::addChild(Node *child)
child->setUrl(QString());
child->setIndexNodeFlag(isIndexNode());
if (child->isFunction()) {
- addFunction(static_cast<FunctionNode*>(child));
+ addFunction(static_cast<FunctionNode *>(child));
}
else {
nonfunctionMap_.insertMulti(child->name(), child);
@@ -2482,14 +2482,14 @@ void Aggregate::adoptChild(Node *child)
children_.append(child);
child->setParent(this);
if (child->isFunction()) {
- adoptFunction(static_cast<FunctionNode*>(child));
+ adoptFunction(static_cast<FunctionNode *>(child));
}
else {
nonfunctionMap_.insertMulti(child->name(), child);
if (child->isEnumType()) {
enumChildren_.append(child);
} else if (child->isSharedCommentNode()) {
- SharedCommentNode *scn = static_cast<SharedCommentNode*>(child);
+ SharedCommentNode *scn = static_cast<SharedCommentNode *>(child);
for (Node *n : scn->collective())
adoptChild(n);
}
@@ -2511,7 +2511,7 @@ void Aggregate::setOutputSubdirectory(const QString &t)
If this node has a child that is a QML property or JS property
named \a n, return a pointer to that child. Otherwise, return \nullptr.
*/
-QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n) const
+QmlPropertyNode *Aggregate::hasQmlProperty(const QString &n) const
{
NodeType goal = Node::QmlProperty;
if (isJsNode())
@@ -2519,7 +2519,7 @@ QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n) const
foreach (Node *child, children_) {
if (child->nodeType() == goal) {
if (child->name() == n)
- return static_cast<QmlPropertyNode*>(child);
+ return static_cast<QmlPropertyNode *>(child);
}
}
return nullptr;
@@ -2530,7 +2530,7 @@ QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n) const
named \a n and that also matches \a attached, return a pointer
to that child.
*/
-QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n, bool attached) const
+QmlPropertyNode *Aggregate::hasQmlProperty(const QString &n, bool attached) const
{
NodeType goal = Node::QmlProperty;
if (isJsNode())
@@ -2538,7 +2538,7 @@ QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n, bool attached) cons
foreach (Node *child, children_) {
if (child->nodeType() == goal) {
if (child->name() == n && child->isAttached() == attached)
- return static_cast<QmlPropertyNode*>(child);
+ return static_cast<QmlPropertyNode *>(child);
}
}
return nullptr;
@@ -2570,12 +2570,12 @@ bool Aggregate::hasOverloads(const FunctionNode *fn) const
Prints the inner node's list of children.
For debugging only.
*/
-void Aggregate::printChildren(const QString& title)
+void Aggregate::printChildren(const QString &title)
{
qDebug() << title << name() << children_.size();
if (children_.size() > 0) {
for (int i=0; i<children_.size(); ++i) {
- Node* n = children_.at(i);
+ Node *n = children_.at(i);
qDebug() << " CHILD:" << n->name() << n->nodeTypeString();
}
}
@@ -2666,7 +2666,7 @@ void Aggregate::findAllFunctions(NodeMapMap &functionIndex)
}
foreach (Node *n, children_) {
if (n->isAggregate() && !n->isPrivate())
- static_cast<Aggregate*>(n)->findAllFunctions(functionIndex);
+ static_cast<Aggregate *>(n)->findAllFunctions(functionIndex);
}
}
@@ -2690,7 +2690,7 @@ void Aggregate::findAllNamespaces(NodeMultiMap &namespaces)
if (n->isAggregate() && !n->isPrivate()) {
if (n->isNamespace() && !n->name().isEmpty())
namespaces.insert(n->name(), n);
- static_cast<Aggregate*>(n)->findAllNamespaces(namespaces);
+ static_cast<Aggregate *>(n)->findAllNamespaces(namespaces);
}
}
}
@@ -2729,7 +2729,7 @@ void Aggregate::findAllObsoleteThings()
else if (n->isQmlType() || n->isJsType())
QDocDatabase::obsoleteQmlTypes().insert(n->qualifyQmlName(), n);
} else if (n->isClassNode()) {
- Aggregate* a = static_cast<Aggregate*>(n);
+ Aggregate *a = static_cast<Aggregate *>(n);
if (a->hasObsoleteMembers())
QDocDatabase::classesWithObsoleteMembers().insert(n->qualifyCppName(), n);
}
@@ -2739,7 +2739,7 @@ void Aggregate::findAllObsoleteThings()
QDocDatabase::qmlTypesWithObsoleteMembers().insert(n->qualifyQmlName(), n);
}
else if (n->isAggregate()) {
- static_cast<Aggregate*>(n)->findAllObsoleteThings();
+ static_cast<Aggregate *>(n)->findAllObsoleteThings();
}
}
}
@@ -2769,7 +2769,7 @@ void Aggregate::findAllClasses()
if (!QDocDatabase::examples().contains(title, n))
QDocDatabase::examples().insert(title, n);
} else if (n->isAggregate()) {
- static_cast<Aggregate*>(n)->findAllClasses();
+ static_cast<Aggregate *>(n)->findAllClasses();
}
}
}
@@ -2786,7 +2786,7 @@ void Aggregate::findAllAttributions(NodeMultiMap &attributions)
if (n->pageType() == Node::AttributionPage)
attributions.insertMulti(n->tree()->indexTitle(), n);
else if (n->isAggregate())
- static_cast<Aggregate*>(n)->findAllAttributions(attributions);
+ static_cast<Aggregate *>(n)->findAllAttributions(attributions);
}
}
}
@@ -2819,7 +2819,7 @@ void Aggregate::findAllSince()
if (n->isFunction()) {
// Insert functions into the general since map.
- FunctionNode *fn = static_cast<FunctionNode*>(n);
+ FunctionNode *fn = static_cast<FunctionNode *>(n);
if (!fn->isObsolete() && !fn->isSomeCtor() && !fn->isDtor())
nsmap.value().insert(fn->name(), fn);
}
@@ -2844,7 +2844,7 @@ void Aggregate::findAllSince()
}
// Recursively find child nodes with since commands.
if (n->isAggregate())
- static_cast<Aggregate*>(n)->findAllSince();
+ static_cast<Aggregate *>(n)->findAllSince();
}
}
@@ -2949,7 +2949,7 @@ QString Aggregate::typeWord(bool cap) const
I no longer know what they are.
*/
-/*! \fn QmlTypeNode* Aggregate::qmlBaseNode() const
+/*! \fn QmlTypeNode *Aggregate::qmlBaseNode() const
If this Aggregate is a QmlTypeNode, this function returns a pointer to
the QmlTypeNode that is its base type. Otherwise it returns \c nullptr.
A QmlTypeNode doesn't always have a base type, so even when this Aggregate
@@ -2965,11 +2965,11 @@ QString Aggregate::typeWord(bool cap) const
is called recursively with the list of base classes from
that private or internal class node.
*/
-void ClassNode::promotePublicBases(const QList<RelatedClass>& bases)
+void ClassNode::promotePublicBases(const QList<RelatedClass> &bases)
{
if (!bases.isEmpty()) {
for (int i = bases.size() - 1; i >= 0; --i) {
- ClassNode* bc = bases.at(i).node_;
+ ClassNode *bc = bases.at(i).node_;
if (bc == nullptr)
bc = QDocDatabase::qdocDB()->findClassNode(bases.at(i).path_);
if (bc != nullptr) {
@@ -2995,7 +2995,7 @@ void ClassNode::removePrivateAndInternalBases()
// Remove private and duplicate base classes.
while (i < bases_.size()) {
- ClassNode* bc = bases_.at(i).node_;
+ ClassNode *bc = bases_.at(i).node_;
if (bc == nullptr)
bc = QDocDatabase::qdocDB()->findClassNode(bases_.at(i).path_);
if (bc != nullptr && (bc->isPrivate() || bc->isInternal() || found.contains(bc))) {
@@ -3012,7 +3012,7 @@ void ClassNode::removePrivateAndInternalBases()
i = 0;
while (i < derived_.size()) {
- ClassNode* dc = derived_.at(i).node_;
+ ClassNode *dc = derived_.at(i).node_;
if (dc != nullptr && (dc->isPrivate() || dc->isInternal())) {
derived_.removeAt(i);
const QList<RelatedClass> &dd = dc->derivedClasses();
@@ -3027,15 +3027,15 @@ void ClassNode::removePrivateAndInternalBases()
/*!
*/
-void ClassNode::resolvePropertyOverriddenFromPtrs(PropertyNode* pn)
+void ClassNode::resolvePropertyOverriddenFromPtrs(PropertyNode *pn)
{
QList<RelatedClass>::const_iterator bc = baseClasses().constBegin();
while (bc != baseClasses().constEnd()) {
- ClassNode* cn = bc->node_;
+ ClassNode *cn = bc->node_;
if (cn) {
- Node* n = cn->findNonfunctionChild(pn->name(), &Node::isProperty);
+ Node *n = cn->findNonfunctionChild(pn->name(), &Node::isProperty);
if (n) {
- PropertyNode* baseProperty = static_cast<PropertyNode*>(n);
+ PropertyNode *baseProperty = static_cast<PropertyNode *>(n);
cn->resolvePropertyOverriddenFromPtrs(baseProperty);
pn->setOverriddenFrom(baseProperty);
}
@@ -3077,7 +3077,7 @@ void ClassNode::resolvePropertyOverriddenFromPtrs(PropertyNode* pn)
Node tree.
*/
-/*! \fn NamespaceNode(Aggregate* parent, const QString& name)
+/*! \fn NamespaceNode(Aggregate *parent, const QString &name)
Constructs a NamespaceNode with the specified \a parent and \a name.
The node type is Node::Namespace.
*/
@@ -3245,14 +3245,14 @@ void NamespaceNode::includeChild(Node *child)
Otherwise returns \c false.
*/
-/*! \fn void NamespaceNode::setDocNode(NamespaceNode* ns) { docNode_ = ns; }
+/*! \fn void NamespaceNode::setDocNode(NamespaceNode *ns) { docNode_ = ns; }
Called in QDocDatabase::resolveNamespaces() to set the pointer to the
NamespaceNode in which this namespace is documented.
\sa QDocDatabase::resolveNamespaces()
*/
-/*! \fn NamespaceNode* NamespaceNode::docNode() const
+/*! \fn NamespaceNode *NamespaceNode::docNode() const
Returns a pointer to the NamespaceNode that represents where the namespace
documentation is actually generated. API elements in many different modules
can be included in a single namespace. That namespace is only documented in
@@ -3277,13 +3277,13 @@ void NamespaceNode::includeChild(Node *child)
instances of RelatedClass in containers.
*/
-/*! \fn RelatedClass::RelatedClass(Node::Access access, ClassNode* node)
+/*! \fn RelatedClass::RelatedClass(Node::Access access, ClassNode *node)
This is the constructor used when the related class has been resolved.
In other words, when the ClassNode has been created so that \a node is
not \c nullptr.
*/
-/*! \fn RelatedClass::RelatedClass(Node::Access access, const QStringList& path, const QString& signature)
+/*! \fn RelatedClass::RelatedClass(Node::Access access, const QStringList &path, const QString &signature)
This is the constructor used when the related class has not bee resolved,
because it hasn't been created yet. In that case, we store the qualified
\a path name of the class and the \a signature of the class, which I think
@@ -3329,23 +3329,23 @@ QString RelatedClass::accessString() const
instances of UsingClause in containers.
*/
-/*! \fn UsingClause::UsingClause(const QString& signature)
+/*! \fn UsingClause::UsingClause(const QString &signature)
We assume the node that the using clause refers to has not yet been
created, so this constructor provides its \a signature, which is the
qualified path name of whatever it is.
*/
-/*! \fn const QString& UsingClause::signature() const
+/*! \fn const QString &UsingClause::signature() const
This function returns a const reference to the signature, which is the qualified
path name of whatever the using clause refers to.
*/
-/*! \fn const Node* UsingClause::node()
+/*! \fn const Node *UsingClause::node()
This function returns a pointer to the node which has been resolved by looking
up the signature in the qdoc database. If it wasn't resolved, \c nullptr is returned.
*/
-/*! \fn void UsingClause::setNode(const Node* n)
+/*! \fn void UsingClause::setNode(const Node *n)
This function is called when the signature can be resolved. The node pointer
is set to \a n.
*/
@@ -3364,7 +3364,7 @@ QString RelatedClass::accessString() const
classes. The base class has the specified \a access. This
is a resolved base class.
*/
-void ClassNode::addResolvedBaseClass(Access access, ClassNode* node)
+void ClassNode::addResolvedBaseClass(Access access, ClassNode *node)
{
bases_.append(RelatedClass(access, node));
node->derived_.append(RelatedClass(access, this));
@@ -3374,7 +3374,7 @@ void ClassNode::addResolvedBaseClass(Access access, ClassNode* node)
Adds the derived class \a node to this class's list of derived
classes. The derived class inherits this class with \a access.
*/
-void ClassNode::addDerivedClass(Access access, ClassNode* node)
+void ClassNode::addDerivedClass(Access access, ClassNode *node)
{
derived_.append(RelatedClass(access, node));
}
@@ -3386,8 +3386,8 @@ void ClassNode::addDerivedClass(Access access, ClassNode* node)
class, the pointer to the base class node is 0.
*/
void ClassNode::addUnresolvedBaseClass(Access access,
- const QStringList& path,
- const QString& signature)
+ const QStringList &path,
+ const QString &signature)
{
bases_.append(RelatedClass(access, path, signature));
}
@@ -3398,7 +3398,7 @@ void ClassNode::addUnresolvedBaseClass(Access access,
resolved before the generate phase of qdoc. In an unresolved
\c using clause, the pointer to the function node is 0.
*/
-void ClassNode::addUnresolvedUsingClause(const QString& signature)
+void ClassNode::addUnresolvedUsingClause(const QString &signature)
{
usingClauses_.append(UsingClause(signature));
}
@@ -3407,19 +3407,19 @@ void ClassNode::addUnresolvedUsingClause(const QString& signature)
Search the child list to find the property node with the
specified \a name.
*/
-PropertyNode* ClassNode::findPropertyNode(const QString& name)
+PropertyNode *ClassNode::findPropertyNode(const QString &name)
{
- Node* n = findNonfunctionChild(name, &Node::isProperty);
+ Node *n = findNonfunctionChild(name, &Node::isProperty);
if (n)
- return static_cast<PropertyNode*>(n);
+ return static_cast<PropertyNode *>(n);
- PropertyNode* pn = nullptr;
+ PropertyNode *pn = nullptr;
const QList<RelatedClass> &bases = baseClasses();
if (!bases.isEmpty()) {
for (int i = 0; i < bases.size(); ++i) {
- ClassNode* cn = bases[i].node_;
+ ClassNode *cn = bases[i].node_;
if (cn) {
pn = cn->findPropertyNode(name);
if (pn)
@@ -3427,10 +3427,10 @@ PropertyNode* ClassNode::findPropertyNode(const QString& name)
}
}
}
- const QList<RelatedClass>& ignoredBases = ignoredBaseClasses();
+ const QList<RelatedClass> &ignoredBases = ignoredBaseClasses();
if (!ignoredBases.isEmpty()) {
for (int i = 0; i < ignoredBases.size(); ++i) {
- ClassNode* cn = ignoredBases[i].node_;
+ ClassNode *cn = ignoredBases[i].node_;
if (cn) {
pn = cn->findPropertyNode(name);
if (pn)
@@ -3448,20 +3448,20 @@ PropertyNode* ClassNode::findPropertyNode(const QString& name)
finds one, it returns the pointer to that QML element. If
it doesn't find one, it returns null.
*/
-QmlTypeNode* ClassNode::findQmlBaseNode()
+QmlTypeNode *ClassNode::findQmlBaseNode()
{
- QmlTypeNode* result = nullptr;
- const QList<RelatedClass>& bases = baseClasses();
+ QmlTypeNode *result = nullptr;
+ const QList<RelatedClass> &bases = baseClasses();
if (!bases.isEmpty()) {
for (int i = 0; i < bases.size(); ++i) {
- ClassNode* cn = bases[i].node_;
+ ClassNode *cn = bases[i].node_;
if (cn && cn->qmlElement()) {
return cn->qmlElement();
}
}
for (int i = 0; i < bases.size(); ++i) {
- ClassNode* cn = bases[i].node_;
+ ClassNode *cn = bases[i].node_;
if (cn) {
result = cn->findQmlBaseNode();
if (result != nullptr) {
@@ -3483,7 +3483,7 @@ QmlTypeNode* ClassNode::findQmlBaseNode()
This should be revised because clang provides the path to the
overridden function. mws 15/12/2018
*/
-FunctionNode* ClassNode::findOverriddenFunction(const FunctionNode* fn)
+FunctionNode *ClassNode::findOverriddenFunction(const FunctionNode *fn)
{
QList<RelatedClass>::Iterator bc = bases_.begin();
while (bc != bases_.end()) {
@@ -3512,7 +3512,7 @@ FunctionNode* ClassNode::findOverriddenFunction(const FunctionNode* fn)
class's base classes. Return a pointer to the overridden
property or return 0.
*/
-PropertyNode* ClassNode::findOverriddenProperty(const FunctionNode* fn)
+PropertyNode *ClassNode::findOverriddenProperty(const FunctionNode *fn)
{
QList<RelatedClass>::Iterator bc = bases_.begin();
while (bc != bases_.end()) {
@@ -3526,7 +3526,7 @@ PropertyNode* ClassNode::findOverriddenProperty(const FunctionNode* fn)
NodeList::const_iterator i = children.begin();
while (i != children.end()) {
if ((*i)->isProperty()) {
- PropertyNode *pn = static_cast<PropertyNode*>(*i);
+ PropertyNode *pn = static_cast<PropertyNode *>(*i);
if (pn->name() == fn->name() || pn->hasAccessFunction(fn->name())) {
if (pn->hasDoc())
return pn;
@@ -3564,7 +3564,7 @@ bool ClassNode::docMustBeGenerated() const
\brief This class represents a C++ header file.
*/
-HeaderNode::HeaderNode(Aggregate* parent, const QString& name) : Aggregate(HeaderFile, parent, name)
+HeaderNode::HeaderNode(Aggregate *parent, const QString &name) : Aggregate(HeaderFile, parent, name)
{
// Add the include file with enclosing angle brackets removed
if (name.startsWith(QChar('<')) && name.length() > 2)
@@ -3657,12 +3657,12 @@ bool PageNode::setTitle(const QString &title)
Sets the node's \a subtitle. Returns true;
*/
-/*! \fn PageNode::PageNode(Aggregate* parent, const QString& name)
+/*! \fn PageNode::PageNode(Aggregate *parent, const QString &name)
This constructor sets the PageNode's \a parent and the \a name is the
argument of the \c {\\page} command. The node type is set to Node::Page.
*/
-/*! \fn PageNode::PageNode(NodeType type, Aggregate* parent, const QString& name)
+/*! \fn PageNode::PageNode(NodeType type, Aggregate *parent, const QString &name)
This constructor is not called directly. It is called by the constructors of
subclasses of PageNode, usually Aggregate. The node type is set to \a type,
and the parent pointer is set to \a parent. \a name is the argument of the topic
@@ -3670,7 +3670,7 @@ bool PageNode::setTitle(const QString &title)
or \c {\\namespace}, for example.
*/
-/*! \fn PageNode::PageNode(Aggregate* parent, const QString& name, PageType ptype)
+/*! \fn PageNode::PageNode(Aggregate *parent, const QString &name, PageType ptype)
This constructor is called when the argument to the \c {\\page} command
contains a space, which means the second word of the argument is the page type.
It creates a PageNode that has node type Node::Page, with the specified
@@ -3706,7 +3706,7 @@ bool PageNode::setTitle(const QString &title)
returned.
*/
-/*! \fn void PageNode::setImageFileName(const QString& ifn)
+/*! \fn void PageNode::setImageFileName(const QString &ifn)
If this PageNode is an ExampleNode, the image file name
data member is set to \a ifn. Otherwise the function does
nothing.
@@ -3720,23 +3720,23 @@ bool PageNode::setTitle(const QString &title)
Sets the no auto-list flag to \a b.
*/
-/*! \fn const QStringList& PageNode::groupNames() const
+/*! \fn const QStringList &PageNode::groupNames() const
Returns a const reference to the string list containing all the group names.
*/
-/*! \fn void PageNode::appendGroupName(const QString& t)
+/*! \fn void PageNode::appendGroupName(const QString &t)
Appends \a t to the list of group names.
*/
-/*! \fn const QStringList& PageNode::pageKeywords() const
+/*! \fn const QStringList &PageNode::pageKeywords() const
Returns a const reference to the list of keywords for this page.
*/
-/*! \fn void PageNode::addPageKeywords(const QString& t)
+/*! \fn void PageNode::addPageKeywords(const QString &t)
Appends \a t to the keywords list.
*/
-/*! \fn void PageNode::setOutputFileName(const QString& f)
+/*! \fn void PageNode::setOutputFileName(const QString &f)
Sets this PageNode's output file name to \a f.
*/
@@ -3758,7 +3758,7 @@ bool PageNode::setTitle(const QString &title)
ExternalPageNode inherits PageNode.
*/
-/*! \fn ExternalPageNode::ExternalPageNode(Aggregate* parent, const QString& name)
+/*! \fn ExternalPageNode::ExternalPageNode(Aggregate *parent, const QString &name)
The constructor creates an ExternalPageNode as a child node of \a parent.
It's \a name is the argument from the \c {\\externalpage} command. The node
type is Node::ExternalPage, and the page type is Node::ArticlePage.
@@ -3892,7 +3892,7 @@ Node *TypeAliasNode::clone(Aggregate *parent)
its overload number is set to 0. These data members are set
in normalizeOverloads(), when all the overloads are known.
*/
-FunctionNode::FunctionNode(Aggregate *parent, const QString& name)
+FunctionNode::FunctionNode(Aggregate *parent, const QString &name)
: Node(Function, parent, name),
const_(false),
static_(false),
@@ -3922,7 +3922,7 @@ FunctionNode::FunctionNode(Aggregate *parent, const QString& name)
its overload number is set to 0. These data members are set
in normalizeOverloads(), when all the overloads are known.
*/
-FunctionNode::FunctionNode(Metaness kind, Aggregate *parent, const QString& name, bool attached)
+FunctionNode::FunctionNode(Metaness kind, Aggregate *parent, const QString &name, bool attached)
: Node(Function, parent, name),
const_(false),
static_(false),
@@ -3982,7 +3982,7 @@ QString FunctionNode::virtualness() const
parent() is a C++ class, set the parent's \e abstract flag to
\c {true}.
*/
-void FunctionNode::setVirtualness(const QString& t)
+void FunctionNode::setVirtualness(const QString &t)
{
if (t == QLatin1String("non"))
virtualness_ = NonVirtual;
@@ -4071,7 +4071,7 @@ Node::Genus FunctionNode::getGenus(FunctionNode::Metaness t)
This static function converts the string \a t to an enum
value for the kind of function named by \a t.
*/
-FunctionNode::Metaness FunctionNode::getMetaness(const QString& t)
+FunctionNode::Metaness FunctionNode::getMetaness(const QString &t)
{
if (metanessMap_.isEmpty())
buildMetanessMap();
@@ -4082,7 +4082,7 @@ FunctionNode::Metaness FunctionNode::getMetaness(const QString& t)
This static function converts the topic string \a t to an enum
value for the kind of function this FunctionNode represents.
*/
-FunctionNode::Metaness FunctionNode::getMetanessFromTopic(const QString& t)
+FunctionNode::Metaness FunctionNode::getMetanessFromTopic(const QString &t)
{
if (topicMetanessMap_.isEmpty())
buildTopicMetanessMap();
@@ -4094,7 +4094,7 @@ FunctionNode::Metaness FunctionNode::getMetanessFromTopic(const QString& t)
of string \a t, which is the value of the function's "meta"
attribute in an index file. Returns the Metaness value
*/
-FunctionNode::Metaness FunctionNode::setMetaness(const QString& t)
+FunctionNode::Metaness FunctionNode::setMetaness(const QString &t)
{
metaness_ = getMetaness(t);
return metaness_;
@@ -4337,10 +4337,10 @@ QString FunctionNode::signature(bool values, bool noReturnType) const
Returns true if function \a fn has role \a r for this
property.
*/
-PropertyNode::FunctionRole PropertyNode::role(const FunctionNode* fn) const
+PropertyNode::FunctionRole PropertyNode::role(const FunctionNode *fn) const
{
for (int i=0; i<4; i++) {
- if (functions_[i].contains(const_cast<FunctionNode*>(fn)))
+ if (functions_[i].contains(const_cast<FunctionNode *>(fn)))
return (FunctionRole) i;
}
return Notifier;
@@ -4459,7 +4459,7 @@ bool FunctionNode::hasOverloads() const
The constructor sets the \a parent and the \a name, but
everything else is set to default values.
*/
-PropertyNode::PropertyNode(Aggregate *parent, const QString& name)
+PropertyNode::PropertyNode(Aggregate *parent, const QString &name)
: Node(Property, parent, name),
stored_(FlagValueDefault),
designable_(FlagValueDefault),
@@ -4484,7 +4484,7 @@ PropertyNode::PropertyNode(Aggregate *parent, const QString& name)
We probably should ensure that the constant and final
attributes are not being overridden improperly.
*/
-void PropertyNode::setOverriddenFrom(const PropertyNode* baseProperty)
+void PropertyNode::setOverriddenFrom(const PropertyNode *baseProperty)
{
for (int i = 0; i < NumFunctionRoles; ++i) {
if (functions_[i].isEmpty())
@@ -4561,7 +4561,7 @@ bool PropertyNode::hasAccessFunction(const QString &name) const
}
bool QmlTypeNode::qmlOnly = false;
-QMultiMap<const Node*, Node*> QmlTypeNode::inheritedBy;
+QMultiMap<const Node *, Node *> QmlTypeNode::inheritedBy;
/*!
Constructs a Qml type node or a Js type node depending on
@@ -4569,7 +4569,7 @@ QMultiMap<const Node*, Node*> QmlTypeNode::inheritedBy;
but which can also be Node::JsType. The new node has the
given \a parent and \a name.
*/
-QmlTypeNode::QmlTypeNode(Aggregate *parent, const QString& name, NodeType type)
+QmlTypeNode::QmlTypeNode(Aggregate *parent, const QString &name, NodeType type)
: Aggregate(type, parent, name),
abstract_(false),
cnodeRequired_(false),
@@ -4607,7 +4607,7 @@ void QmlTypeNode::terminate()
Record the fact that QML class \a base is inherited by
QML class \a sub.
*/
-void QmlTypeNode::addInheritedBy(const Node *base, Node* sub)
+void QmlTypeNode::addInheritedBy(const Node *base, Node *sub)
{
if (sub->isInternal())
return;
@@ -4674,9 +4674,9 @@ QString QmlTypeNode::logicalModuleIdentifier() const
/*!
Returns true if this QML type inherits \a type.
*/
-bool QmlTypeNode::inherits(Aggregate* type)
+bool QmlTypeNode::inherits(Aggregate *type)
{
- QmlTypeNode* qtn = qmlBaseNode();
+ QmlTypeNode *qtn = qmlBaseNode();
while (qtn != nullptr) {
if (qtn == type)
return true;
@@ -4691,7 +4691,7 @@ bool QmlTypeNode::inherits(Aggregate* type)
must be either Node::QmlBasicType or Node::JsBasicType.
The new node has the given \a parent and \a name.
*/
-QmlBasicTypeNode::QmlBasicTypeNode(Aggregate *parent, const QString& name, Node::NodeType type)
+QmlBasicTypeNode::QmlBasicTypeNode(Aggregate *parent, const QString &name, Node::NodeType type)
: Aggregate(type, parent, name)
{
setTitle(name);
@@ -4700,9 +4700,9 @@ QmlBasicTypeNode::QmlBasicTypeNode(Aggregate *parent, const QString& name, Node:
/*!
Constructor for the QML property node.
*/
-QmlPropertyNode::QmlPropertyNode(Aggregate* parent,
- const QString& name,
- const QString& type,
+QmlPropertyNode::QmlPropertyNode(Aggregate *parent,
+ const QString &name,
+ const QString &type,
bool attached)
: Node(parent->isJsType() ? JsProperty : QmlProperty, parent, name),
type_(type),
@@ -4736,11 +4736,11 @@ bool QmlPropertyNode::isWritable()
if (readOnly_ != FlagValueDefault)
return !fromFlagValue(readOnly_, false);
- QmlTypeNode* qcn = qmlTypeNode();
+ QmlTypeNode *qcn = qmlTypeNode();
if (qcn) {
if (qcn->cppClassRequired()) {
if (qcn->classNode()) {
- PropertyNode* pn = findCorrespondingCppProperty();
+ PropertyNode *pn = findCorrespondingCppProperty();
if (pn)
return pn->isWritable();
else
@@ -4763,15 +4763,15 @@ bool QmlPropertyNode::isWritable()
Returns a pointer this QML property's corresponding C++
property, if it has one.
*/
-PropertyNode* QmlPropertyNode::findCorrespondingCppProperty()
+PropertyNode *QmlPropertyNode::findCorrespondingCppProperty()
{
- PropertyNode* pn;
- Node* n = parent();
+ PropertyNode *pn;
+ Node *n = parent();
while (n && !(n->isQmlType() || n->isJsType()))
n = n->parent();
if (n) {
- QmlTypeNode* qcn = static_cast<QmlTypeNode*>(n);
- ClassNode* cn = qcn->classNode();
+ QmlTypeNode *qcn = static_cast<QmlTypeNode *>(n);
+ ClassNode *cn = qcn->classNode();
if (cn) {
/*
If there is a dot in the property name, first
@@ -4788,9 +4788,9 @@ PropertyNode* QmlPropertyNode::findCorrespondingCppProperty()
*/
if (dotSplit.size() > 1) {
QStringList path(extractClassName(pn->qualifiedDataType()));
- Node* nn = QDocDatabase::qdocDB()->findClassNode(path);
+ Node *nn = QDocDatabase::qdocDB()->findClassNode(path);
if (nn) {
- ClassNode* cn = static_cast<ClassNode*>(nn);
+ ClassNode *cn = static_cast<ClassNode *>(nn);
PropertyNode *pn2 = cn->findPropertyNode(dotSplit[1]);
/*
If found, return the C++ property
@@ -4873,7 +4873,7 @@ bool CollectionNode::hasMembers() const
Appends \a node to the collection node's member list, if
and only if it isn't already in the member list.
*/
-void CollectionNode::addMember(Node* node)
+void CollectionNode::addMember(Node *node)
{
if (!members_.contains(node))
members_.append(node);
@@ -4923,7 +4923,7 @@ void CollectionNode::getMemberNamespaces(NodeMap& out)
NodeList::const_iterator i = members_.cbegin();
while (i != members_.cend()) {
if ((*i)->isNamespace())
- out.insert((*i)->name(),(*i));
+ out.insert((*i)->name(), (*i));
++i;
}
}
@@ -4938,7 +4938,7 @@ void CollectionNode::getMemberClasses(NodeMap& out) const
NodeList::const_iterator i = members_.cbegin();
while (i != members_.cend()) {
if ((*i)->isClassNode())
- out.insert((*i)->name(),(*i));
+ out.insert((*i)->name(), (*i));
++i;
}
}
@@ -4947,12 +4947,12 @@ void CollectionNode::getMemberClasses(NodeMap& out) const
Prints the collection node's list of members.
For debugging only.
*/
-void CollectionNode::printMembers(const QString& title)
+void CollectionNode::printMembers(const QString &title)
{
qDebug() << title << name() << members_.size();
if (members_.size() > 0) {
for (int i=0; i<members_.size(); ++i) {
- Node* n = members_.at(i);
+ Node *n = members_.at(i);
qDebug() << " MEMBER:" << n->name() << n->nodeTypeString();
}
}
@@ -4967,7 +4967,7 @@ void CollectionNode::printMembers(const QString& title)
numbers should be there, but the minor version number is not
absolutely necessary.
*/
-void CollectionNode::setLogicalModuleInfo(const QString& arg)
+void CollectionNode::setLogicalModuleInfo(const QString &arg)
{
QStringList blankSplit = arg.split(QLatin1Char(' '));
logicalModuleName_ = blankSplit[0];
@@ -4989,7 +4989,7 @@ void CollectionNode::setLogicalModuleInfo(const QString& arg)
numbers should be provided, but the minor version number is
not strictly necessary.
*/
-void CollectionNode::setLogicalModuleInfo(const QStringList& info)
+void CollectionNode::setLogicalModuleInfo(const QStringList &info)
{
logicalModuleName_ = info[0];
if (info.size() > 1) {
@@ -5010,7 +5010,7 @@ void SharedCommentNode::setOverloadFlags()
{
for (Node *n : collective_) {
if (n->isFunction())
- static_cast<FunctionNode*>(n)->setOverloadFlag();
+ static_cast<FunctionNode *>(n)->setOverloadFlag();
}
}
diff --git a/src/qdoc/node.h b/src/qdoc/node.h
index 3d4b9e221..13ed755e9 100644
--- a/src/qdoc/node.h
+++ b/src/qdoc/node.h
@@ -56,17 +56,17 @@ class CollectionNode;
class QmlPropertyNode;
class SharedCommentNode;
-typedef QMap<QString, FunctionNode*> FunctionMap;
-typedef QList<Node*> NodeList;
-typedef QList<ClassNode*> ClassList;
-typedef QVector<Node*> NodeVector;
-typedef QMap<QString, Node*> NodeMap;
+typedef QMap<QString, FunctionNode *> FunctionMap;
+typedef QList<Node *> NodeList;
+typedef QList<ClassNode *> ClassList;
+typedef QVector<Node *> NodeVector;
+typedef QMap<QString, Node *> NodeMap;
typedef QMap<QString, NodeMap> NodeMapMap;
-typedef QMultiMap<QString, Node*> NodeMultiMap;
+typedef QMultiMap<QString, Node *> NodeMultiMap;
typedef QMap<QString, NodeMultiMap> NodeMultiMapMap;
-typedef QMap<QString, CollectionNode*> CNMap;
-typedef QMultiMap<QString, CollectionNode*> CNMultiMap;
-typedef QList<CollectionNode*> CollectionList;
+typedef QMap<QString, CollectionNode *> CNMap;
+typedef QMultiMap<QString, CollectionNode *> CNMultiMap;
+typedef QList<CollectionNode *> CollectionList;
class Node
{
@@ -166,7 +166,7 @@ public:
PageType pageType() const { return pageType_; }
QString pageTypeString() const;
void setPageType(PageType t) { pageType_ = t; }
- void setPageType(const QString& t);
+ void setPageType(const QString &t);
static PageType getPageType(NodeType t);
bool isActive() const { return status_ == Active; }
@@ -234,18 +234,18 @@ public:
virtual bool isWrapper() const;
QString plainName() const;
- QString plainFullName(const Node* relative = nullptr) const;
+ QString plainFullName(const Node *relative = nullptr) const;
QString plainSignature() const;
- QString fullName(const Node* relative = nullptr) const;
+ QString fullName(const Node *relative = nullptr) const;
virtual QString signature(bool , bool ) const { return plainName(); }
- const QString& fileNameBase() const { return fileNameBase_; }
+ const QString &fileNameBase() const { return fileNameBase_; }
bool hasFileNameBase() const { return !fileNameBase_.isEmpty(); }
- void setFileNameBase(const QString& t) { fileNameBase_ = t; }
+ void setFileNameBase(const QString &t) { fileNameBase_ = t; }
void setAccess(Access t) { access_ = t; }
- void setLocation(const Location& t);
- void setDoc(const Doc& doc, bool replace = false);
+ void setLocation(const Location &t);
+ void setDoc(const Doc &doc, bool replace = false);
void setStatus(Status t) {
if (status_ == Obsolete && t == Deprecated)
return;
@@ -254,25 +254,25 @@ public:
void setThreadSafeness(ThreadSafeness t) { safeness_ = t; }
void setSince(const QString &since);
void setPhysicalModuleName(const QString &name) { physicalModuleName_ = name; }
- void setUrl(const QString& url) { url_ = url; }
+ void setUrl(const QString &url) { url_ = url; }
void setTemplateStuff(const QString &t) { templateStuff_ = t; }
void setReconstitutedBrief(const QString &t) { reconstitutedBrief_ = t; }
- void setParent(Aggregate* n) { parent_ = n; }
+ void setParent(Aggregate *n) { parent_ = n; }
void setIndexNodeFlag(bool isIndexNode = true) { indexNodeFlag_ = isIndexNode; }
void setHadDoc() { hadDoc_ = true; }
virtual void setRelatedNonmember(bool b) { relatedNonmember_ = b; }
- virtual void setOutputFileName(const QString& ) { }
- virtual void addMember(Node* ) { }
+ virtual void setOutputFileName(const QString &) { }
+ virtual void addMember(Node *) { }
virtual bool hasMembers() const { return false; }
virtual bool hasNamespaces() const { return false; }
virtual bool hasClasses() const { return false; }
virtual void setAbstract(bool ) { }
virtual void setWrapper() { }
- virtual void getMemberNamespaces(NodeMap& ) { }
- virtual void getMemberClasses(NodeMap& ) const { }
- virtual void setDataType(const QString& ) { }
+ virtual void getMemberNamespaces(NodeMap &) { }
+ virtual void getMemberClasses(NodeMap &) const { }
+ virtual void setDataType(const QString &) { }
virtual bool wasSeen() const { return false; }
- virtual void appendGroupName(const QString& ) { }
+ virtual void appendGroupName(const QString &) { }
virtual QString element() const { return QString(); }
virtual void setNoAutoList(bool ) { }
virtual bool docMustBeGenerated() const { return false; }
@@ -280,35 +280,35 @@ public:
virtual QString title() const { return name(); }
virtual QString subtitle() const { return QString(); }
virtual QString fullTitle() const { return name(); }
- virtual bool setTitle(const QString& ) { return false; }
- virtual bool setSubtitle(const QString& ) { return false; }
+ virtual bool setTitle(const QString &) { return false; }
+ virtual bool setSubtitle(const QString &) { return false; }
void markInternal() { setAccess(Private); setStatus(Internal); }
virtual void markDefault() { }
virtual void markReadOnly(bool ) { }
- bool match(const QList<int>& types) const;
- Aggregate* parent() const { return parent_; }
- const QString& name() const { return name_; }
+ bool match(const QList<int> &types) const;
+ Aggregate *parent() const { return parent_; }
+ const QString &name() const { return name_; }
QString physicalModuleName() const;
QString url() const { return url_; }
virtual QString nameForLists() const { return name_; }
virtual QString outputFileName() const { return QString(); }
virtual QString obsoleteLink() const { return QString(); }
- virtual void setObsoleteLink(const QString& ) { }
- virtual void setQtVariable(const QString& ) { }
+ virtual void setObsoleteLink(const QString &) { }
+ virtual void setQtVariable(const QString &) { }
virtual QString qtVariable() const { return QString(); }
- virtual bool hasTag(const QString& ) const { return false; }
+ virtual bool hasTag(const QString &) const { return false; }
- const QMap<LinkType, QPair<QString,QString> >& links() const { return linkMap_; }
+ const QMap<LinkType, QPair<QString,QString> > &links() const { return linkMap_; }
void setLink(LinkType linkType, const QString &link, const QString &desc);
Access access() const { return access_; }
QString accessString() const;
- const Location& declLocation() const { return declLocation_; }
- const Location& defLocation() const { return defLocation_; }
- const Location& location() const { return (defLocation_.isEmpty() ? declLocation_ : defLocation_); }
- const Doc& doc() const { return doc_; }
+ const Location &declLocation() const { return declLocation_; }
+ const Location &defLocation() const { return defLocation_; }
+ const Location &location() const { return (defLocation_.isEmpty() ? declLocation_ : defLocation_); }
+ const Doc &doc() const { return doc_; }
bool isInAPI() const { return !isPrivate() && !isInternal() && hasDoc(); }
bool hasDoc() const { return (hadDoc_ || !doc_.isEmpty()); }
bool hadDoc() const { return hadDoc_; }
@@ -317,13 +317,13 @@ public:
ThreadSafeness inheritedThreadSafeness() const;
QString since() const { return since_; }
QString templateStuff() const { return templateStuff_; }
- const QString& reconstitutedBrief() const { return reconstitutedBrief_; }
+ const QString &reconstitutedBrief() const { return reconstitutedBrief_; }
QString nodeSubtypeString() const;
- virtual void addPageKeywords(const QString& ) { }
+ virtual void addPageKeywords(const QString &) { }
bool isSharingComment() const { return (sharedCommentNode_ != nullptr); }
bool hasSharedDoc() const;
- void setSharedCommentNode(SharedCommentNode* t);
+ void setSharedCommentNode(SharedCommentNode *t);
//QString guid() const;
QString extractClassName(const QString &string) const;
@@ -332,16 +332,16 @@ public:
virtual QString logicalModuleName() const { return QString(); }
virtual QString logicalModuleVersion() const { return QString(); }
virtual QString logicalModuleIdentifier() const { return QString(); }
- virtual void setLogicalModuleInfo(const QString& ) { }
- virtual void setLogicalModuleInfo(const QStringList& ) { }
- virtual CollectionNode* logicalModule() const { return nullptr; }
- virtual void setQmlModule(CollectionNode* ) { }
- virtual ClassNode* classNode() { return nullptr; }
- virtual void setClassNode(ClassNode* ) { }
- QmlTypeNode* qmlTypeNode();
- ClassNode* declarativeCppNode();
- const QString& outputSubdirectory() const { return outSubDir_; }
- virtual void setOutputSubdirectory(const QString& t) { outSubDir_ = t; }
+ virtual void setLogicalModuleInfo(const QString &) { }
+ virtual void setLogicalModuleInfo(const QStringList &) { }
+ virtual CollectionNode *logicalModule() const { return nullptr; }
+ virtual void setQmlModule(CollectionNode *) { }
+ virtual ClassNode *classNode() { return nullptr; }
+ virtual void setClassNode(ClassNode *) { }
+ QmlTypeNode *qmlTypeNode();
+ ClassNode *declarativeCppNode();
+ const QString &outputSubdirectory() const { return outSubDir_; }
+ virtual void setOutputSubdirectory(const QString &t) { outSubDir_ = t; }
QString fullDocumentName() const;
QString qualifyCppName();
QString qualifyQmlName();
@@ -355,11 +355,11 @@ public:
static QString nodeTypeString(NodeType t);
static QString nodeSubtypeString(unsigned char t);
static void initialize();
- static NodeType goal(const QString& t) { return goals_.value(t); }
+ static NodeType goal(const QString &t) { return goals_.value(t); }
static bool nodeNameLessThan(const Node *first, const Node *second);
protected:
- Node(NodeType type, Aggregate* parent, const QString& name);
+ Node(NodeType type, Aggregate *parent, const QString &name);
private:
NodeType nodeType_;
@@ -372,7 +372,7 @@ private:
bool relatedNonmember_ : 1;
bool hadDoc_ : 1;
- Aggregate* parent_;
+ Aggregate *parent_;
SharedCommentNode *sharedCommentNode_;
QString name_;
Location declLocation_;
@@ -395,11 +395,11 @@ private:
class PageNode : public Node
{
public:
- PageNode(Aggregate* parent, const QString& name) : Node(Page, parent, name),
+ PageNode(Aggregate *parent, const QString &name) : Node(Page, parent, name),
noAutoList_(false) { }
- PageNode(NodeType type, Aggregate* parent, const QString& name) : Node(type, parent, name),
+ PageNode(NodeType type, Aggregate *parent, const QString &name) : Node(type, parent, name),
noAutoList_(false) { }
- PageNode(Aggregate* parent, const QString& name, PageType ptype) : Node(Page, parent, name),
+ PageNode(Aggregate *parent, const QString &name, PageType ptype) : Node(Page, parent, name),
noAutoList_(false) { setPageType(ptype); }
virtual ~PageNode() { }
@@ -409,21 +409,21 @@ public:
QString title() const override { return title_; }
QString subtitle() const override { return subtitle_; }
QString fullTitle() const override;
- bool setTitle(const QString& title) override;
+ bool setTitle(const QString &title) override;
bool setSubtitle(const QString &subtitle) override { subtitle_ = subtitle; return true; }
QString nameForLists() const override { return title(); }
virtual QString imageFileName() const { return QString(); }
- virtual void setImageFileName(const QString& ) { }
+ virtual void setImageFileName(const QString &) { }
bool noAutoList() const { return noAutoList_; }
void setNoAutoList(bool b) override { noAutoList_ = b; }
- const QStringList& groupNames() const { return groupNames_; }
- void appendGroupName(const QString& t) override { groupNames_.append(t); }
+ const QStringList &groupNames() const { return groupNames_; }
+ void appendGroupName(const QString &t) override { groupNames_.append(t); }
- const QStringList& pageKeywords() const { return pageKeywds_; }
- void addPageKeywords(const QString& t) override { pageKeywds_ << t; }
- void setOutputFileName(const QString& f) override { outputFileName_ = f; }
+ const QStringList &pageKeywords() const { return pageKeywds_; }
+ void addPageKeywords(const QString &t) override { pageKeywds_ << t; }
+ void setOutputFileName(const QString &f) override { outputFileName_ = f; }
QString outputFileName() const override { return outputFileName_; }
protected:
@@ -441,7 +441,7 @@ public:
class ExternalPageNode : public PageNode
{
public:
- ExternalPageNode(Aggregate* parent, const QString& name)
+ ExternalPageNode(Aggregate *parent, const QString &name)
: PageNode(Node::ExternalPage, parent, name) {
setPageType(Node::ArticlePage);
}
@@ -450,17 +450,17 @@ public:
class Aggregate : public PageNode
{
public:
- Node* findChildNode(const QString& name, Node::Genus genus, int findFlags = 0) const;
- Node* findNonfunctionChild(const QString& name, bool (Node::*) () const);
- void findChildren(const QString& name, NodeVector& nodes) const;
- FunctionNode* findFunctionChild(const QString& name, const Parameters &parameters);
- FunctionNode* findFunctionChild(const FunctionNode* clone);
+ Node *findChildNode(const QString &name, Node::Genus genus, int findFlags = 0) const;
+ Node *findNonfunctionChild(const QString &name, bool (Node:: *) () const);
+ void findChildren(const QString &name, NodeVector &nodes) const;
+ FunctionNode *findFunctionChild(const QString &name, const Parameters &parameters);
+ FunctionNode *findFunctionChild(const FunctionNode *clone);
void normalizeOverloads();
void markUndocumentedChildrenInternal();
bool isAggregate() const override { return true; }
- const EnumNode* findEnumNodeForValue(const QString &enumValue) const;
+ const EnumNode *findEnumNodeForValue(const QString &enumValue) const;
int count() const { return children_.size(); }
const NodeList &childNodes() const { return children_; }
@@ -473,14 +473,14 @@ public:
const QStringList &includeFiles() const { return includeFiles_; }
QStringList primaryKeys();
- QmlPropertyNode* hasQmlProperty(const QString& ) const;
- QmlPropertyNode* hasQmlProperty(const QString&, bool attached) const;
- virtual QmlTypeNode* qmlBaseNode() const { return nullptr; }
- void addChildByTitle(Node* child, const QString& title);
- void printChildren(const QString& title);
- void addChild(Node* child);
+ QmlPropertyNode *hasQmlProperty(const QString &) const;
+ QmlPropertyNode *hasQmlProperty(const QString &, bool attached) const;
+ virtual QmlTypeNode *qmlBaseNode() const { return nullptr; }
+ void addChildByTitle(Node *child, const QString &title);
+ void printChildren(const QString &title);
+ void addChild(Node *child);
void adoptChild(Node *child);
- void setOutputSubdirectory(const QString& t) override;
+ void setOutputSubdirectory(const QString &t) override;
FunctionMap &functionMap() { return functionMap_; }
void findAllFunctions(NodeMapMap &functionIndex);
@@ -506,7 +506,7 @@ private:
friend class Node;
void addFunction(FunctionNode *fn);
void adoptFunction(FunctionNode *fn);
- static bool isSameSignature(const FunctionNode* f1, const FunctionNode* f2);
+ static bool isSameSignature(const FunctionNode *f1, const FunctionNode *f2);
protected:
NodeList children_;
@@ -534,17 +534,17 @@ class ProxyNode : public Aggregate
class NamespaceNode : public Aggregate
{
public:
- NamespaceNode(Aggregate* parent, const QString& name) : Aggregate(Namespace, parent, name),
+ NamespaceNode(Aggregate *parent, const QString &name) : Aggregate(Namespace, parent, name),
seen_(false), tree_(nullptr), docNode_(nullptr) { }
virtual ~NamespaceNode();
- Tree* tree() const override { return (parent() ? parent()->tree() : tree_); }
+ Tree *tree() const override { return (parent() ? parent()->tree() : tree_); }
bool isFirstClassAggregate() const override { return true; }
bool isRelatableType() const override { return true; }
bool wasSeen() const override { return seen_; }
void markSeen() { seen_ = true; }
void markNotSeen() { seen_ = false; }
- void setTree(Tree* t) { tree_ = t; }
+ void setTree(Tree *t) { tree_ = t; }
const NodeList &includedChildren() const;
void includeChild(Node *child);
QString whereDocumented() const { return whereDocumented_; }
@@ -553,51 +553,51 @@ public:
bool hasDocumentedChildren() const;
void reportDocumentedChildrenInUndocumentedNamespace() const;
bool docMustBeGenerated() const override;
- void setDocNode(NamespaceNode* ns) { docNode_ = ns; }
- NamespaceNode* docNode() const { return docNode_; }
+ void setDocNode(NamespaceNode *ns) { docNode_ = ns; }
+ NamespaceNode *docNode() const { return docNode_; }
private:
- bool seen_;
- Tree* tree_;
- QString whereDocumented_;
- NamespaceNode* docNode_;
- NodeList includedChildren_;
+ bool seen_;
+ Tree *tree_;
+ QString whereDocumented_;
+ NamespaceNode *docNode_;
+ NodeList includedChildren_;
};
struct RelatedClass
{
RelatedClass() { }
// constructor for resolved base class
- RelatedClass(Node::Access access, ClassNode* node)
+ RelatedClass(Node::Access access, ClassNode *node)
: access_(access), node_(node) { }
// constructor for unresolved base class
- RelatedClass(Node::Access access, const QStringList& path, const QString& signature)
+ RelatedClass(Node::Access access, const QStringList &path, const QString &signature)
: access_(access), node_(nullptr), path_(path), signature_(signature) { }
QString accessString() const;
bool isPrivate() const { return (access_ == Node::Private); }
- Node::Access access_;
- ClassNode* node_;
- QStringList path_;
- QString signature_;
+ Node::Access access_;
+ ClassNode *node_;
+ QStringList path_;
+ QString signature_;
};
struct UsingClause
{
UsingClause() { }
- UsingClause(const QString& signature) : node_(nullptr), signature_(signature) { }
- const QString& signature() const { return signature_; }
- const Node* node() { return node_; }
- void setNode(const Node* n) { node_ = n; }
+ UsingClause(const QString &signature) : node_(nullptr), signature_(signature) { }
+ const QString &signature() const { return signature_; }
+ const Node *node() { return node_; }
+ void setNode(const Node *n) { node_ = n; }
- const Node* node_;
+ const Node *node_;
QString signature_;
};
class ClassNode : public Aggregate
{
public:
- ClassNode(NodeType type, Aggregate* parent, const QString& name) : Aggregate(type, parent, name),
+ ClassNode(NodeType type, Aggregate *parent, const QString &name) : Aggregate(type, parent, name),
abstract_(false), wrapper_(false), qmlelement(nullptr) { }
virtual ~ClassNode() { }
bool isFirstClassAggregate() const override { return true; }
@@ -605,38 +605,38 @@ public:
bool isRelatableType() const override { return true; }
bool isWrapper() const override { return wrapper_; }
QString obsoleteLink() const override { return obsoleteLink_; }
- void setObsoleteLink(const QString& t) override { obsoleteLink_ = t; }
+ void setObsoleteLink(const QString &t) override { obsoleteLink_ = t; }
void setWrapper() override { wrapper_ = true; }
- void addResolvedBaseClass(Access access, ClassNode* node);
- void addDerivedClass(Access access, ClassNode* node);
- void addUnresolvedBaseClass(Access access, const QStringList& path, const QString& signature);
- void addUnresolvedUsingClause(const QString& signature);
+ void addResolvedBaseClass(Access access, ClassNode *node);
+ void addDerivedClass(Access access, ClassNode *node);
+ void addUnresolvedBaseClass(Access access, const QStringList &path, const QString &signature);
+ void addUnresolvedUsingClause(const QString &signature);
void removePrivateAndInternalBases();
- void resolvePropertyOverriddenFromPtrs(PropertyNode* pn);
+ void resolvePropertyOverriddenFromPtrs(PropertyNode *pn);
- QList<RelatedClass>& baseClasses() { return bases_; }
- QList<RelatedClass>& derivedClasses() { return derived_; }
- QList<RelatedClass>& ignoredBaseClasses() { return ignoredBases_; }
- QList<UsingClause>& usingClauses() { return usingClauses_; }
+ QList<RelatedClass> &baseClasses() { return bases_; }
+ QList<RelatedClass> &derivedClasses() { return derived_; }
+ QList<RelatedClass> &ignoredBaseClasses() { return ignoredBases_; }
+ QList<UsingClause> &usingClauses() { return usingClauses_; }
const QList<RelatedClass> &baseClasses() const { return bases_; }
const QList<RelatedClass> &derivedClasses() const { return derived_; }
const QList<RelatedClass> &ignoredBaseClasses() const { return ignoredBases_; }
- const QList<UsingClause>& usingClauses() const { return usingClauses_; }
+ const QList<UsingClause> &usingClauses() const { return usingClauses_; }
- QmlTypeNode* qmlElement() { return qmlelement; }
- void setQmlElement(QmlTypeNode* qcn) { qmlelement = qcn; }
+ QmlTypeNode *qmlElement() { return qmlelement; }
+ void setQmlElement(QmlTypeNode *qcn) { qmlelement = qcn; }
bool isAbstract() const override { return abstract_; }
void setAbstract(bool b) override { abstract_ = b; }
- PropertyNode* findPropertyNode(const QString& name);
- QmlTypeNode* findQmlBaseNode();
- FunctionNode* findOverriddenFunction(const FunctionNode* fn);
- PropertyNode* findOverriddenProperty(const FunctionNode* fn);
+ PropertyNode *findPropertyNode(const QString &name);
+ QmlTypeNode *findQmlBaseNode();
+ FunctionNode *findOverriddenFunction(const FunctionNode *fn);
+ PropertyNode *findOverriddenProperty(const FunctionNode *fn);
bool docMustBeGenerated() const override;
private:
- void promotePublicBases(const QList<RelatedClass>& bases);
+ void promotePublicBases(const QList<RelatedClass> &bases);
private:
QList<RelatedClass> bases_;
@@ -646,13 +646,13 @@ private:
bool abstract_;
bool wrapper_;
QString obsoleteLink_;
- QmlTypeNode* qmlelement;
+ QmlTypeNode *qmlelement;
};
class HeaderNode : public Aggregate
{
public:
- HeaderNode(Aggregate* parent, const QString& name);
+ HeaderNode(Aggregate *parent, const QString &name);
virtual ~HeaderNode() { }
bool docMustBeGenerated() const override;
bool isFirstClassAggregate() const override { return true; }
@@ -660,7 +660,7 @@ public:
QString title() const override { return (title_.isEmpty() ? name() : title_); }
QString subtitle() const override { return subtitle_; }
QString fullTitle() const override { return (title_.isEmpty() ? name() : name() + " - " + title_); }
- bool setTitle(const QString& title) override { title_ = title; return true; }
+ bool setTitle(const QString &title) override { title_ = title; return true; }
bool setSubtitle(const QString &subtitle) override { subtitle_ = subtitle; return true; }
QString nameForLists() const override { return title(); }
bool hasDocumentedChildren() const;
@@ -673,13 +673,13 @@ private:
class ExampleNode : public PageNode
{
public:
- ExampleNode(Aggregate* parent, const QString& name)
+ ExampleNode(Aggregate *parent, const QString &name)
: PageNode(Node::Example, parent, name) { }
virtual ~ExampleNode() { }
QString imageFileName() const override { return imageFileName_; }
- void setImageFileName(const QString& ifn) override { imageFileName_ = ifn; }
- const QStringList& files() const { return files_; }
- const QStringList& images() const { return images_; }
+ void setImageFileName(const QString &ifn) override { imageFileName_ = ifn; }
+ const QStringList &files() const { return files_; }
+ const QStringList &images() const { return images_; }
void setFiles(const QStringList files) { files_ = files; }
void setImages(const QStringList images) { images_ = images; }
void appendFile(QString &file) { files_.append(file); }
@@ -697,15 +697,15 @@ struct ImportRec {
QString importId_; // "as" name
QString importUri_; // subdirectory of module directory
- ImportRec(const QString& name,
- const QString& version,
- const QString& importId,
- const QString& importUri)
+ ImportRec(const QString &name,
+ const QString &version,
+ const QString &importId,
+ const QString &importUri)
: name_(name), version_(version), importId_(importId), importUri_(importUri) { }
- QString& name() { return name_; }
- QString& version() { return version_; }
- QString& importId() { return importId_; }
- QString& importUri() { return importUri_; }
+ QString &name() { return name_; }
+ QString &version() { return version_; }
+ QString &importId() { return importId_; }
+ QString &importUri() { return importUri_; }
bool isEmpty() const { return name_.isEmpty(); }
};
@@ -714,14 +714,14 @@ typedef QList<ImportRec> ImportList;
class QmlTypeNode : public Aggregate
{
public:
- QmlTypeNode(Aggregate* parent, const QString& name, NodeType type = QmlType);
+ QmlTypeNode(Aggregate *parent, const QString &name, NodeType type = QmlType);
virtual ~QmlTypeNode();
bool isFirstClassAggregate() const override { return true; }
bool isQtQuickNode() const override {
return (logicalModuleName() == QLatin1String("QtQuick"));
}
- ClassNode* classNode() override { return cnode_; }
- void setClassNode(ClassNode* cn) override { cnode_ = cn; }
+ ClassNode *classNode() override { return cnode_; }
+ void setClassNode(ClassNode *cn) override { cnode_ = cn; }
bool isAbstract() const override { return abstract_; }
bool isWrapper() const override { return wrapper_; }
void setAbstract(bool b) override { abstract_ = b; }
@@ -729,47 +729,47 @@ public:
bool isInternal() const override { return (status() == Internal); }
QString qmlFullBaseName() const override;
QString obsoleteLink() const override { return obsoleteLink_; }
- void setObsoleteLink(const QString& t) override { obsoleteLink_ = t; }
+ void setObsoleteLink(const QString &t) override { obsoleteLink_ = t; }
QString logicalModuleName() const override;
QString logicalModuleVersion() const override;
QString logicalModuleIdentifier() const override;
- CollectionNode* logicalModule() const override { return logicalModule_; }
- void setQmlModule(CollectionNode* t) override { logicalModule_ = t; }
+ CollectionNode *logicalModule() const override { return logicalModule_; }
+ void setQmlModule(CollectionNode *t) override { logicalModule_ = t; }
- const ImportList& importList() const { return importList_; }
- void setImportList(const ImportList& il) { importList_ = il; }
- const QString& qmlBaseName() const { return qmlBaseName_; }
- void setQmlBaseName(const QString& name) { qmlBaseName_ = name; }
+ const ImportList &importList() const { return importList_; }
+ void setImportList(const ImportList &il) { importList_ = il; }
+ const QString &qmlBaseName() const { return qmlBaseName_; }
+ void setQmlBaseName(const QString &name) { qmlBaseName_ = name; }
bool qmlBaseNodeNotSet() const { return (qmlBaseNode_ == nullptr); }
- QmlTypeNode* qmlBaseNode() const override { return qmlBaseNode_; }
- void setQmlBaseNode(QmlTypeNode* b) { qmlBaseNode_ = b; }
+ QmlTypeNode *qmlBaseNode() const override { return qmlBaseNode_; }
+ void setQmlBaseNode(QmlTypeNode *b) { qmlBaseNode_ = b; }
void requireCppClass() { cnodeRequired_ = true; }
bool cppClassRequired() const { return cnodeRequired_; }
- static void addInheritedBy(const Node *base, Node* sub);
- static void subclasses(const Node *base, NodeList& subs);
+ static void addInheritedBy(const Node *base, Node *sub);
+ static void subclasses(const Node *base, NodeList &subs);
static void terminate();
- bool inherits(Aggregate* type);
+ bool inherits(Aggregate *type);
public:
static bool qmlOnly;
- static QMultiMap<const Node*, Node*> inheritedBy;
+ static QMultiMap<const Node *, Node *> inheritedBy;
private:
bool abstract_;
bool cnodeRequired_;
bool wrapper_;
- ClassNode* cnode_;
- QString qmlBaseName_;
- QString obsoleteLink_;
- CollectionNode* logicalModule_;
- QmlTypeNode* qmlBaseNode_;
- ImportList importList_;
+ ClassNode *cnode_;
+ QString qmlBaseName_;
+ QString obsoleteLink_;
+ CollectionNode *logicalModule_;
+ QmlTypeNode *qmlBaseNode_;
+ ImportList importList_;
};
class QmlBasicTypeNode : public Aggregate
{
public:
- QmlBasicTypeNode(Aggregate* parent, const QString& name, NodeType type = QmlBasicType);
+ QmlBasicTypeNode(Aggregate *parent, const QString &name, NodeType type = QmlBasicType);
virtual ~QmlBasicTypeNode() { }
bool isFirstClassAggregate() const override { return true; }
};
@@ -780,12 +780,12 @@ class QmlPropertyNode : public Node
public:
QmlPropertyNode(Aggregate *parent,
- const QString& name,
- const QString& type,
+ const QString &name,
+ const QString &type,
bool attached);
virtual ~QmlPropertyNode() { }
- void setDataType(const QString& dataType) override { type_ = dataType; }
+ void setDataType(const QString &dataType) override { type_ = dataType; }
void setStored(bool stored) { stored_ = toFlagValue(stored); }
void setDesignable(bool designable) { designable_ = toFlagValue(designable); }
@@ -816,7 +816,7 @@ public:
void markReadOnly(bool flag) override { readOnly_ = toFlagValue(flag); }
private:
- PropertyNode* findCorrespondingCppProperty();
+ PropertyNode *findCorrespondingCppProperty();
private:
QString type_;
@@ -832,11 +832,11 @@ class EnumItem
{
public:
EnumItem() { }
- EnumItem(const QString& name, const QString& value)
+ EnumItem(const QString &name, const QString &value)
: name_(name), value_(value) { }
- const QString& name() const { return name_; }
- const QString& value() const { return value_; }
+ const QString &name() const { return name_; }
+ const QString &value() const { return value_; }
private:
QString name_;
@@ -846,48 +846,48 @@ private:
class EnumNode : public Node
{
public:
- EnumNode(Aggregate *parent, const QString& name) : Node(Enum, parent, name), flagsType_(nullptr) { }
+ EnumNode(Aggregate *parent, const QString &name) : Node(Enum, parent, name), flagsType_(nullptr) { }
virtual ~EnumNode() { }
- void addItem(const EnumItem& item);
- void setFlagsType(TypedefNode* typedeff);
+ void addItem(const EnumItem &item);
+ void setFlagsType(TypedefNode *typedeff);
bool hasItem(const QString &name) const { return names_.contains(name); }
- const QList<EnumItem>& items() const { return items_; }
- Access itemAccess(const QString& name) const;
- const TypedefNode* flagsType() const { return flagsType_; }
+ const QList<EnumItem> &items() const { return items_; }
+ Access itemAccess(const QString &name) const;
+ const TypedefNode *flagsType() const { return flagsType_; }
QString itemValue(const QString &name) const;
Node *clone(Aggregate *parent) override;
private:
QList<EnumItem> items_;
QSet<QString> names_;
- const TypedefNode* flagsType_;
+ const TypedefNode *flagsType_;
};
class TypedefNode : public Node
{
public:
- TypedefNode(Aggregate *parent, const QString& name) : Node(Typedef, parent, name),
+ TypedefNode(Aggregate *parent, const QString &name) : Node(Typedef, parent, name),
associatedEnum_(nullptr) { }
virtual ~TypedefNode() { }
bool hasAssociatedEnum() const { return associatedEnum_ != nullptr; }
- const EnumNode* associatedEnum() const { return associatedEnum_; }
+ const EnumNode *associatedEnum() const { return associatedEnum_; }
Node *clone(Aggregate *parent) override;
private:
- void setAssociatedEnum(const EnumNode* t);
+ void setAssociatedEnum(const EnumNode *t);
friend class EnumNode;
- const EnumNode* associatedEnum_;
+ const EnumNode *associatedEnum_;
};
class TypeAliasNode : public TypedefNode
{
public:
- TypeAliasNode(Aggregate *parent, const QString& name, const QString& aliasedType)
+ TypeAliasNode(Aggregate *parent, const QString &name, const QString &aliasedType)
: TypedefNode(parent, name), aliasedType_(aliasedType) { }
virtual ~TypeAliasNode() { }
@@ -898,7 +898,7 @@ private:
QString aliasedType_;
};
-inline void EnumNode::setFlagsType(TypedefNode* t)
+inline void EnumNode::setFlagsType(TypedefNode *t)
{
flagsType_ = t;
t->setAssociatedEnum(this);
@@ -921,14 +921,14 @@ public:
(collective_.at(0)->isQmlProperty() || collective_.at(0)->isJsProperty());
}
int count() const { return collective_.size(); }
- void append(Node* n) { collective_.append(n); }
- const QVector<Node*>& collective() const { return collective_; }
+ void append(Node *n) { collective_.append(n); }
+ const QVector<Node *> &collective() const { return collective_; }
void setOverloadFlags();
void setRelatedNonmember(bool b) override;
Node *clone(Aggregate *parent) override;
private:
- QVector<Node*> collective_;
+ QVector<Node *> collective_;
};
class FunctionNode : public Node
@@ -957,8 +957,8 @@ public:
JsMethod
};
- FunctionNode(Aggregate* parent, const QString &name); // C++ function (Plain)
- FunctionNode(Metaness type, Aggregate* parent, const QString &name, bool attached = false);
+ FunctionNode(Aggregate *parent, const QString &name); // C++ function (Plain)
+ FunctionNode(Metaness type, Aggregate *parent, const QString &name, bool attached = false);
virtual ~FunctionNode() { }
Node *clone(Aggregate *parent) override;
@@ -966,15 +966,15 @@ public:
QString metanessString() const;
bool changeMetaness(Metaness from, Metaness to);
void setMetaness(Metaness t) { metaness_ = t; }
- Metaness setMetaness(const QString& t);
+ Metaness setMetaness(const QString &t);
QString kindString() const;
- static Metaness getMetaness(const QString& t);
- static Metaness getMetanessFromTopic(const QString& t);
+ static Metaness getMetaness(const QString &t);
+ static Metaness getMetanessFromTopic(const QString &t);
static Genus getGenus(Metaness t);
- void setReturnType(const QString& t) { returnType_ = t; }
- void setParentPath(const QStringList& p) { parentPath_ = p; }
- void setVirtualness(const QString& t);
+ void setReturnType(const QString &t) { returnType_ = t; }
+ void setParentPath(const QStringList &p) { parentPath_ = p; }
+ void setVirtualness(const QString &t);
void setVirtualness(Virtualness v) { virtualness_ = v; }
void setVirtual() { virtualness_ = NormalVirtual; }
void setConst(bool b) { const_ = b; }
@@ -982,7 +982,7 @@ public:
void setReimpFlag() { reimpFlag_ = true; }
void setOverridesThis(const QString &path) { overridesThis_ = path; }
- const QString& returnType() const { return returnType_; }
+ const QString &returnType() const { return returnType_; }
QString virtualness() const;
bool isConst() const { return const_; }
bool isStatic() const override { return static_; }
@@ -1027,7 +1027,7 @@ public:
const QString &overridesThis() const { return overridesThis_; }
NodeList &associatedProperties() { return associatedProperties_; }
- const QStringList& parentPath() const { return parentPath_; }
+ const QStringList &parentPath() const { return parentPath_; }
bool hasAssociatedProperties() const { return !associatedProperties_.isEmpty(); }
bool hasOneAssociatedProperty() const { return (associatedProperties_.size() == 1); }
Node *firstAssociatedProperty() const { return associatedProperties_[0]; }
@@ -1058,8 +1058,8 @@ public:
void setInvokable(bool b) { isInvokable_ = b; }
bool isInvokable() const { return isInvokable_; }
- bool hasTag(const QString& t) const override { return (tag_ == t); }
- void setTag(const QString& t) { tag_ = t; }
+ bool hasTag(const QString &t) const override { return (tag_ == t); }
+ void setTag(const QString &t) { tag_ = t; }
const QString &tag() const { return tag_; }
bool compare(const FunctionNode *fn) const;
bool isIgnored() const;
@@ -1074,7 +1074,7 @@ public:
FunctionNode *findPrimaryFunction();
private:
- void addAssociatedProperty(PropertyNode* property);
+ void addAssociatedProperty(PropertyNode *property);
friend class Aggregate;
friend class PropertyNode;
@@ -1107,20 +1107,20 @@ public:
enum FunctionRole { Getter, Setter, Resetter, Notifier };
enum { NumFunctionRoles = Notifier + 1 };
- PropertyNode(Aggregate* parent, const QString& name);
+ PropertyNode(Aggregate *parent, const QString &name);
virtual ~PropertyNode() { }
- void setDataType(const QString& dataType) override { type_ = dataType; }
- void addFunction(FunctionNode* function, FunctionRole role);
- void addSignal(FunctionNode* function, FunctionRole role);
+ void setDataType(const QString &dataType) override { type_ = dataType; }
+ void addFunction(FunctionNode *function, FunctionRole role);
+ void addSignal(FunctionNode *function, FunctionRole role);
void setStored(bool stored) { stored_ = toFlagValue(stored); }
void setDesignable(bool designable) { designable_ = toFlagValue(designable); }
void setScriptable(bool scriptable) { scriptable_ = toFlagValue(scriptable); }
void setWritable(bool writable) { writable_ = toFlagValue(writable); }
void setUser(bool user) { user_ = toFlagValue(user); }
- void setOverriddenFrom(const PropertyNode* baseProperty);
- void setRuntimeDesFunc(const QString& rdf) { runtimeDesFunc_ = rdf; }
- void setRuntimeScrFunc(const QString& scrf) { runtimeScrFunc_ = scrf; }
+ void setOverriddenFrom(const PropertyNode *baseProperty);
+ void setRuntimeDesFunc(const QString &rdf) { runtimeDesFunc_ = rdf; }
+ void setRuntimeScrFunc(const QString &scrf) { runtimeScrFunc_ = scrf; }
void setConstant() { const_ = true; }
void setFinal() { final_ = true; }
void setRevision(int revision) { revision_ = revision; }
@@ -1134,17 +1134,17 @@ public:
const NodeList &resetters() const { return functions(Resetter); }
const NodeList &notifiers() const { return functions(Notifier); }
bool hasAccessFunction(const QString &name) const;
- FunctionRole role(const FunctionNode* fn) const;
+ FunctionRole role(const FunctionNode *fn) const;
bool isStored() const { return fromFlagValue(stored_, storedDefault()); }
bool isDesignable() const { return fromFlagValue(designable_, designableDefault()); }
bool isScriptable() const { return fromFlagValue(scriptable_, scriptableDefault()); }
- const QString& runtimeDesignabilityFunction() const { return runtimeDesFunc_; }
- const QString& runtimeScriptabilityFunction() const { return runtimeScrFunc_; }
+ const QString &runtimeDesignabilityFunction() const { return runtimeDesFunc_; }
+ const QString &runtimeScriptabilityFunction() const { return runtimeScrFunc_; }
bool isWritable() const { return fromFlagValue(writable_, writableDefault()); }
bool isUser() const { return fromFlagValue(user_, userDefault()); }
bool isConstant() const { return const_; }
bool isFinal() const { return final_; }
- const PropertyNode* overriddenFrom() const { return overrides_; }
+ const PropertyNode *overriddenFrom() const { return overrides_; }
bool storedDefault() const { return true; }
bool userDefault() const { return false; }
@@ -1165,16 +1165,16 @@ private:
bool const_;
bool final_;
int revision_;
- const PropertyNode* overrides_;
+ const PropertyNode *overrides_;
};
-inline void PropertyNode::addFunction(FunctionNode* function, FunctionRole role)
+inline void PropertyNode::addFunction(FunctionNode *function, FunctionRole role)
{
functions_[(int)role].append(function);
function->addAssociatedProperty(this);
}
-inline void PropertyNode::addSignal(FunctionNode* function, FunctionRole role)
+inline void PropertyNode::addSignal(FunctionNode *function, FunctionRole role)
{
functions_[(int)role].append(function);
function->addAssociatedProperty(this);
@@ -1191,7 +1191,7 @@ inline NodeList PropertyNode::functions() const
class VariableNode : public Node
{
public:
- VariableNode(Aggregate* parent, const QString &name);
+ VariableNode(Aggregate *parent, const QString &name);
virtual ~VariableNode() { }
void setLeftType(const QString &leftType) { leftType_ = leftType; }
@@ -1210,7 +1210,7 @@ private:
bool static_;
};
-inline VariableNode::VariableNode(Aggregate* parent, const QString &name)
+inline VariableNode::VariableNode(Aggregate *parent, const QString &name)
: Node(Variable, parent, name), static_(false)
{
setGenus(Node::CPP);
@@ -1219,19 +1219,19 @@ inline VariableNode::VariableNode(Aggregate* parent, const QString &name)
class CollectionNode : public PageNode
{
public:
- CollectionNode(NodeType type, Aggregate* parent, const QString& name)
+ CollectionNode(NodeType type, Aggregate *parent, const QString &name)
: PageNode(type, parent, name), seen_(false) { }
virtual ~CollectionNode() { }
bool isCollectionNode() const override { return true; }
QString qtVariable() const override { return qtVariable_; }
- void setQtVariable(const QString& v) override { qtVariable_ = v; }
- void addMember(Node* node) override;
+ void setQtVariable(const QString &v) override { qtVariable_ = v; }
+ void addMember(Node *node) override;
bool hasMembers() const override;
bool hasNamespaces() const override;
bool hasClasses() const override;
- void getMemberNamespaces(NodeMap& out) override;
- void getMemberClasses(NodeMap& out) const override;
+ void getMemberNamespaces(NodeMap &out) override;
+ void getMemberClasses(NodeMap &out) const override;
bool wasSeen() const override { return seen_; }
QString fullTitle() const override { return title(); }
@@ -1242,22 +1242,22 @@ public:
QString logicalModuleIdentifier() const override {
return logicalModuleName_ + logicalModuleVersionMajor_;
}
- void setLogicalModuleInfo(const QString& arg) override;
- void setLogicalModuleInfo(const QStringList& info) override;
+ void setLogicalModuleInfo(const QString &arg) override;
+ void setLogicalModuleInfo(const QStringList &info) override;
- const NodeList& members() const { return members_; }
- void printMembers(const QString& title);
+ const NodeList &members() const { return members_; }
+ void printMembers(const QString &title);
void markSeen() { seen_ = true; }
void markNotSeen() { seen_ = false; }
private:
- bool seen_;
- NodeList members_;
- QString logicalModuleName_;
- QString logicalModuleVersionMajor_;
- QString logicalModuleVersionMinor_;
- QString qtVariable_;
+ bool seen_;
+ NodeList members_;
+ QString logicalModuleName_;
+ QString logicalModuleVersionMajor_;
+ QString logicalModuleVersionMinor_;
+ QString qtVariable_;
};
QT_END_NAMESPACE
diff --git a/src/qdoc/openedlist.cpp b/src/qdoc/openedlist.cpp
index 59f7745a5..ce9efb06e 100644
--- a/src/qdoc/openedlist.cpp
+++ b/src/qdoc/openedlist.cpp
@@ -40,43 +40,43 @@ QT_BEGIN_NAMESPACE
static const char roman[] = "m\2d\5c\2l\5x\2v\5i";
-OpenedList::OpenedList( ListStyle style )
- : sty( style ), ini( 1 ), nex( 0 )
+OpenedList::OpenedList(ListStyle style)
+ : sty(style), ini(1), nex(0)
{
}
-OpenedList::OpenedList( const Location& location, const QString& hint )
- : sty( Bullet ), ini( 1 )
+OpenedList::OpenedList(const Location &location, const QString &hint)
+ : sty(Bullet), ini(1)
{
- QRegExp hintSyntax( "(\\W*)([0-9]+|[A-Z]+|[a-z]+)(\\W*)" );
+ QRegExp hintSyntax("(\\W*)([0-9]+|[A-Z]+|[a-z]+)(\\W*)");
- if ( hintSyntax.exactMatch(hint) ) {
+ if (hintSyntax.exactMatch(hint)) {
bool ok;
- int asNumeric = hint.toInt( &ok );
- int asRoman = fromRoman( hintSyntax.cap(2) );
- int asAlpha = fromAlpha( hintSyntax.cap(2) );
+ int asNumeric = hint.toInt(&ok);
+ int asRoman = fromRoman(hintSyntax.cap(2));
+ int asAlpha = fromAlpha(hintSyntax.cap(2));
- if ( ok ) {
+ if (ok) {
sty = Numeric;
ini = asNumeric;
- } else if ( asRoman > 0 && asRoman != 100 && asRoman != 500 ) {
- sty = ( hint == hint.toLower() ) ? LowerRoman : UpperRoman;
+ } else if (asRoman > 0 && asRoman != 100 && asRoman != 500) {
+ sty = (hint == hint.toLower()) ? LowerRoman : UpperRoman;
ini = asRoman;
} else {
- sty = ( hint == hint.toLower() ) ? LowerAlpha : UpperAlpha;
+ sty = (hint == hint.toLower()) ? LowerAlpha : UpperAlpha;
ini = asAlpha;
}
- pref = hintSyntax.cap( 1 );
- suff = hintSyntax.cap( 3 );
- } else if ( !hint.isEmpty() ) {
- location.warning( tr("Unrecognized list style '%1'").arg(hint) );
+ pref = hintSyntax.cap(1);
+ suff = hintSyntax.cap(3);
+ } else if (!hint.isEmpty()) {
+ location.warning(tr("Unrecognized list style '%1'").arg(hint));
}
nex = ini - 1;
}
QString OpenedList::styleString() const
{
- switch ( style() ) {
+ switch (style()) {
case Bullet:
default:
return ATOM_LIST_BULLET;
@@ -99,7 +99,7 @@ QString OpenedList::styleString() const
QString OpenedList::numberString() const
{
- return QString::number( number() );
+ return QString::number(number());
/*
switch ( style() ) {
case Numeric:
@@ -118,26 +118,26 @@ QString OpenedList::numberString() const
}*/
}
-QString OpenedList::toAlpha( int n )
+QString OpenedList::toAlpha(int n)
{
QString str;
- while ( n > 0 ) {
+ while (n > 0) {
n--;
- str.prepend( (n % 26) + 'a' );
+ str.prepend((n % 26) + 'a');
n /= 26;
}
return str;
}
-int OpenedList::fromAlpha( const QString& str )
+int OpenedList::fromAlpha(const QString &str)
{
int n = 0;
int u;
- for ( int i = 0; i < (int) str.length(); i++ ) {
+ for (int i = 0; i < (int) str.length(); i++) {
u = str[i].toLower().unicode();
- if ( u >= 'a' && u <= 'z' ) {
+ if (u >= 'a' && u <= 'z') {
n *= 26;
n += u - 'a' + 1;
} else {
@@ -147,7 +147,7 @@ int OpenedList::fromAlpha( const QString& str )
return n;
}
-QString OpenedList::toRoman( int n )
+QString OpenedList::toRoman(int n)
{
/*
See p. 30 of Donald E. Knuth's "TeX: The Program".
@@ -158,22 +158,22 @@ QString OpenedList::toRoman( int n )
int u;
int v = 1000;
- for ( ;; ) {
- while ( n >= v ) {
+ for (;;) {
+ while (n >= v) {
str += roman[j];
n -= v;
}
- if ( n <= 0 )
+ if (n <= 0)
break;
k = j + 2;
u = v / roman[k - 1];
- if ( roman[k - 1] == 2 ) {
+ if (roman[k - 1] == 2) {
k += 2;
u /= 5;
}
- if ( n + u >= v ) {
+ if (n + u >= v) {
str += roman[k];
n += u;
} else {
@@ -184,21 +184,21 @@ QString OpenedList::toRoman( int n )
return str;
}
-int OpenedList::fromRoman( const QString& str )
+int OpenedList::fromRoman(const QString &str)
{
int n = 0;
int j;
int u;
int v = 0;
- for ( int i = str.length() - 1; i >= 0; i-- ) {
+ for (int i = str.length() - 1; i >= 0; i--) {
j = 0;
u = 1000;
- while ( roman[j] != 'i' && roman[j] != str[i].toLower() ) {
+ while (roman[j] != 'i' && roman[j] != str[i].toLower()) {
j += 2;
u /= roman[j - 1];
}
- if ( u < v ) {
+ if (u < v) {
n -= u;
} else {
n += u;
@@ -206,7 +206,7 @@ int OpenedList::fromRoman( const QString& str )
v = u;
}
- if ( str.toLower() == toRoman(n) ) {
+ if (str.toLower() == toRoman(n)) {
return n;
} else {
return 0;
diff --git a/src/qdoc/openedlist.h b/src/qdoc/openedlist.h
index 6d7b8e062..6c4cea6c0 100644
--- a/src/qdoc/openedlist.h
+++ b/src/qdoc/openedlist.h
@@ -48,9 +48,9 @@ public:
UpperRoman, LowerRoman };
OpenedList()
- : sty( Bullet ), ini( 1 ), nex( 0 ) { }
- OpenedList( ListStyle style );
- OpenedList( const Location& location, const QString& hint );
+ : sty(Bullet), ini(1), nex(0) { }
+ OpenedList(ListStyle style);
+ OpenedList(const Location &location, const QString &hint);
void next() { nex++; }
@@ -63,10 +63,10 @@ public:
QString suffix() const { return suff; }
private:
- static QString toAlpha( int n );
- static int fromAlpha( const QString& str );
- static QString toRoman( int n );
- static int fromRoman( const QString& str );
+ static QString toAlpha(int n);
+ static int fromAlpha(const QString &str);
+ static QString toRoman(int n);
+ static int fromRoman(const QString &str);
ListStyle sty;
int ini;
diff --git a/src/qdoc/puredocparser.cpp b/src/qdoc/puredocparser.cpp
index fe20f4ac6..6ba46a20e 100644
--- a/src/qdoc/puredocparser.cpp
+++ b/src/qdoc/puredocparser.cpp
@@ -52,7 +52,7 @@ QStringList PureDocParser::sourceFileNameFilter()
parsed contents to the database. The \a location is used for
reporting errors.
*/
-void PureDocParser::parseSourceFile(const Location& location, const QString& filePath)
+void PureDocParser::parseSourceFile(const Location &location, const QString &filePath)
{
QFile in(filePath);
currentFile_ = filePath;
@@ -85,7 +85,7 @@ void PureDocParser::parseSourceFile(const Location& location, const QString& fil
*/
bool PureDocParser::processQdocComments()
{
- const QSet<QString>& commands = topicCommands() + metaCommands();
+ const QSet<QString> &commands = topicCommands() + metaCommands();
while (tok_ != Tok_Eoi) {
if (tok_ == Tok_Doc) {
@@ -98,7 +98,7 @@ bool PureDocParser::processQdocComments()
// Doc constructor parses the comment.
Doc doc(start_loc, end_loc, comment, commands, topicCommands());
- const TopicList& topics = doc.topicsUsed();
+ const TopicList &topics = doc.topicsUsed();
if (topics.isEmpty()) {
doc.location().warning(tr("This qdoc comment contains no topic command "
"(e.g., '\\%1', '\\%2').")
diff --git a/src/qdoc/puredocparser.h b/src/qdoc/puredocparser.h
index 4e6a16a48..ef6e5d13f 100644
--- a/src/qdoc/puredocparser.h
+++ b/src/qdoc/puredocparser.h
@@ -44,7 +44,7 @@ public:
virtual ~PureDocParser() { pureParser_ = nullptr; }
QStringList sourceFileNameFilter() override;
- void parseSourceFile(const Location& location, const QString& filePath) override;
+ void parseSourceFile(const Location &location, const QString &filePath) override;
static PureDocParser *pureDocParser() { return pureParser_; }
diff --git a/src/qdoc/qdocdatabase.cpp b/src/qdoc/qdocdatabase.cpp
index 5c4972530..70e192eb2 100644
--- a/src/qdoc/qdocdatabase.cpp
+++ b/src/qdoc/qdocdatabase.cpp
@@ -186,7 +186,7 @@ void QDocForest::setSearchOrder(QStringList &t)
moduleNames_.append(primaryName);
forest_.remove(primaryName);
- QMap<QString, Tree*>::iterator i;
+ QMap<QString, Tree *>::iterator i;
foreach (const QString &m, t) {
if (primaryName != m) {
i = forest_.find(m);
@@ -259,7 +259,7 @@ void QDocForest::setSearchOrder(QStringList &t)
ordering required in this temporary search order is that
the current tree must be searched first.
*/
-const QVector<Tree*> &QDocForest::searchOrder()
+const QVector<Tree *> &QDocForest::searchOrder()
{
if (searchOrder_.isEmpty())
return indexSearchOrder();
@@ -281,7 +281,7 @@ const QVector<Tree*> &QDocForest::searchOrder()
one being read now. That one is prepended to the front of
the vector.
*/
-const QVector<Tree*> &QDocForest::indexSearchOrder()
+const QVector<Tree *> &QDocForest::indexSearchOrder()
{
if (forest_.size() > indexSearchOrder_.size())
indexSearchOrder_.prepend(primaryTree_);
@@ -437,8 +437,8 @@ NodeMultiMap QDocDatabase::cppClasses_;
NodeMultiMap QDocDatabase::qmlBasicTypes_;
NodeMultiMap QDocDatabase::qmlTypes_;
NodeMultiMap QDocDatabase::examples_;
-NodeMapMap QDocDatabase::newClassMaps_;
-NodeMapMap QDocDatabase::newQmlTypeMaps_;
+NodeMapMap QDocDatabase::newClassMaps_;
+NodeMapMap QDocDatabase::newQmlTypeMaps_;
NodeMultiMapMap QDocDatabase::newSinceMaps_;
/*!
@@ -516,139 +516,139 @@ void QDocDatabase::destroyQdocDB()
void QDocDatabase::initializeDB()
{
Node::initialize();
- typeNodeMap_.insert( "accepted", nullptr);
- typeNodeMap_.insert( "actionPerformed", nullptr);
- typeNodeMap_.insert( "activated", nullptr);
- typeNodeMap_.insert( "alias", nullptr);
- typeNodeMap_.insert( "anchors", nullptr);
- typeNodeMap_.insert( "any", nullptr);
- typeNodeMap_.insert( "array", nullptr);
- typeNodeMap_.insert( "autoSearch", nullptr);
- typeNodeMap_.insert( "axis", nullptr);
- typeNodeMap_.insert( "backClicked", nullptr);
- typeNodeMap_.insert( "boomTime", nullptr);
- typeNodeMap_.insert( "border", nullptr);
- typeNodeMap_.insert( "buttonClicked", nullptr);
- typeNodeMap_.insert( "callback", nullptr);
- typeNodeMap_.insert( "char", nullptr);
- typeNodeMap_.insert( "clicked", nullptr);
- typeNodeMap_.insert( "close", nullptr);
- typeNodeMap_.insert( "closed", nullptr);
- typeNodeMap_.insert( "cond", nullptr);
- typeNodeMap_.insert( "data", nullptr);
- typeNodeMap_.insert( "dataReady", nullptr);
- typeNodeMap_.insert( "dateString", nullptr);
- typeNodeMap_.insert( "dateTimeString", nullptr);
- typeNodeMap_.insert( "datetime", nullptr);
- typeNodeMap_.insert( "day", nullptr);
- typeNodeMap_.insert( "deactivated", nullptr);
- typeNodeMap_.insert( "drag", nullptr);
- typeNodeMap_.insert( "easing", nullptr);
- typeNodeMap_.insert( "error", nullptr);
- typeNodeMap_.insert( "exposure", nullptr);
- typeNodeMap_.insert( "fatalError", nullptr);
- typeNodeMap_.insert( "fileSelected", nullptr);
- typeNodeMap_.insert( "flags", nullptr);
- typeNodeMap_.insert( "float", nullptr);
- typeNodeMap_.insert( "focus", nullptr);
- typeNodeMap_.insert( "focusZone", nullptr);
- typeNodeMap_.insert( "format", nullptr);
- typeNodeMap_.insert( "framePainted", nullptr);
- typeNodeMap_.insert( "from", nullptr);
- typeNodeMap_.insert( "frontClicked", nullptr);
- typeNodeMap_.insert( "function", nullptr);
- typeNodeMap_.insert( "hasOpened", nullptr);
- typeNodeMap_.insert( "hovered", nullptr);
- typeNodeMap_.insert( "hoveredTitle", nullptr);
- typeNodeMap_.insert( "hoveredUrl", nullptr);
- typeNodeMap_.insert( "imageCapture", nullptr);
- typeNodeMap_.insert( "imageProcessing", nullptr);
- typeNodeMap_.insert( "index", nullptr);
- typeNodeMap_.insert( "initialized", nullptr);
- typeNodeMap_.insert( "isLoaded", nullptr);
- typeNodeMap_.insert( "item", nullptr);
- typeNodeMap_.insert( "jsdict", nullptr);
- typeNodeMap_.insert( "jsobject", nullptr);
- typeNodeMap_.insert( "key", nullptr);
- typeNodeMap_.insert( "keysequence", nullptr);
- typeNodeMap_.insert( "listViewClicked", nullptr);
- typeNodeMap_.insert( "loadRequest", nullptr);
- typeNodeMap_.insert( "locale", nullptr);
- typeNodeMap_.insert( "location", nullptr);
- typeNodeMap_.insert( "long", nullptr);
- typeNodeMap_.insert( "message", nullptr);
- typeNodeMap_.insert( "messageReceived", nullptr);
- typeNodeMap_.insert( "mode", nullptr);
- typeNodeMap_.insert( "month", nullptr);
- typeNodeMap_.insert( "name", nullptr);
- typeNodeMap_.insert( "number", nullptr);
- typeNodeMap_.insert( "object", nullptr);
- typeNodeMap_.insert( "offset", nullptr);
- typeNodeMap_.insert( "ok", nullptr);
- typeNodeMap_.insert( "openCamera", nullptr);
- typeNodeMap_.insert( "openImage", nullptr);
- typeNodeMap_.insert( "openVideo", nullptr);
- typeNodeMap_.insert( "padding", nullptr);
- typeNodeMap_.insert( "parent", nullptr);
- typeNodeMap_.insert( "path", nullptr);
- typeNodeMap_.insert( "photoModeSelected", nullptr);
- typeNodeMap_.insert( "position", nullptr);
- typeNodeMap_.insert( "precision", nullptr);
- typeNodeMap_.insert( "presetClicked", nullptr);
- typeNodeMap_.insert( "preview", nullptr);
- typeNodeMap_.insert( "previewSelected", nullptr);
- typeNodeMap_.insert( "progress", nullptr);
- typeNodeMap_.insert( "puzzleLost", nullptr);
- typeNodeMap_.insert( "qmlSignal", nullptr);
- typeNodeMap_.insert( "rectangle", nullptr);
- typeNodeMap_.insert( "request", nullptr);
- typeNodeMap_.insert( "requestId", nullptr);
- typeNodeMap_.insert( "section", nullptr);
- typeNodeMap_.insert( "selected", nullptr);
- typeNodeMap_.insert( "send", nullptr);
- typeNodeMap_.insert( "settingsClicked", nullptr);
- typeNodeMap_.insert( "shoe", nullptr);
- typeNodeMap_.insert( "short", nullptr);
- typeNodeMap_.insert( "signed", nullptr);
- typeNodeMap_.insert( "sizeChanged", nullptr);
- typeNodeMap_.insert( "size_t", nullptr);
- typeNodeMap_.insert( "sockaddr", nullptr);
- typeNodeMap_.insert( "someOtherSignal", nullptr);
- typeNodeMap_.insert( "sourceSize", nullptr);
- typeNodeMap_.insert( "startButtonClicked", nullptr);
- typeNodeMap_.insert( "state", nullptr);
- typeNodeMap_.insert( "std::initializer_list", nullptr);
- typeNodeMap_.insert( "std::list", nullptr);
- typeNodeMap_.insert( "std::map", nullptr);
- typeNodeMap_.insert( "std::pair", nullptr);
- typeNodeMap_.insert( "std::string", nullptr);
- typeNodeMap_.insert( "std::vector", nullptr);
- typeNodeMap_.insert( "stringlist", nullptr);
- typeNodeMap_.insert( "swapPlayers", nullptr);
- typeNodeMap_.insert( "symbol", nullptr);
- typeNodeMap_.insert( "t", nullptr);
- typeNodeMap_.insert( "T", nullptr);
- typeNodeMap_.insert( "tagChanged", nullptr);
- typeNodeMap_.insert( "timeString", nullptr);
- typeNodeMap_.insert( "timeout", nullptr);
- typeNodeMap_.insert( "to", nullptr);
- typeNodeMap_.insert( "toggled", nullptr);
- typeNodeMap_.insert( "type", nullptr);
- typeNodeMap_.insert( "unsigned", nullptr);
- typeNodeMap_.insert( "urllist", nullptr);
- typeNodeMap_.insert( "va_list", nullptr);
- typeNodeMap_.insert( "value", nullptr);
- typeNodeMap_.insert( "valueEmitted", nullptr);
- typeNodeMap_.insert( "videoFramePainted", nullptr);
- typeNodeMap_.insert( "videoModeSelected", nullptr);
- typeNodeMap_.insert( "videoRecorder", nullptr);
- typeNodeMap_.insert( "void", nullptr);
- typeNodeMap_.insert( "volatile", nullptr);
- typeNodeMap_.insert( "wchar_t", nullptr);
- typeNodeMap_.insert( "x", nullptr);
- typeNodeMap_.insert( "y", nullptr);
- typeNodeMap_.insert( "zoom", nullptr);
- typeNodeMap_.insert( "zoomTo", nullptr);
+ typeNodeMap_.insert("accepted", nullptr);
+ typeNodeMap_.insert("actionPerformed", nullptr);
+ typeNodeMap_.insert("activated", nullptr);
+ typeNodeMap_.insert("alias", nullptr);
+ typeNodeMap_.insert("anchors", nullptr);
+ typeNodeMap_.insert("any", nullptr);
+ typeNodeMap_.insert("array", nullptr);
+ typeNodeMap_.insert("autoSearch", nullptr);
+ typeNodeMap_.insert("axis", nullptr);
+ typeNodeMap_.insert("backClicked", nullptr);
+ typeNodeMap_.insert("boomTime", nullptr);
+ typeNodeMap_.insert("border", nullptr);
+ typeNodeMap_.insert("buttonClicked", nullptr);
+ typeNodeMap_.insert("callback", nullptr);
+ typeNodeMap_.insert("char", nullptr);
+ typeNodeMap_.insert("clicked", nullptr);
+ typeNodeMap_.insert("close", nullptr);
+ typeNodeMap_.insert("closed", nullptr);
+ typeNodeMap_.insert("cond", nullptr);
+ typeNodeMap_.insert("data", nullptr);
+ typeNodeMap_.insert("dataReady", nullptr);
+ typeNodeMap_.insert("dateString", nullptr);
+ typeNodeMap_.insert("dateTimeString", nullptr);
+ typeNodeMap_.insert("datetime", nullptr);
+ typeNodeMap_.insert("day", nullptr);
+ typeNodeMap_.insert("deactivated", nullptr);
+ typeNodeMap_.insert("drag", nullptr);
+ typeNodeMap_.insert("easing", nullptr);
+ typeNodeMap_.insert("error", nullptr);
+ typeNodeMap_.insert("exposure", nullptr);
+ typeNodeMap_.insert("fatalError", nullptr);
+ typeNodeMap_.insert("fileSelected", nullptr);
+ typeNodeMap_.insert("flags", nullptr);
+ typeNodeMap_.insert("float", nullptr);
+ typeNodeMap_.insert("focus", nullptr);
+ typeNodeMap_.insert("focusZone", nullptr);
+ typeNodeMap_.insert("format", nullptr);
+ typeNodeMap_.insert("framePainted", nullptr);
+ typeNodeMap_.insert("from", nullptr);
+ typeNodeMap_.insert("frontClicked", nullptr);
+ typeNodeMap_.insert("function", nullptr);
+ typeNodeMap_.insert("hasOpened", nullptr);
+ typeNodeMap_.insert("hovered", nullptr);
+ typeNodeMap_.insert("hoveredTitle", nullptr);
+ typeNodeMap_.insert("hoveredUrl", nullptr);
+ typeNodeMap_.insert("imageCapture", nullptr);
+ typeNodeMap_.insert("imageProcessing", nullptr);
+ typeNodeMap_.insert("index", nullptr);
+ typeNodeMap_.insert("initialized", nullptr);
+ typeNodeMap_.insert("isLoaded", nullptr);
+ typeNodeMap_.insert("item", nullptr);
+ typeNodeMap_.insert("jsdict", nullptr);
+ typeNodeMap_.insert("jsobject", nullptr);
+ typeNodeMap_.insert("key", nullptr);
+ typeNodeMap_.insert("keysequence", nullptr);
+ typeNodeMap_.insert("listViewClicked", nullptr);
+ typeNodeMap_.insert("loadRequest", nullptr);
+ typeNodeMap_.insert("locale", nullptr);
+ typeNodeMap_.insert("location", nullptr);
+ typeNodeMap_.insert("long", nullptr);
+ typeNodeMap_.insert("message", nullptr);
+ typeNodeMap_.insert("messageReceived", nullptr);
+ typeNodeMap_.insert("mode", nullptr);
+ typeNodeMap_.insert("month", nullptr);
+ typeNodeMap_.insert("name", nullptr);
+ typeNodeMap_.insert("number", nullptr);
+ typeNodeMap_.insert("object", nullptr);
+ typeNodeMap_.insert("offset", nullptr);
+ typeNodeMap_.insert("ok", nullptr);
+ typeNodeMap_.insert("openCamera", nullptr);
+ typeNodeMap_.insert("openImage", nullptr);
+ typeNodeMap_.insert("openVideo", nullptr);
+ typeNodeMap_.insert("padding", nullptr);
+ typeNodeMap_.insert("parent", nullptr);
+ typeNodeMap_.insert("path", nullptr);
+ typeNodeMap_.insert("photoModeSelected", nullptr);
+ typeNodeMap_.insert("position", nullptr);
+ typeNodeMap_.insert("precision", nullptr);
+ typeNodeMap_.insert("presetClicked", nullptr);
+ typeNodeMap_.insert("preview", nullptr);
+ typeNodeMap_.insert("previewSelected", nullptr);
+ typeNodeMap_.insert("progress", nullptr);
+ typeNodeMap_.insert("puzzleLost", nullptr);
+ typeNodeMap_.insert("qmlSignal", nullptr);
+ typeNodeMap_.insert("rectangle", nullptr);
+ typeNodeMap_.insert("request", nullptr);
+ typeNodeMap_.insert("requestId", nullptr);
+ typeNodeMap_.insert("section", nullptr);
+ typeNodeMap_.insert("selected", nullptr);
+ typeNodeMap_.insert("send", nullptr);
+ typeNodeMap_.insert("settingsClicked", nullptr);
+ typeNodeMap_.insert("shoe", nullptr);
+ typeNodeMap_.insert("short", nullptr);
+ typeNodeMap_.insert("signed", nullptr);
+ typeNodeMap_.insert("sizeChanged", nullptr);
+ typeNodeMap_.insert("size_t", nullptr);
+ typeNodeMap_.insert("sockaddr", nullptr);
+ typeNodeMap_.insert("someOtherSignal", nullptr);
+ typeNodeMap_.insert("sourceSize", nullptr);
+ typeNodeMap_.insert("startButtonClicked", nullptr);
+ typeNodeMap_.insert("state", nullptr);
+ typeNodeMap_.insert("std::initializer_list", nullptr);
+ typeNodeMap_.insert("std::list", nullptr);
+ typeNodeMap_.insert("std::map", nullptr);
+ typeNodeMap_.insert("std::pair", nullptr);
+ typeNodeMap_.insert("std::string", nullptr);
+ typeNodeMap_.insert("std::vector", nullptr);
+ typeNodeMap_.insert("stringlist", nullptr);
+ typeNodeMap_.insert("swapPlayers", nullptr);
+ typeNodeMap_.insert("symbol", nullptr);
+ typeNodeMap_.insert("t", nullptr);
+ typeNodeMap_.insert("T", nullptr);
+ typeNodeMap_.insert("tagChanged", nullptr);
+ typeNodeMap_.insert("timeString", nullptr);
+ typeNodeMap_.insert("timeout", nullptr);
+ typeNodeMap_.insert("to", nullptr);
+ typeNodeMap_.insert("toggled", nullptr);
+ typeNodeMap_.insert("type", nullptr);
+ typeNodeMap_.insert("unsigned", nullptr);
+ typeNodeMap_.insert("urllist", nullptr);
+ typeNodeMap_.insert("va_list", nullptr);
+ typeNodeMap_.insert("value", nullptr);
+ typeNodeMap_.insert("valueEmitted", nullptr);
+ typeNodeMap_.insert("videoFramePainted", nullptr);
+ typeNodeMap_.insert("videoModeSelected", nullptr);
+ typeNodeMap_.insert("videoRecorder", nullptr);
+ typeNodeMap_.insert("void", nullptr);
+ typeNodeMap_.insert("volatile", nullptr);
+ typeNodeMap_.insert("wchar_t", nullptr);
+ typeNodeMap_.insert("x", nullptr);
+ typeNodeMap_.insert("y", nullptr);
+ typeNodeMap_.insert("zoom", nullptr);
+ typeNodeMap_.insert("zoomTo", nullptr);
}
/*! \fn NamespaceNode *QDocDatabase::primaryTreeRoot()
@@ -803,7 +803,7 @@ QmlTypeNode *QDocDatabase::findQmlType(const QString &qmid, const QString &name)
QStringList path(name);
Node *n = forest_.findNodeByNameAndType(path, &Node::isQmlType);
if (n && (n->isQmlType() || n->isJsType()))
- return static_cast<QmlTypeNode*>(n);
+ return static_cast<QmlTypeNode *>(n);
return nullptr;
}
@@ -827,7 +827,7 @@ Aggregate *QDocDatabase::findQmlBasicType(const QString &qmid, const QString &na
QStringList path(name);
Node *n = forest_.findNodeByNameAndType(path, &Node::isQmlBasicType);
if (n && n->isQmlBasicType())
- return static_cast<Aggregate*>(n);
+ return static_cast<Aggregate *>(n);
return nullptr;
}
@@ -1196,7 +1196,7 @@ void QDocDatabase::resolveNamespaces()
int count = namespaceMultimap.remove(s);
if (count > 0) {
foreach (Node *n, namespaces) {
- ns = static_cast<NamespaceNode*>(n);
+ ns = static_cast<NamespaceNode *>(n);
if (ns->isDocumentedHere())
break;
else if (ns->hadDoc())
@@ -1205,7 +1205,7 @@ void QDocDatabase::resolveNamespaces()
}
if (ns) {
foreach (Node *n, namespaces) {
- NamespaceNode *NS = static_cast<NamespaceNode*>(n);
+ NamespaceNode *NS = static_cast<NamespaceNode *>(n);
if (NS->hadDoc() && NS != ns) {
ns->doc().location().warning(tr("Namespace %1 documented more than once")
.arg(NS->name()));
@@ -1215,13 +1215,13 @@ void QDocDatabase::resolveNamespaces()
} else if (somewhere == nullptr) {
foreach (Node *n, namespaces) {
- NamespaceNode *NS = static_cast<NamespaceNode*>(n);
+ NamespaceNode *NS = static_cast<NamespaceNode *>(n);
NS->reportDocumentedChildrenInUndocumentedNamespace();
}
}
if (somewhere) {
foreach (Node *n, namespaces) {
- NamespaceNode *NS = static_cast<NamespaceNode*>(n);
+ NamespaceNode *NS = static_cast<NamespaceNode *>(n);
if (NS != somewhere)
NS->setDocNode(somewhere);
}
@@ -1237,7 +1237,7 @@ void QDocDatabase::resolveNamespaces()
*/
if (ns && count > 1) {
foreach (Node *n, namespaces) {
- NamespaceNode *NS = static_cast<NamespaceNode*>(n);
+ NamespaceNode *NS = static_cast<NamespaceNode *>(n);
if (NS != ns) {
NodeList::ConstIterator c = NS->constBegin();
while (c != NS->constEnd()) {
@@ -1250,7 +1250,7 @@ void QDocDatabase::resolveNamespaces()
}
}
if (ns == nullptr)
- ns = static_cast<NamespaceNode*>(namespaces.at(0));
+ ns = static_cast<NamespaceNode *>(namespaces.at(0));
namespaceIndex_.insert(ns->name(), ns);
}
}
@@ -1275,7 +1275,7 @@ void QDocDatabase::resolveProxies()
NodeList &proxies = t->proxies();
if (!proxies.isEmpty()) {
foreach (Node *n, proxies) {
- ProxyNode *pn = static_cast<ProxyNode*>(n);
+ ProxyNode *pn = static_cast<ProxyNode *>(n);
if (pn->count() > 0) {
Aggregate *aggregate = primaryTree()->findAggregate(pn->name());
if (aggregate != nullptr)
@@ -1464,7 +1464,7 @@ void QDocDatabase::mergeCollections(Node::NodeType type, CNMap &cnm, const Node
QRegExp singleDigit("\\b([0-9])\\b");
QStringList keys = cnmm.uniqueKeys();
foreach (const QString &key, keys) {
- QList<CollectionNode*> values = cnmm.values(key);
+ QList<CollectionNode *> values = cnmm.values(key);
CollectionNode *n = nullptr;
foreach (CollectionNode *v, values) {
if (v && v->wasSeen() && (v != relative)) {
@@ -1535,7 +1535,7 @@ const Node *QDocDatabase::findNodeForAtom(const Atom *a, const Node *relative, Q
{
const Node *node = nullptr;
- Atom *atom = const_cast<Atom*>(a);
+ Atom *atom = const_cast<Atom *>(a);
QStringList targetPath = atom->string().split(QLatin1Char('#'));
QString first = targetPath.first().trimmed();
diff --git a/src/qdoc/qdocdatabase.h b/src/qdoc/qdocdatabase.h
index 278b114b1..4093dbac5 100644
--- a/src/qdoc/qdocdatabase.h
+++ b/src/qdoc/qdocdatabase.h
@@ -39,7 +39,7 @@
QT_BEGIN_NAMESPACE
-typedef QMap<Text, const Node*> TextToNodeMap;
+typedef QMap<Text, const Node *> TextToNodeMap;
class Atom;
class Generator;
@@ -56,39 +56,39 @@ class QDocForest
{
private:
friend class QDocDatabase;
- QDocForest(QDocDatabase* qdb)
+ QDocForest(QDocDatabase *qdb)
: qdb_(qdb), primaryTree_(nullptr), currentIndex_(0) { }
~QDocForest();
- NamespaceNode* firstRoot();
- NamespaceNode* nextRoot();
- Tree* firstTree();
- Tree* nextTree();
- Tree* primaryTree() { return primaryTree_; }
- Tree* findTree(const QString& t) { return forest_.value(t); }
+ NamespaceNode *firstRoot();
+ NamespaceNode *nextRoot();
+ Tree *firstTree();
+ Tree *nextTree();
+ Tree *primaryTree() { return primaryTree_; }
+ Tree *findTree(const QString &t) { return forest_.value(t); }
QStringList keys() {
return forest_.keys();
}
- NamespaceNode* primaryTreeRoot() { return (primaryTree_ ? primaryTree_->root() : nullptr); }
+ NamespaceNode *primaryTreeRoot() { return (primaryTree_ ? primaryTree_->root() : nullptr); }
bool isEmpty() { return searchOrder().isEmpty(); }
bool done() { return (currentIndex_ >= searchOrder().size()); }
- const QVector<Tree*>& searchOrder();
- const QVector<Tree*>& indexSearchOrder();
- void setSearchOrder(QStringList& t);
- bool isLoaded(const QString& fn) {
- foreach (Tree* t, searchOrder()) {
+ const QVector<Tree *> &searchOrder();
+ const QVector<Tree *> &indexSearchOrder();
+ void setSearchOrder(QStringList &t);
+ bool isLoaded(const QString &fn) {
+ foreach (Tree *t, searchOrder()) {
if (fn == t->indexFileName())
return true;
}
return false;
}
- const Node* findNode(const QStringList& path,
- const Node* relative,
+ const Node *findNode(const QStringList &path,
+ const Node *relative,
int findFlags,
Node::Genus genus) {
- foreach (Tree* t, searchOrder()) {
- const Node* n = t->findNode(path, relative, findFlags, genus);
+ foreach (Tree *t, searchOrder()) {
+ const Node *n = t->findNode(path, relative, findFlags, genus);
if (n)
return n;
relative = nullptr;
@@ -96,27 +96,27 @@ class QDocForest
return nullptr;
}
- Node* findNodeByNameAndType(const QStringList& path, bool (Node::*isMatch) () const) {
- foreach (Tree* t, searchOrder()) {
- Node* n = t->findNodeByNameAndType(path, isMatch);
+ Node *findNodeByNameAndType(const QStringList &path, bool (Node::*isMatch) () const) {
+ foreach (Tree *t, searchOrder()) {
+ Node *n = t->findNodeByNameAndType(path, isMatch);
if (n)
return n;
}
return nullptr;
}
- ClassNode* findClassNode(const QStringList& path) {
- foreach (Tree* t, searchOrder()) {
- ClassNode* n = t->findClassNode(path);
+ ClassNode *findClassNode(const QStringList &path) {
+ foreach (Tree *t, searchOrder()) {
+ ClassNode *n = t->findClassNode(path);
if (n)
return n;
}
return nullptr;
}
- Node* findNodeForInclude(const QStringList& path) {
- foreach (Tree* t, searchOrder()) {
- Node* n = t->findNodeForInclude(path);
+ Node *findNodeForInclude(const QStringList &path) {
+ foreach (Tree *t, searchOrder()) {
+ Node *n = t->findNodeForInclude(path);
if (n)
return n;
}
@@ -125,20 +125,20 @@ class QDocForest
const FunctionNode *findFunctionNode(const QStringList &path,
const Parameters &parameters,
- const Node* relative,
+ const Node *relative,
Node::Genus genus);
- const Node* findNodeForTarget(QStringList& targetPath,
- const Node* relative,
+ const Node *findNodeForTarget(QStringList &targetPath,
+ const Node *relative,
Node::Genus genus,
- QString& ref);
+ QString &ref);
- const Node* findTypeNode(const QStringList& path, const Node* relative, Node::Genus genus)
+ const Node *findTypeNode(const QStringList &path, const Node *relative, Node::Genus genus)
{
int flags = SearchBaseClasses | SearchEnumValues | TypesOnly;
if (relative && genus == Node::DontCare && relative->genus() != Node::DOC)
genus = relative->genus();
- foreach (Tree* t, searchOrder()) {
- const Node* n = t->findNode(path, relative, flags, genus);
+ foreach (Tree *t, searchOrder()) {
+ const Node *n = t->findNode(path, relative, flags, genus);
if (n)
return n;
relative = nullptr;
@@ -146,40 +146,40 @@ class QDocForest
return nullptr;
}
- const PageNode* findPageNodeByTitle(const QString& title)
+ const PageNode *findPageNodeByTitle(const QString &title)
{
- foreach (Tree* t, searchOrder()) {
- const PageNode* n = t->findPageNodeByTitle(title);
+ foreach (Tree *t, searchOrder()) {
+ const PageNode *n = t->findPageNodeByTitle(title);
if (n)
return n;
}
return nullptr;
}
- const CollectionNode* getCollectionNode(const QString& name, Node::NodeType type)
+ const CollectionNode *getCollectionNode(const QString &name, Node::NodeType type)
{
- foreach (Tree* t, searchOrder()) {
- const CollectionNode* cn = t->getCollection(name, type);
+ foreach (Tree *t, searchOrder()) {
+ const CollectionNode *cn = t->getCollection(name, type);
if (cn)
return cn;
}
return nullptr;
}
- QmlTypeNode* lookupQmlType(const QString& name)
+ QmlTypeNode *lookupQmlType(const QString &name)
{
- foreach (Tree* t, searchOrder()) {
- QmlTypeNode* qcn = t->lookupQmlType(name);
+ foreach (Tree *t, searchOrder()) {
+ QmlTypeNode *qcn = t->lookupQmlType(name);
if (qcn)
return qcn;
}
return nullptr;
}
- Aggregate* lookupQmlBasicType(const QString& name)
+ Aggregate *lookupQmlBasicType(const QString &name)
{
- foreach (Tree* t, searchOrder()) {
- Aggregate* a = t->lookupQmlBasicType(name);
+ foreach (Tree *t, searchOrder()) {
+ Aggregate *a = t->lookupQmlBasicType(name);
if (a)
return a;
}
@@ -188,23 +188,23 @@ class QDocForest
void clearSearchOrder() { searchOrder_.clear(); }
void clearLinkCounts()
{
- foreach (Tree* t, searchOrder())
+ foreach (Tree *t, searchOrder())
t->clearLinkCount();
}
- void printLinkCounts(const QString& project);
- QString getLinkCounts(QStringList& strings, QVector<int>& counts);
- void newPrimaryTree(const QString& module);
- void setPrimaryTree(const QString& t);
- NamespaceNode* newIndexTree(const QString& module);
+ void printLinkCounts(const QString &project);
+ QString getLinkCounts(QStringList &strings, QVector<int> &counts);
+ void newPrimaryTree(const QString &module);
+ void setPrimaryTree(const QString &t);
+ NamespaceNode *newIndexTree(const QString &module);
private:
- QDocDatabase* qdb_;
- Tree* primaryTree_;
- int currentIndex_;
- QMap<QString, Tree*> forest_;
- QVector<Tree*> searchOrder_;
- QVector<Tree*> indexSearchOrder_;
- QVector<QString> moduleNames_;
+ QDocDatabase *qdb_;
+ Tree *primaryTree_;
+ int currentIndex_;
+ QMap<QString, Tree *> forest_;
+ QVector<Tree *> searchOrder_;
+ QVector<Tree *> indexSearchOrder_;
+ QVector<QString> moduleNames_;
};
class QDocDatabase
@@ -212,42 +212,42 @@ class QDocDatabase
Q_DECLARE_TR_FUNCTIONS(QDoc::QDocDatabase)
public:
- static QDocDatabase* qdocDB();
+ static QDocDatabase *qdocDB();
static void destroyQdocDB();
~QDocDatabase();
- Tree* findTree(const QString& t) { return forest_.findTree(t); }
+ Tree *findTree(const QString &t) { return forest_.findTree(t); }
- const CNMap& groups() { return primaryTree()->groups(); }
- const CNMap& modules() { return primaryTree()->modules(); }
- const CNMap& qmlModules() { return primaryTree()->qmlModules(); }
- const CNMap& jsModules() { return primaryTree()->jsModules(); }
+ const CNMap &groups() { return primaryTree()->groups(); }
+ const CNMap &modules() { return primaryTree()->modules(); }
+ const CNMap &qmlModules() { return primaryTree()->qmlModules(); }
+ const CNMap &jsModules() { return primaryTree()->jsModules(); }
- CollectionNode* addGroup(const QString& name) { return primaryTree()->addGroup(name); }
- CollectionNode* addModule(const QString& name) { return primaryTree()->addModule(name); }
- CollectionNode* addQmlModule(const QString& name) { return primaryTree()->addQmlModule(name); }
- CollectionNode* addJsModule(const QString& name) { return primaryTree()->addJsModule(name); }
+ CollectionNode *addGroup(const QString &name) { return primaryTree()->addGroup(name); }
+ CollectionNode *addModule(const QString &name) { return primaryTree()->addModule(name); }
+ CollectionNode *addQmlModule(const QString &name) { return primaryTree()->addQmlModule(name); }
+ CollectionNode *addJsModule(const QString &name) { return primaryTree()->addJsModule(name); }
- CollectionNode* addToGroup(const QString& name, Node* node) {
+ CollectionNode *addToGroup(const QString &name, Node *node) {
return primaryTree()->addToGroup(name, node);
}
- CollectionNode* addToModule(const QString& name, Node* node) {
+ CollectionNode *addToModule(const QString &name, Node *node) {
return primaryTree()->addToModule(name, node);
}
- CollectionNode* addToQmlModule(const QString& name, Node* node) {
+ CollectionNode *addToQmlModule(const QString &name, Node *node) {
return primaryTree()->addToQmlModule(name, node);
}
- CollectionNode* addToJsModule(const QString& name, Node* node) {
+ CollectionNode *addToJsModule(const QString &name, Node *node) {
return primaryTree()->addToJsModule(name, node);
}
- void addExampleNode(ExampleNode* n) { primaryTree()->addExampleNode(n); }
- ExampleNodeMap& exampleNodeMap() { return primaryTree()->exampleNodeMap(); }
+ void addExampleNode(ExampleNode *n) { primaryTree()->addExampleNode(n); }
+ ExampleNodeMap &exampleNodeMap() { return primaryTree()->exampleNodeMap(); }
- QmlTypeNode* findQmlType(const QString& name);
- QmlTypeNode* findQmlType(const QString& qmid, const QString& name);
- QmlTypeNode* findQmlType(const ImportRec& import, const QString& name);
- Aggregate* findQmlBasicType(const QString& qmid, const QString& name);
+ QmlTypeNode *findQmlType(const QString &name);
+ QmlTypeNode *findQmlType(const QString &qmid, const QString &name);
+ QmlTypeNode *findQmlType(const ImportRec& import, const QString &name);
+ Aggregate *findQmlBasicType(const QString &qmid, const QString &name);
static NodeMultiMap &obsoleteClasses() { return obsoleteClasses_; }
static NodeMultiMap &obsoleteQmlTypes() { return obsoleteQmlTypes_; }
@@ -273,30 +273,30 @@ class QDocDatabase
/*******************************************************************
special collection access functions
********************************************************************/
- NodeMultiMap& getCppClasses();
- NodeMultiMap& getObsoleteClasses();
- NodeMultiMap& getClassesWithObsoleteMembers();
- NodeMultiMap& getObsoleteQmlTypes();
- NodeMultiMap& getQmlTypesWithObsoleteMembers();
- NodeMultiMap& getNamespaces();
- NodeMultiMap& getQmlBasicTypes();
- NodeMultiMap& getQmlTypes();
- NodeMultiMap& getExamples();
- NodeMultiMap& getAttributions();
- NodeMapMap& getFunctionIndex();
- TextToNodeMap& getLegaleseTexts();
- const NodeMap& getClassMap(const QString& key);
- const NodeMap& getQmlTypeMap(const QString& key);
- const NodeMap& getSinceMap(const QString& key);
+ NodeMultiMap &getCppClasses();
+ NodeMultiMap &getObsoleteClasses();
+ NodeMultiMap &getClassesWithObsoleteMembers();
+ NodeMultiMap &getObsoleteQmlTypes();
+ NodeMultiMap &getQmlTypesWithObsoleteMembers();
+ NodeMultiMap &getNamespaces();
+ NodeMultiMap &getQmlBasicTypes();
+ NodeMultiMap &getQmlTypes();
+ NodeMultiMap &getExamples();
+ NodeMultiMap &getAttributions();
+ NodeMapMap &getFunctionIndex();
+ TextToNodeMap &getLegaleseTexts();
+ const NodeMap &getClassMap(const QString &key);
+ const NodeMap &getQmlTypeMap(const QString &key);
+ const NodeMap &getSinceMap(const QString &key);
/*******************************************************************
Many of these will be either eliminated or replaced.
********************************************************************/
void resolveStuff();
- void insertTarget(const QString& name,
- const QString& title,
+ void insertTarget(const QString &name,
+ const QString &title,
TargetRec::TargetType type,
- Node* node,
+ Node *node,
int priority) {
primaryTree()->insertTarget(name, title, type, node, priority);
}
@@ -304,41 +304,41 @@ class QDocDatabase
/*******************************************************************
The functions declared below are called for the current tree only.
********************************************************************/
- Aggregate* findRelatesNode(const QStringList& path) { return primaryTree()->findRelatesNode(path); }
- Node* findNodeInOpenNamespace(QStringList& path, bool (Node::*) () const);
+ Aggregate *findRelatesNode(const QStringList &path) { return primaryTree()->findRelatesNode(path); }
+ Node *findNodeInOpenNamespace(QStringList &path, bool (Node::*) () const);
/*******************************************************************/
/*****************************************************************************
This function can handle parameters enclosed in '[' ']' (domanin and genus).
******************************************************************************/
- const Node* findNodeForAtom(const Atom* atom, const Node* relative, QString& ref);
+ const Node *findNodeForAtom(const Atom *atom, const Node *relative, QString &ref);
/*******************************************************************/
/*******************************************************************
The functions declared below are called for all trees.
********************************************************************/
- ClassNode* findClassNode(const QStringList& path) { return forest_.findClassNode(path); }
- Node* findNodeForInclude(const QStringList& path) { return forest_.findNodeForInclude(path); }
+ ClassNode *findClassNode(const QStringList &path) { return forest_.findClassNode(path); }
+ Node *findNodeForInclude(const QStringList &path) { return forest_.findNodeForInclude(path); }
const FunctionNode *findFunctionNode(const QString &target, const Node *relative, Node::Genus genus);
- const Node* findTypeNode(const QString& type, const Node* relative, Node::Genus genus);
- const Node* findNodeForTarget(const QString& target, const Node* relative);
- const PageNode* findPageNodeByTitle(const QString& title) {
+ const Node *findTypeNode(const QString &type, const Node *relative, Node::Genus genus);
+ const Node *findNodeForTarget(const QString &target, const Node *relative);
+ const PageNode *findPageNodeByTitle(const QString &title) {
return forest_.findPageNodeByTitle(title);
}
- Node* findNodeByNameAndType(const QStringList& path, bool (Node::*isMatch) () const) {
+ Node *findNodeByNameAndType(const QStringList &path, bool (Node::*isMatch) () const) {
return forest_.findNodeByNameAndType(path, isMatch);
}
- const CollectionNode* getCollectionNode(const QString& name, Node::NodeType type) {
+ const CollectionNode *getCollectionNode(const QString &name, Node::NodeType type) {
return forest_.getCollectionNode(name, type);
}
FunctionNode *findFunctionNodeForTag(QString tag) { return primaryTree()->findFunctionNodeForTag(tag); }
FunctionNode *findMacroNode(const QString &t) { return primaryTree()->findMacroNode(t); }
private:
- const Node* findNodeForTarget(QStringList& targetPath,
- const Node* relative,
+ const Node *findNodeForTarget(QStringList &targetPath,
+ const Node *relative,
Node::Genus genus,
- QString& ref) {
+ QString &ref) {
return forest_.findNodeForTarget(targetPath, relative, genus, ref);
}
const FunctionNode *findFunctionNode(const QStringList &path,
@@ -350,52 +350,52 @@ class QDocDatabase
/*******************************************************************/
public:
- void addPropertyFunction(PropertyNode* property,
- const QString& funcName,
+ void addPropertyFunction(PropertyNode *property,
+ const QString &funcName,
PropertyNode::FunctionRole funcRole) {
primaryTree()->addPropertyFunction(property, funcName, funcRole);
}
- void setVersion(const QString& v) { version_ = v; }
+ void setVersion(const QString &v) { version_ = v; }
QString version() const { return version_; }
- void generateTagFile(const QString& name, Generator* g);
- void readIndexes(const QStringList& indexFiles);
+ void generateTagFile(const QString &name, Generator *g);
+ void readIndexes(const QStringList &indexFiles);
void generateIndex(const QString &fileName, const QString &url, const QString &title, Generator *g);
void clearOpenNamespaces() { openNamespaces_.clear(); }
- void insertOpenNamespace(const QString& path) { openNamespaces_.insert(path); }
+ void insertOpenNamespace(const QString &path) { openNamespaces_.insert(path); }
void setShowInternal(bool value) { showInternal_ = value; }
void setSingleExec(bool value) { singleExec_ = value; }
void processForest();
// Try to make this function private.
QDocForest& forest() { return forest_; }
- NamespaceNode* primaryTreeRoot() { return forest_.primaryTreeRoot(); }
- void newPrimaryTree(const QString& module) { forest_.newPrimaryTree(module); }
- void setPrimaryTree(const QString& t) { forest_.setPrimaryTree(t); }
- NamespaceNode* newIndexTree(const QString& module) { return forest_.newIndexTree(module); }
- const QVector<Tree*>& searchOrder() { return forest_.searchOrder(); }
- void setLocalSearch() { forest_.searchOrder_ = QVector<Tree*>(1, primaryTree()); }
- void setSearchOrder(const QVector<Tree*>& searchOrder) { forest_.searchOrder_ = searchOrder; }
- void setSearchOrder(QStringList& t) { forest_.setSearchOrder(t); }
- void mergeCollections(Node::NodeType type, CNMap& cnm, const Node* relative);
- void mergeCollections(CollectionNode* c);
+ NamespaceNode *primaryTreeRoot() { return forest_.primaryTreeRoot(); }
+ void newPrimaryTree(const QString &module) { forest_.newPrimaryTree(module); }
+ void setPrimaryTree(const QString &t) { forest_.setPrimaryTree(t); }
+ NamespaceNode *newIndexTree(const QString &module) { return forest_.newIndexTree(module); }
+ const QVector<Tree *> &searchOrder() { return forest_.searchOrder(); }
+ void setLocalSearch() { forest_.searchOrder_ = QVector<Tree *>(1, primaryTree()); }
+ void setSearchOrder(const QVector<Tree *> &searchOrder) { forest_.searchOrder_ = searchOrder; }
+ void setSearchOrder(QStringList &t) { forest_.setSearchOrder(t); }
+ void mergeCollections(Node::NodeType type, CNMap &cnm, const Node *relative);
+ void mergeCollections(CollectionNode *c);
void clearSearchOrder() { forest_.clearSearchOrder(); }
- void incrementLinkCount(const Node* t) { t->tree()->incrementLinkCount(); }
+ void incrementLinkCount(const Node *t) { t->tree()->incrementLinkCount(); }
void clearLinkCounts() { forest_.clearLinkCounts(); }
- void printLinkCounts(const QString& t) { forest_.printLinkCounts(t); }
- QString getLinkCounts(QStringList& strings, QVector<int>& counts) {
+ void printLinkCounts(const QString &t) { forest_.printLinkCounts(t); }
+ QString getLinkCounts(QStringList &strings, QVector<int> &counts) {
return forest_.getLinkCounts(strings, counts);
}
- QString getNewLinkTarget(const Node* locNode,
- const Node* t,
- const QString& fileName,
- QString& text,
+ QString getNewLinkTarget(const Node *locNode,
+ const Node *t,
+ const QString &fileName,
+ QString &text,
bool broken = false) {
return primaryTree()->getNewLinkTarget(locNode, t, fileName, text, broken);
}
- TargetList* getTargetList(const QString& t) { return primaryTree()->getTargetList(t); }
+ TargetList* getTargetList(const QString &t) { return primaryTree()->getTargetList(t); }
QStringList getTargetListKeys() { return primaryTree()->getTargetListKeys(); }
QStringList keys() { return forest_.keys(); }
void resolveNamespaces();
@@ -405,50 +405,50 @@ class QDocDatabase
private:
friend class Tree;
- const Node* findNode(const QStringList& path,
- const Node* relative,
+ const Node *findNode(const QStringList &path,
+ const Node *relative,
int findFlags,
Node::Genus genus) {
return forest_.findNode(path, relative, findFlags, genus);
}
void processForest(void (QDocDatabase::*) (Aggregate*));
- bool isLoaded(const QString& t) { return forest_.isLoaded(t); }
+ bool isLoaded(const QString &t) { return forest_.isLoaded(t); }
static void initializeDB();
private:
QDocDatabase();
- QDocDatabase(QDocDatabase const& ) : showInternal_(false), forest_(this) { }
- QDocDatabase& operator=(QDocDatabase const& );
+ QDocDatabase(QDocDatabase const &) : showInternal_(false), forest_(this) { }
+ QDocDatabase& operator=(QDocDatabase const &);
public:
- static bool debug;
- Tree* primaryTree() { return forest_.primaryTree(); }
+ static bool debug;
+ Tree *primaryTree() { return forest_.primaryTree(); }
private:
- static QDocDatabase* qdocDB_;
- static NodeMap typeNodeMap_;
- static NodeMultiMap obsoleteClasses_;
- static NodeMultiMap classesWithObsoleteMembers_;
- static NodeMultiMap obsoleteQmlTypes_;
- static NodeMultiMap qmlTypesWithObsoleteMembers_;
- static NodeMultiMap cppClasses_;
- static NodeMultiMap qmlBasicTypes_;
- static NodeMultiMap qmlTypes_;
- static NodeMultiMap examples_;
- static NodeMapMap newClassMaps_;
- static NodeMapMap newQmlTypeMaps_;
- static NodeMultiMapMap newSinceMaps_;
-
- bool showInternal_;
- bool singleExec_;
- QString version_;
- QDocForest forest_;
-
- NodeMultiMap namespaceIndex_;
- NodeMultiMap attributions_;
- NodeMapMap functionIndex_;
- TextToNodeMap legaleseTexts_;
- QSet<QString> openNamespaces_;
+ static QDocDatabase *qdocDB_;
+ static NodeMap typeNodeMap_;
+ static NodeMultiMap obsoleteClasses_;
+ static NodeMultiMap classesWithObsoleteMembers_;
+ static NodeMultiMap obsoleteQmlTypes_;
+ static NodeMultiMap qmlTypesWithObsoleteMembers_;
+ static NodeMultiMap cppClasses_;
+ static NodeMultiMap qmlBasicTypes_;
+ static NodeMultiMap qmlTypes_;
+ static NodeMultiMap examples_;
+ static NodeMapMap newClassMaps_;
+ static NodeMapMap newQmlTypeMaps_;
+ static NodeMultiMapMap newSinceMaps_;
+
+ bool showInternal_;
+ bool singleExec_;
+ QString version_;
+ QDocForest forest_;
+
+ NodeMultiMap namespaceIndex_;
+ NodeMultiMap attributions_;
+ NodeMapMap functionIndex_;
+ TextToNodeMap legaleseTexts_;
+ QSet<QString> openNamespaces_;
};
QT_END_NAMESPACE
diff --git a/src/qdoc/qdocindexfiles.cpp b/src/qdoc/qdocindexfiles.cpp
index b6700ba5b..a41904a8f 100644
--- a/src/qdoc/qdocindexfiles.cpp
+++ b/src/qdoc/qdocindexfiles.cpp
@@ -106,9 +106,9 @@ void QDocIndexFiles::destroyQDocIndexFiles()
/*!
Reads and parses the list of index files in \a indexFiles.
*/
-void QDocIndexFiles::readIndexes(const QStringList& indexFiles)
+void QDocIndexFiles::readIndexes(const QStringList &indexFiles)
{
- foreach (const QString& indexFile, indexFiles) {
+ foreach (const QString &indexFile, indexFiles) {
QString msg = "Loading index file: " + indexFile;
Location::logToStdErr(msg);
readIndexFile(indexFile);
@@ -120,7 +120,7 @@ static bool readingRoot = true;
/*!
Reads and parses the index file at \a path.
*/
-void QDocIndexFiles::readIndexFile(const QString& path)
+void QDocIndexFiles::readIndexFile(const QString &path)
{
QFile file(path);
if (!file.open(QFile::ReadOnly)) {
@@ -156,7 +156,7 @@ void QDocIndexFiles::readIndexFile(const QString& path)
QString indexTitle = attrs.value(QLatin1String("indexTitle")).toString();
basesList_.clear();
- NamespaceNode* root = qdb_->newIndexTree(project_);
+ NamespaceNode *root = qdb_->newIndexTree(project_);
root->tree()->setIndexTitle(indexTitle);
// Scan all elements in the XML file, constructing a map that contains
@@ -176,22 +176,22 @@ void QDocIndexFiles::readIndexFile(const QString& path)
appropriate node(s).
*/
void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
- Node* current,
- const QString& indexUrl)
+ Node *current,
+ const QString &indexUrl)
{
QXmlStreamAttributes attributes = reader.attributes();
QStringRef elementName = reader.name();
QString name = attributes.value(QLatin1String("name")).toString();
QString href = attributes.value(QLatin1String("href")).toString();
- Node* node;
+ Node *node;
Location location;
- Aggregate* parent = nullptr;
+ Aggregate *parent = nullptr;
bool hasReadChildren = false;
if (current->isAggregate())
- parent = static_cast<Aggregate*>(current);
+ parent = static_cast<Aggregate *>(current);
QString filePath;
int lineNo = 0;
@@ -200,7 +200,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
lineNo = attributes.value("lineno").toInt();
}
if (elementName == QLatin1String("namespace")) {
- NamespaceNode* ns = new NamespaceNode(parent, name);
+ NamespaceNode *ns = new NamespaceNode(parent, name);
node = ns;
if (!indexUrl.isEmpty())
location = Location(indexUrl + QLatin1Char('/') + name.toLower() + ".html");
@@ -219,7 +219,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
if (attributes.hasAttribute(QLatin1String("bases"))) {
QString bases = attributes.value(QLatin1String("bases")).toString();
if (!bases.isEmpty())
- basesList_.append(QPair<ClassNode*,QString>(static_cast<ClassNode*>(node), bases));
+ basesList_.append(QPair<ClassNode *, QString>(static_cast<ClassNode *>(node), bases));
}
if (!indexUrl.isEmpty())
location = Location(indexUrl + QLatin1Char('/') + name.toLower() + ".html");
@@ -240,7 +240,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
else if (!indexUrl.isNull())
location = Location(name);
} else if (elementName == QLatin1String("qmlclass")) {
- QmlTypeNode* qcn = new QmlTypeNode(parent, name);
+ QmlTypeNode *qcn = new QmlTypeNode(parent, name);
qcn->setTitle(attributes.value(QLatin1String("title")).toString());
QString logicalModuleName = attributes.value(QLatin1String("qml-module-name")).toString();
if (!logicalModuleName.isEmpty())
@@ -261,7 +261,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
location = Location(name);
node = qcn;
} else if (elementName == QLatin1String("jstype")) {
- QmlTypeNode* qcn = new QmlTypeNode(parent, name);
+ QmlTypeNode *qcn = new QmlTypeNode(parent, name);
qcn->setGenus(Node::JS);
qcn->setTitle(attributes.value(QLatin1String("title")).toString());
QString logicalModuleName = attributes.value(QLatin1String("js-module-name")).toString();
@@ -283,7 +283,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
location = Location(name);
node = qcn;
} else if (elementName == QLatin1String("qmlbasictype")) {
- QmlBasicTypeNode* qbtn = new QmlBasicTypeNode(parent, name);
+ QmlBasicTypeNode *qbtn = new QmlBasicTypeNode(parent, name);
qbtn->setTitle(attributes.value(QLatin1String("title")).toString());
if (attributes.hasAttribute(QLatin1String("location")))
name = attributes.value("location").toString();
@@ -293,7 +293,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
location = Location(name);
node = qbtn;
} else if (elementName == QLatin1String("jsbasictype")) {
- QmlBasicTypeNode* qbtn = new QmlBasicTypeNode(parent, name);
+ QmlBasicTypeNode *qbtn = new QmlBasicTypeNode(parent, name);
qbtn->setGenus(Node::JS);
qbtn->setTitle(attributes.value(QLatin1String("title")).toString());
if (attributes.hasAttribute(QLatin1String("location")))
@@ -311,7 +311,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
bool readonly = false;
if (attributes.value(QLatin1String("writable")) == QLatin1String("false"))
readonly = true;
- QmlPropertyNode* qpn = new QmlPropertyNode(parent, name, type, attached);
+ QmlPropertyNode *qpn = new QmlPropertyNode(parent, name, type, attached);
qpn->markReadOnly(readonly);
node = qpn;
} else if (elementName == QLatin1String("jsproperty")) {
@@ -322,19 +322,19 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
bool readonly = false;
if (attributes.value(QLatin1String("writable")) == QLatin1String("false"))
readonly = true;
- QmlPropertyNode* qpn = new QmlPropertyNode(parent, name, type, attached);
+ QmlPropertyNode *qpn = new QmlPropertyNode(parent, name, type, attached);
qpn->setGenus(Node::JS);
qpn->markReadOnly(readonly);
node = qpn;
} else if (elementName == QLatin1String("group")) {
- CollectionNode* cn = qdb_->addGroup(name);
+ CollectionNode *cn = qdb_->addGroup(name);
cn->setTitle(attributes.value(QLatin1String("title")).toString());
cn->setSubtitle(attributes.value(QLatin1String("subtitle")).toString());
if (attributes.value(QLatin1String("seen")) == QLatin1String("true"))
cn->markSeen();
node = cn;
} else if (elementName == QLatin1String("module")) {
- CollectionNode* cn = qdb_->addModule(name);
+ CollectionNode *cn = qdb_->addModule(name);
cn->setTitle(attributes.value(QLatin1String("title")).toString());
cn->setSubtitle(attributes.value(QLatin1String("subtitle")).toString());
if (attributes.value(QLatin1String("seen")) == QLatin1String("true"))
@@ -342,7 +342,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
node = cn;
} else if (elementName == QLatin1String("qmlmodule")) {
QString t = attributes.value(QLatin1String("qml-module-name")).toString();
- CollectionNode* cn = qdb_->addQmlModule(t);
+ CollectionNode *cn = qdb_->addQmlModule(t);
QStringList info;
info << t << attributes.value(QLatin1String("qml-module-version")).toString();
cn->setLogicalModuleInfo(info);
@@ -353,7 +353,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
node = cn;
} else if (elementName == QLatin1String("jsmodule")) {
QString t = attributes.value(QLatin1String("js-module-name")).toString();
- CollectionNode* cn = qdb_->addJsModule(t);
+ CollectionNode *cn = qdb_->addJsModule(t);
QStringList info;
info << t << attributes.value(QLatin1String("js-module-version")).toString();
cn->setLogicalModuleInfo(info);
@@ -388,7 +388,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
goto done;
if (current && current->isExample()) {
- ExampleNode* en = static_cast<ExampleNode *>(current);
+ ExampleNode *en = static_cast<ExampleNode *>(current);
if (subtype == QDocAttrFile) {
en->appendFile(name);
goto done;
@@ -398,7 +398,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
goto done;
}
}
- PageNode* pn = nullptr;
+ PageNode *pn = nullptr;
if (subtype == QDocAttrExample)
pn = new ExampleNode(parent, name);
else if (subtype == QDocAttrExternalPage)
@@ -418,7 +418,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
node = pn;
} else if (elementName == QLatin1String("enum")) {
- EnumNode* enumNode = new EnumNode(parent, name);
+ EnumNode *enumNode = new EnumNode(parent, name);
if (!indexUrl.isEmpty())
location = Location(indexUrl + QLatin1Char('/') + parent->name().toLower() + ".html");
@@ -466,7 +466,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
metaness = FunctionNode::getMetaness(t);
if (attributes.value(QLatin1String("attached")) == QLatin1String("true"))
attached = true;
- FunctionNode* fn = new FunctionNode(metaness, parent, name, attached);
+ FunctionNode *fn = new FunctionNode(metaness, parent, name, attached);
if (fn->isCppNode()) {
fn->setReturnType(attributes.value(QLatin1String("type")).toString());
fn->setVirtualness(attributes.value(QLatin1String("virtual")).toString());
@@ -690,14 +690,14 @@ void QDocIndexFiles::insertTarget(TargetRec::TargetType type,
*/
void QDocIndexFiles::resolveIndex()
{
- QPair<ClassNode*,QString> pair;
+ QPair<ClassNode *, QString> pair;
foreach (pair, basesList_) {
QStringList bases = pair.second.split(QLatin1Char(','));
- foreach (const QString& base, bases) {
+ foreach (const QString &base, bases) {
QStringList basePath = base.split(QString("::"));
- Node* n = qdb_->findClassNode(basePath);
+ Node *n = qdb_->findClassNode(basePath);
if (n)
- pair.first->addResolvedBaseClass(Node::Public, static_cast<ClassNode*>(n));
+ pair.first->addResolvedBaseClass(Node::Public, static_cast<ClassNode *>(n));
else
pair.first->addUnresolvedBaseClass(Node::Public, basePath, QString());
}
@@ -912,7 +912,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
else
href = node->name();
if (node->isQmlNode() || node->isJsNode()) {
- Aggregate* p = node->parent();
+ Aggregate *p = node->parent();
if (p && (p->isQmlType() || p->isJsType()) && p->isAbstract())
href.clear();
}
@@ -925,7 +925,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
if (node->isAbstract())
writer.writeAttribute("abstract", "true");
}
- const Location& declLocation = node->declLocation();
+ const Location &declLocation = node->declLocation();
if (!declLocation.fileName().isEmpty())
writer.writeAttribute("location", declLocation.fileName());
if (!declLocation.filePath().isEmpty()) {
@@ -949,11 +949,11 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
case Node::Union:
{
// Classes contain information about their base classes.
- const ClassNode* classNode = static_cast<const ClassNode*>(node);
+ const ClassNode *classNode = static_cast<const ClassNode *>(node);
QList<RelatedClass> bases = classNode->baseClasses();
QSet<QString> baseStrings;
- foreach (const RelatedClass& related, bases) {
- ClassNode* n = related.node_;
+ foreach (const RelatedClass &related, bases) {
+ ClassNode *n = related.node_;
if (n)
baseStrings.insert(n->fullName());
else if (!related.path_.isEmpty())
@@ -975,7 +975,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
break;
case Node::HeaderFile:
{
- const HeaderNode* hn = static_cast<const HeaderNode*>(node);
+ const HeaderNode *hn = static_cast<const HeaderNode *>(node);
if (!hn->physicalModuleName().isEmpty())
writer.writeAttribute("module", hn->physicalModuleName());
if (!hn->groupNames().isEmpty())
@@ -989,7 +989,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
break;
case Node::Namespace:
{
- const NamespaceNode* ns = static_cast<const NamespaceNode*>(node);
+ const NamespaceNode *ns = static_cast<const NamespaceNode *>(node);
if (!ns->physicalModuleName().isEmpty())
writer.writeAttribute("module", ns->physicalModuleName());
if (!ns->groupNames().isEmpty())
@@ -1001,7 +1001,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
case Node::JsType:
case Node::QmlType:
{
- const QmlTypeNode* qcn = static_cast<const QmlTypeNode*>(node);
+ const QmlTypeNode *qcn = static_cast<const QmlTypeNode *>(node);
writer.writeAttribute("title", qcn->title());
writer.writeAttribute("fulltitle", qcn->fullTitle());
writer.writeAttribute("subtitle", qcn->subtitle());
@@ -1038,7 +1038,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
writer.writeAttribute("subtype", "page");
writeModuleName = true;
}
- const PageNode* pn = static_cast<const PageNode*>(node);
+ const PageNode *pn = static_cast<const PageNode *>(node);
writer.writeAttribute("title", pn->title());
writer.writeAttribute("fulltitle", pn->fullTitle());
writer.writeAttribute("subtitle", pn->subtitle());
@@ -1052,7 +1052,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
break;
case Node::Group:
{
- const CollectionNode* cn = static_cast<const CollectionNode*>(node);
+ const CollectionNode *cn = static_cast<const CollectionNode *>(node);
writer.writeAttribute("seen", cn->wasSeen() ? "true" : "false");
writer.writeAttribute("title", cn->title());
if (!cn->subtitle().isEmpty())
@@ -1067,7 +1067,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
*/
if (!cn->members().isEmpty()) {
QStringList names;
- foreach (const Node* member, cn->members())
+ foreach (const Node *member, cn->members())
names.append(member->name());
writer.writeAttribute("members", names.join(QLatin1Char(',')));
}
@@ -1077,7 +1077,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
break;
case Node::Module:
{
- const CollectionNode* cn = static_cast<const CollectionNode*>(node);
+ const CollectionNode *cn = static_cast<const CollectionNode *>(node);
writer.writeAttribute("seen", cn->wasSeen() ? "true" : "false");
writer.writeAttribute("title", cn->title());
if (!cn->subtitle().isEmpty())
@@ -1092,7 +1092,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
*/
if (!cn->members().isEmpty()) {
QStringList names;
- foreach (const Node* member, cn->members())
+ foreach (const Node *member, cn->members())
names.append(member->name());
writer.writeAttribute("members", names.join(QLatin1Char(',')));
}
@@ -1103,7 +1103,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
case Node::JsModule:
case Node::QmlModule:
{
- const CollectionNode* cn = static_cast<const CollectionNode*>(node);
+ const CollectionNode *cn = static_cast<const CollectionNode *>(node);
writer.writeAttribute("seen", cn->wasSeen() ? "true" : "false");
writer.writeAttribute("title", cn->title());
if (!cn->subtitle().isEmpty())
@@ -1118,7 +1118,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
*/
if (!cn->members().isEmpty()) {
QStringList names;
- foreach (const Node* member, cn->members())
+ foreach (const Node *member, cn->members())
names.append(member->name());
writer.writeAttribute("members", names.join(QLatin1Char(',')));
}
@@ -1129,7 +1129,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
case Node::JsProperty:
case Node::QmlProperty:
{
- QmlPropertyNode* qpn = static_cast<QmlPropertyNode*>(node);
+ QmlPropertyNode *qpn = static_cast<QmlPropertyNode *>(node);
writer.writeAttribute("type", qpn->dataType());
writer.writeAttribute("attached", qpn->isAttached() ? "true" : "false");
writer.writeAttribute("writable", qpn->isWritable() ? "true" : "false");
@@ -1139,37 +1139,37 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
break;
case Node::Property:
{
- const PropertyNode* propertyNode = static_cast<const PropertyNode*>(node);
+ const PropertyNode *propertyNode = static_cast<const PropertyNode *>(node);
writer.writeAttribute("type", propertyNode->dataType());
if (!brief.isEmpty())
writer.writeAttribute("brief", brief);
- foreach (const Node* fnNode, propertyNode->getters()) {
+ foreach (const Node *fnNode, propertyNode->getters()) {
if (fnNode) {
- const FunctionNode* functionNode = static_cast<const FunctionNode*>(fnNode);
+ const FunctionNode *functionNode = static_cast<const FunctionNode *>(fnNode);
writer.writeStartElement("getter");
writer.writeAttribute("name", functionNode->name());
writer.writeEndElement(); // getter
}
}
- foreach (const Node* fnNode, propertyNode->setters()) {
+ foreach (const Node *fnNode, propertyNode->setters()) {
if (fnNode) {
- const FunctionNode* functionNode = static_cast<const FunctionNode*>(fnNode);
+ const FunctionNode *functionNode = static_cast<const FunctionNode *>(fnNode);
writer.writeStartElement("setter");
writer.writeAttribute("name", functionNode->name());
writer.writeEndElement(); // setter
}
}
- foreach (const Node* fnNode, propertyNode->resetters()) {
+ foreach (const Node *fnNode, propertyNode->resetters()) {
if (fnNode) {
- const FunctionNode* functionNode = static_cast<const FunctionNode*>(fnNode);
+ const FunctionNode *functionNode = static_cast<const FunctionNode *>(fnNode);
writer.writeStartElement("resetter");
writer.writeAttribute("name", functionNode->name());
writer.writeEndElement(); // resetter
}
}
- foreach (const Node* fnNode, propertyNode->notifiers()) {
+ foreach (const Node *fnNode, propertyNode->notifiers()) {
if (fnNode) {
- const FunctionNode* functionNode = static_cast<const FunctionNode*>(fnNode);
+ const FunctionNode *functionNode = static_cast<const FunctionNode *>(fnNode);
writer.writeStartElement("notifier");
writer.writeAttribute("name", functionNode->name());
writer.writeEndElement(); // notifier
@@ -1179,7 +1179,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
break;
case Node::Variable:
{
- const VariableNode* variableNode = static_cast<const VariableNode*>(node);
+ const VariableNode *variableNode = static_cast<const VariableNode *>(node);
writer.writeAttribute("type", variableNode->dataType());
writer.writeAttribute("static", variableNode->isStatic() ? "true" : "false");
if (!brief.isEmpty())
@@ -1188,10 +1188,10 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
break;
case Node::Enum:
{
- const EnumNode* enumNode = static_cast<const EnumNode*>(node);
+ const EnumNode *enumNode = static_cast<const EnumNode *>(node);
if (enumNode->flagsType())
writer.writeAttribute("typedef",enumNode->flagsType()->fullDocumentName());
- foreach (const EnumItem& item, enumNode->items()) {
+ foreach (const EnumItem &item, enumNode->items()) {
writer.writeStartElement("value");
writer.writeAttribute("name", item.name());
writer.writeAttribute("value", item.value());
@@ -1201,7 +1201,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
break;
case Node::Typedef:
{
- const TypedefNode* typedefNode = static_cast<const TypedefNode*>(node);
+ const TypedefNode *typedefNode = static_cast<const TypedefNode *>(node);
if (typedefNode->associatedEnum())
writer.writeAttribute("enum",typedefNode->associatedEnum()->fullDocumentName());
}
@@ -1227,7 +1227,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
bool external = false;
if (node->isExternalPage())
external = true;
- foreach (const Atom* target, node->doc().targets()) {
+ foreach (const Atom *target, node->doc().targets()) {
QString title = target->string();
QString name = Doc::canonicalTitle(title);
writer.writeStartElement("target");
@@ -1241,7 +1241,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
}
}
if (node->doc().hasKeywords()) {
- foreach (const Atom* keyword, node->doc().keywords()) {
+ foreach (const Atom *keyword, node->doc().keywords()) {
QString title = keyword->string();
QString name = Doc::canonicalTitle(title);
writer.writeStartElement("keyword");
@@ -1262,7 +1262,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
if (node->isPageNode() || node->isCollectionNode()) {
if (node->doc().hasTableOfContents()) {
for (int i = 0; i < node->doc().tableOfContents().size(); ++i) {
- Atom* item = node->doc().tableOfContents()[i];
+ Atom *item = node->doc().tableOfContents()[i];
int level = node->doc().tableOfContentsLevels()[i];
QString title = Text::sectionHeading(item).toString();
writer.writeStartElement("contents");
@@ -1274,8 +1274,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
}
}
if (node->isExample()) {
- const ExampleNode* en = static_cast<const ExampleNode*>(node);
- foreach (const QString& file, en->files()) {
+ const ExampleNode *en = static_cast<const ExampleNode *>(node);
+ foreach (const QString &file, en->files()) {
writer.writeStartElement("page");
writer.writeAttribute("name", file);
QString href = gen_->linkForExampleFile(file, en);
@@ -1287,7 +1287,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
writer.writeAttribute("subtitle", file);
writer.writeEndElement(); // page
}
- foreach (const QString& file, en->images()) {
+ foreach (const QString &file, en->images()) {
writer.writeStartElement("page");
writer.writeAttribute("name", file);
QString href = gen_->linkForExampleFile(file, en);
@@ -1475,7 +1475,7 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter &writer, Node *node,
create the group, module, or QML module element and add each member to
its member list.
*/
- const CNMap& groups = qdb_->groups();
+ const CNMap &groups = qdb_->groups();
if (!groups.isEmpty()) {
CNMap::ConstIterator g = groups.constBegin();
while (g != groups.constEnd()) {
@@ -1485,7 +1485,7 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter &writer, Node *node,
}
}
- const CNMap& modules = qdb_->modules();
+ const CNMap &modules = qdb_->modules();
if (!modules.isEmpty()) {
CNMap::ConstIterator g = modules.constBegin();
while (g != modules.constEnd()) {
@@ -1495,7 +1495,7 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter &writer, Node *node,
}
}
- const CNMap& qmlModules = qdb_->qmlModules();
+ const CNMap &qmlModules = qdb_->qmlModules();
if (!qmlModules.isEmpty()) {
CNMap::ConstIterator g = qmlModules.constBegin();
while (g != qmlModules.constEnd()) {
@@ -1505,7 +1505,7 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter &writer, Node *node,
}
}
- const CNMap& jsModules = qdb_->jsModules();
+ const CNMap &jsModules = qdb_->jsModules();
if (!jsModules.isEmpty()) {
CNMap::ConstIterator g = jsModules.constBegin();
while (g != jsModules.constEnd()) {
@@ -1527,9 +1527,9 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter &writer, Node *node,
\a g is used to get the Config object that contains the variables
from the module's .qdocconf file.
*/
-void QDocIndexFiles::generateIndex(const QString& fileName,
- const QString& url,
- const QString& title,
+void QDocIndexFiles::generateIndex(const QString &fileName,
+ const QString &url,
+ const QString &title,
Generator *g)
{
QFile file(fileName);
diff --git a/src/qdoc/qdocindexfiles.h b/src/qdoc/qdocindexfiles.h
index 72f807f41..a93df774a 100644
--- a/src/qdoc/qdocindexfiles.h
+++ b/src/qdoc/qdocindexfiles.h
@@ -63,9 +63,9 @@ class QDocIndexFiles
QDocIndexFiles();
~QDocIndexFiles();
- void readIndexes(const QStringList& indexFiles);
- void readIndexFile(const QString& path);
- void readIndexSection(QXmlStreamReader &reader, Node* current, const QString& indexUrl);
+ void readIndexes(const QStringList &indexFiles);
+ void readIndexFile(const QString &path);
+ void readIndexSection(QXmlStreamReader &reader, Node *current, const QString &indexUrl);
void insertTarget(TargetRec::TargetType type, const QXmlStreamAttributes &attributes, Node *node);
void resolveIndex();
@@ -77,10 +77,10 @@ class QDocIndexFiles
private:
static QDocIndexFiles* qdocIndexFiles_;
- QDocDatabase* qdb_;
- Generator* gen_;
+ QDocDatabase *qdb_;
+ Generator *gen_;
QString project_;
- QVector<QPair<ClassNode*,QString> > basesList_;
+ QVector<QPair<ClassNode *, QString> > basesList_;
};
QT_END_NAMESPACE
diff --git a/src/qdoc/qdoctagfiles.cpp b/src/qdoc/qdoctagfiles.cpp
index 718aa8768..41d485444 100644
--- a/src/qdoc/qdoctagfiles.cpp
+++ b/src/qdoc/qdoctagfiles.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
This class handles the generation of the qdoc tag file.
*/
-QDocTagFiles* QDocTagFiles::qdocTagFiles_ = nullptr;
+QDocTagFiles *QDocTagFiles::qdocTagFiles_ = nullptr;
/*!
Constructs the singleton. \a qdb is the pointer to the
@@ -72,7 +72,7 @@ QDocTagFiles::~QDocTagFiles()
Creates the singleton. Allows only one instance of the class
to be created. Returns a pointer to the singleton.
*/
-QDocTagFiles* QDocTagFiles::qdocTagFiles()
+QDocTagFiles *QDocTagFiles::qdocTagFiles()
{
if (qdocTagFiles_ == nullptr)
qdocTagFiles_ = new QDocTagFiles;
@@ -115,7 +115,7 @@ void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter &writer, const Aggr
default:
continue;
}
- const Aggregate *aggregate = static_cast<const Aggregate*>(node);
+ const Aggregate *aggregate = static_cast<const Aggregate *>(node);
QString access = "public";
if (node->isProtected())
@@ -136,10 +136,10 @@ void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter &writer, const Aggr
writer.writeTextElement("filename", gen_->fullDocumentLocation(node, false));
// Classes contain information about their base classes.
- const ClassNode* classNode = static_cast<const ClassNode*>(node);
+ const ClassNode *classNode = static_cast<const ClassNode *>(node);
QList<RelatedClass> bases = classNode->baseClasses();
foreach (const RelatedClass& related, bases) {
- ClassNode* n = related.node_;
+ ClassNode *n = related.node_;
if (n)
writer.writeTextElement("base", n->name());
}
@@ -248,7 +248,7 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
the type of function being described.
*/
- const FunctionNode* functionNode = static_cast<const FunctionNode*>(node);
+ const FunctionNode *functionNode = static_cast<const FunctionNode *>(node);
writer.writeAttribute("protection", access);
writer.writeAttribute("virtualness", functionNode->virtualness());
writer.writeAttribute("static", functionNode->isStatic() ? "yes" : "no");
@@ -278,7 +278,7 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
break;
case Node::Property:
{
- const PropertyNode* propertyNode = static_cast<const PropertyNode*>(node);
+ 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('#'));
@@ -290,7 +290,7 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
break;
case Node::Enum:
{
- const EnumNode* enumNode = static_cast<const EnumNode*>(node);
+ const EnumNode *enumNode = static_cast<const EnumNode *>(node);
writer.writeTextElement("name", objName);
QStringList pieces = gen_->fullDocumentLocation(node, false).split(QLatin1Char('#'));
writer.writeTextElement("anchor", pieces[1]);
@@ -309,7 +309,7 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
break;
case Node::Typedef:
{
- const TypedefNode* typedefNode = static_cast<const TypedefNode*>(node);
+ const TypedefNode *typedefNode = static_cast<const TypedefNode *>(node);
if (typedefNode->associatedEnum())
writer.writeAttribute("type", typedefNode->associatedEnum()->fullDocumentName());
else
@@ -333,7 +333,7 @@ void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter &writer, const Aggreg
/*!
Writes a tag file named \a fileName.
*/
-void QDocTagFiles::generateTagFile(const QString& fileName, Generator* g)
+void QDocTagFiles::generateTagFile(const QString &fileName, Generator *g)
{
QFile file(fileName);
QFileInfo fileInfo(fileName);
diff --git a/src/qdoc/qdoctagfiles.h b/src/qdoc/qdoctagfiles.h
index e1f4eccce..e1b8b5f73 100644
--- a/src/qdoc/qdoctagfiles.h
+++ b/src/qdoc/qdoctagfiles.h
@@ -42,20 +42,20 @@ class QDocTagFiles
friend class QDocDatabase;
private:
- static QDocTagFiles* qdocTagFiles();
+ static QDocTagFiles *qdocTagFiles();
static void destroyQDocTagFiles();
QDocTagFiles();
~QDocTagFiles();
- void generateTagFileCompounds(QXmlStreamWriter& writer, const Aggregate* inner);
- void generateTagFileMembers(QXmlStreamWriter& writer, const Aggregate* inner);
- void generateTagFile(const QString& fileName, Generator* g);
+ void generateTagFileCompounds(QXmlStreamWriter &writer, const Aggregate *inner);
+ void generateTagFileMembers(QXmlStreamWriter &writer, const Aggregate *inner);
+ void generateTagFile(const QString &fileName, Generator *g);
private:
- static QDocTagFiles* qdocTagFiles_;
- QDocDatabase* qdb_;
- Generator* gen_;
+ static QDocTagFiles *qdocTagFiles_;
+ QDocDatabase *qdb_;
+ Generator *gen_;
};
QT_END_NAMESPACE
diff --git a/src/qdoc/qmlcodemarker.cpp b/src/qdoc/qmlcodemarker.cpp
index 5e9af282c..fe39e6e54 100644
--- a/src/qdoc/qmlcodemarker.cpp
+++ b/src/qdoc/qmlcodemarker.cpp
@@ -141,7 +141,7 @@ QString QmlCodeMarker::markedUpFullName(const Node *node, const Node *relative)
}
}
-QString QmlCodeMarker::markedUpIncludes(const QStringList& includes)
+QString QmlCodeMarker::markedUpIncludes(const QStringList &includes)
{
QString code;
@@ -154,13 +154,13 @@ QString QmlCodeMarker::markedUpIncludes(const QStringList& includes)
return addMarkUp(code, nullptr, location);
}
-QString QmlCodeMarker::functionBeginRegExp(const QString& funcName)
+QString QmlCodeMarker::functionBeginRegExp(const QString &funcName)
{
return QLatin1Char('^') + QRegExp::escape("function " + funcName) + QLatin1Char('$');
}
-QString QmlCodeMarker::functionEndRegExp(const QString& /* funcName */)
+QString QmlCodeMarker::functionEndRegExp(const QString &/* funcName */)
{
return "^\\}$";
}
diff --git a/src/qdoc/qmlcodeparser.cpp b/src/qdoc/qmlcodeparser.cpp
index 61dc22ce6..8b0b4dcaa 100644
--- a/src/qdoc/qmlcodeparser.cpp
+++ b/src/qdoc/qmlcodeparser.cpp
@@ -114,7 +114,7 @@ QStringList QmlCodeParser::sourceFileNameFilter()
If it can't open the file at \a filePath, it reports an error
and returns without doing anything.
*/
-void QmlCodeParser::parseSourceFile(const Location& location, const QString& filePath)
+void QmlCodeParser::parseSourceFile(const Location &location, const QString &filePath)
{
QFile in(filePath);
currentFile_ = filePath;
@@ -167,7 +167,7 @@ static QSet<QString> topicCommands_;
/*!
Returns the set of strings representing the topic commands.
*/
-const QSet<QString>& QmlCodeParser::topicCommands()
+const QSet<QString> &QmlCodeParser::topicCommands()
{
if (topicCommands_.isEmpty()) {
topicCommands_ << COMMAND_VARIABLE
diff --git a/src/qdoc/qmlcodeparser.h b/src/qdoc/qmlcodeparser.h
index 163495591..8ccc06160 100644
--- a/src/qdoc/qmlcodeparser.h
+++ b/src/qdoc/qmlcodeparser.h
@@ -57,11 +57,11 @@ public:
QmlCodeParser();
virtual ~QmlCodeParser();
- void initializeParser(const Config& config) override;
+ void initializeParser(const Config &config) override;
void terminateParser() override;
QString language() override;
QStringList sourceFileNameFilter() override;
- void parseSourceFile(const Location& location, const QString& filePath) override;
+ void parseSourceFile(const Location &location, const QString &filePath) override;
#ifndef QT_NO_DECLARATIVE
/* Copied from src/declarative/qml/qdeclarativescriptparser.cpp */
@@ -69,7 +69,7 @@ public:
#endif
protected:
- const QSet<QString>& topicCommands();
+ const QSet<QString> &topicCommands();
private:
#ifndef QT_NO_DECLARATIVE
diff --git a/src/qdoc/qmlmarkupvisitor.cpp b/src/qdoc/qmlmarkupvisitor.cpp
index 9613b997e..37a23c072 100644
--- a/src/qdoc/qmlmarkupvisitor.cpp
+++ b/src/qdoc/qmlmarkupvisitor.cpp
@@ -90,7 +90,7 @@ static const QString slt = QLatin1String("&lt;");
static const QString sgt = QLatin1String("&gt;");
static const QString squot = QLatin1String("&quot;");
-QString QmlMarkupVisitor::protect(const QString& str)
+QString QmlMarkupVisitor::protect(const QString &str)
{
int n = str.length();
QString marked;
diff --git a/src/qdoc/qmlvisitor.cpp b/src/qdoc/qmlvisitor.cpp
index 7f36fdb2e..e84d9f199 100644
--- a/src/qdoc/qmlvisitor.cpp
+++ b/src/qdoc/qmlvisitor.cpp
@@ -110,7 +110,7 @@ QQmlJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) cons
class QmlSignatureParser
{
public:
- QmlSignatureParser(FunctionNode* func, const QString& signature, const Location& loc);
+ QmlSignatureParser(FunctionNode *func, const QString &signature, const Location &loc);
void readToken() { tok_ = tokenizer_->getToken(); }
QString lexeme() { return tokenizer_->lexeme(); }
QString previousLexeme() { return tokenizer_->previousLexeme(); }
@@ -121,13 +121,13 @@ class QmlSignatureParser
bool matchFunctionDecl();
private:
- QString signature_;
- QStringList names_;
- QString funcName_;
- Tokenizer* tokenizer_;
- int tok_;
- FunctionNode* func_;
- const Location& location_;
+ QString signature_;
+ QStringList names_;
+ QString funcName_;
+ Tokenizer *tokenizer_;
+ int tok_;
+ FunctionNode *func_;
+ const Location &location_;
};
/*!
@@ -139,7 +139,7 @@ class QmlSignatureParser
If a qdoc comment is found for \a location, true is returned.
If a comment is not found there, false is returned.
*/
-bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Node* node)
+bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Node *node)
{
QQmlJS::AST::SourceLocation loc = precedingComment(location.begin());
@@ -153,10 +153,10 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Nod
finish.setColumnNo(loc.startColumn);
Doc doc(start, finish, source.mid(1), commands_, topics_);
- const TopicList& topicsUsed = doc.topicsUsed();
+ const TopicList &topicsUsed = doc.topicsUsed();
NodeList nodes;
- Node* nodePassedIn = node;
- Aggregate* parent = nodePassedIn->parent();
+ Node *nodePassedIn = node;
+ Aggregate *parent = nodePassedIn->parent();
node->setDoc(doc);
nodes.append(node);
if (topicsUsed.size() > 0) {
@@ -176,7 +176,7 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Nod
}
else {
bool isAttached = topic.contains(QLatin1String("attached"));
- QmlPropertyNode* n = parent->hasQmlProperty(qpa.name_, isAttached);
+ QmlPropertyNode *n = parent->hasQmlProperty(qpa.name_, isAttached);
if (n == nullptr)
n = new QmlPropertyNode(parent, qpa.name_, qpa.type_, isAttached);
n->setLocation(doc.location());
@@ -195,7 +195,7 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Nod
qDebug() << " FAILED TO PARSE QML OR JS PROPERTY:" << topic << args;
} else if (topic.endsWith(QLatin1String("method"))) {
if (node->isFunction()) {
- FunctionNode* fn = static_cast<FunctionNode*>(node);
+ FunctionNode *fn = static_cast<FunctionNode *>(node);
QmlSignatureParser qsp(fn, args, doc.location());
if (topic == COMMAND_JSMETHOD || topic == COMMAND_JSATTACHEDMETHOD)
fn->changeMetaness(FunctionNode::QmlMethod, FunctionNode::JsMethod);
@@ -217,7 +217,7 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Nod
return false;
}
-QmlSignatureParser::QmlSignatureParser(FunctionNode* func, const QString& signature, const Location& loc)
+QmlSignatureParser::QmlSignatureParser(FunctionNode *func, const QString &signature, const Location &loc)
: signature_(signature), func_(func), location_(loc)
{
QByteArray latin1 = signature.toLatin1();
@@ -405,8 +405,8 @@ bool QmlSignatureParser::matchFunctionDecl()
are found, a qdoc warning is emitted and false is
returned.
*/
-bool QmlDocVisitor::splitQmlPropertyArg(const Doc& doc,
- const QString& arg,
+bool QmlDocVisitor::splitQmlPropertyArg(const Doc &doc,
+ const QString &arg,
QmlPropArgs& qpa)
{
qpa.clear();
@@ -443,10 +443,10 @@ bool QmlDocVisitor::splitQmlPropertyArg(const Doc& doc,
Applies the metacommands found in the comment.
*/
void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
- Node* node,
- Doc& doc)
+ Node *node,
+ Doc &doc)
{
- QDocDatabase* qdb = QDocDatabase::qdocDB();
+ QDocDatabase *qdb = QDocDatabase::qdocDB();
QSet<QString> metacommands = doc.metaCommandsUsed();
if (metacommands.count() > 0) {
metacommands.subtract(topics_);
@@ -469,7 +469,7 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
if (node->name() == args[0].first)
doc.location().warning(tr("%1 tries to inherit itself").arg(args[0].first));
else if (node->isQmlType() || node->isJsType()) {
- QmlTypeNode *qmlType = static_cast<QmlTypeNode*>(node);
+ QmlTypeNode *qmlType = static_cast<QmlTypeNode *>(node);
qmlType->setQmlBaseName(args[0].first);
}
}
@@ -551,7 +551,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition)
QmlTypeNode *component = nullptr;
Node *candidate = current ->findChildNode(name, Node::QML);
if (candidate != nullptr)
- component = static_cast<QmlTypeNode*>(candidate);
+ component = static_cast<QmlTypeNode *>(candidate);
else
component = new QmlTypeNode(current, name);
component->setTitle(name);
@@ -682,7 +682,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiPublicMember *member)
QmlTypeNode *qmlType = static_cast<QmlTypeNode *>(current);
if (qmlType) {
QString name = member->name.toString();
- QmlPropertyNode* qmlPropNode = qmlType->hasQmlProperty(name);
+ QmlPropertyNode *qmlPropNode = qmlType->hasQmlProperty(name);
if (qmlPropNode == nullptr)
qmlPropNode = new QmlPropertyNode(qmlType, name, type, false);
qmlPropNode->markReadOnly(member->isReadonlyMember);
@@ -767,12 +767,12 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiScriptBinding* )
if (current->isQmlType() || current->isJsType()) {
QString handler = sb->qualifiedId->name.toString();
if (handler.length() > 2 && handler.startsWith("on") && handler.at(2).isUpper()) {
- QmlTypeNode* qmlType = static_cast<QmlTypeNode*>(current);
+ QmlTypeNode *qmlType = static_cast<QmlTypeNode*>(current);
if (qmlType) {
FunctionNode::Metaness metaness = FunctionNode::QmSignalHandler;
if (qmlType->isJsType())
metaness = FunctionNode::JsSignalHandler;
- FunctionNode* qmlSH = new FunctionNode(metaness, current, handler);
+ FunctionNode *qmlSH = new FunctionNode(metaness, current, handler);
applyDocumentation(sb->firstSourceLocation(), qmlSH);
}
}
diff --git a/src/qdoc/qmlvisitor.h b/src/qdoc/qmlvisitor.h
index 50250d222..c30b08350 100644
--- a/src/qdoc/qmlvisitor.h
+++ b/src/qdoc/qmlvisitor.h
@@ -100,9 +100,9 @@ private:
QString getFullyQualifiedId(QQmlJS::AST::UiQualifiedId *id);
QQmlJS::AST::SourceLocation precedingComment(quint32 offset) const;
bool applyDocumentation(QQmlJS::AST::SourceLocation location, Node *node);
- void applyMetacommands(QQmlJS::AST::SourceLocation location, Node* node, Doc& doc);
- bool splitQmlPropertyArg(const Doc& doc,
- const QString& arg,
+ void applyMetacommands(QQmlJS::AST::SourceLocation location, Node *node, Doc &doc);
+ bool splitQmlPropertyArg(const Doc &doc,
+ const QString &arg,
QmlPropArgs& qpa);
QQmlJS::Engine *engine;
diff --git a/src/qdoc/quoter.cpp b/src/qdoc/quoter.cpp
index 0e006d49f..b54d959e4 100644
--- a/src/qdoc/quoter.cpp
+++ b/src/qdoc/quoter.cpp
@@ -77,26 +77,26 @@ QStringList Quoter::splitLines(const QString &line)
Transforms 'int x = 3 + 4' into 'int x=3+4'. A white space is kept
between 'int' and 'x' because it is meaningful in C++.
*/
-static void trimWhiteSpace( QString& str )
+static void trimWhiteSpace(QString &str)
{
enum { Normal, MetAlnum, MetSpace } state = Normal;
const int n = str.length();
int j = -1;
QChar *d = str.data();
- for ( int i = 0; i != n; ++i ) {
+ for (int i = 0; i != n; ++i) {
const QChar c = d[i];
- if ( c.isLetterOrNumber() ) {
- if ( state == Normal ) {
+ if (c.isLetterOrNumber()) {
+ if (state == Normal) {
state = MetAlnum;
} else {
- if ( state == MetSpace )
+ if (state == MetSpace)
str[++j] = c;
state = Normal;
}
str[++j] = c;
- } else if ( c.isSpace() ) {
- if ( state == MetAlnum )
+ } else if (c.isSpace()) {
+ if (state == MetAlnum)
state = MetSpace;
} else {
state = Normal;
@@ -107,7 +107,7 @@ static void trimWhiteSpace( QString& str )
}
Quoter::Quoter()
- : silent( false )
+ : silent(false)
{
/* We're going to hard code these delimiters:
* C++, Qt, Qt Script, Java:
@@ -138,9 +138,9 @@ void Quoter::reset()
codeLocation = Location::null;
}
-void Quoter::quoteFromFile( const QString& userFriendlyFilePath,
- const QString& plainCode,
- const QString& markedCode )
+void Quoter::quoteFromFile(const QString &userFriendlyFilePath,
+ const QString &plainCode,
+ const QString &markedCode)
{
silent = false;
@@ -165,7 +165,7 @@ void Quoter::quoteFromFile( const QString& userFriendlyFilePath,
Newlines are preserved because they affect codeLocation.
*/
- codeLocation = Location( userFriendlyFilePath );
+ codeLocation = Location(userFriendlyFilePath);
plainLines = splitLines(plainCode);
markedLines = splitLines(markedCode);
@@ -178,33 +178,33 @@ void Quoter::quoteFromFile( const QString& userFriendlyFilePath,
Squeeze blanks (cat -s).
*/
QStringList::Iterator m = markedLines.begin();
- while ( m != markedLines.end() ) {
- replaceMultipleNewlines( *m );
+ while (m != markedLines.end()) {
+ replaceMultipleNewlines(*m);
++m;
}
codeLocation.start();
}
-QString Quoter::quoteLine( const Location& docLocation, const QString& command,
- const QString& pattern )
+QString Quoter::quoteLine(const Location &docLocation, const QString &command,
+ const QString &pattern)
{
- if ( plainLines.isEmpty() ) {
+ if (plainLines.isEmpty()) {
failedAtEnd( docLocation, command );
return QString();
}
- if ( pattern.isEmpty() ) {
- docLocation.warning( tr("Missing pattern after '\\%1'").arg(command) );
+ if (pattern.isEmpty()) {
+ docLocation.warning(tr("Missing pattern after '\\%1'").arg(command));
return QString();
}
- if ( match(docLocation, pattern, plainLines.first()) )
+ if (match(docLocation, pattern, plainLines.first()))
return getLine();
- if ( !silent ) {
- docLocation.warning( tr("Command '\\%1' failed").arg(command) );
- codeLocation.warning( tr("Pattern '%1' didn't match here")
- .arg(pattern) );
+ if (!silent) {
+ docLocation.warning(tr("Command '\\%1' failed").arg(command));
+ codeLocation.warning(tr("Pattern '%1' didn't match here")
+ .arg(pattern));
silent = true;
}
return QString();
@@ -252,40 +252,40 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif
return t;
}
-QString Quoter::quoteTo( const Location& docLocation, const QString& command,
- const QString& pattern )
+QString Quoter::quoteTo(const Location &docLocation, const QString &command,
+ const QString &pattern)
{
QString t;
QString comment = commentForCode();
- if ( pattern.isEmpty() ) {
- while ( !plainLines.isEmpty() ) {
+ if (pattern.isEmpty()) {
+ while (!plainLines.isEmpty()) {
QString line = plainLines.first();
t += removeSpecialLines(line, comment);
}
} else {
- while ( !plainLines.isEmpty() ) {
- if ( match(docLocation, pattern, plainLines.first()) ) {
+ while (!plainLines.isEmpty()) {
+ if (match(docLocation, pattern, plainLines.first())) {
return t;
}
t += getLine();
}
- failedAtEnd( docLocation, command );
+ failedAtEnd(docLocation, command);
}
return t;
}
-QString Quoter::quoteUntil( const Location& docLocation, const QString& command,
- const QString& pattern )
+QString Quoter::quoteUntil(const Location &docLocation, const QString &command,
+ const QString &pattern)
{
- QString t = quoteTo( docLocation, command, pattern );
+ QString t = quoteTo(docLocation, command, pattern);
t += getLine();
return t;
}
QString Quoter::getLine(int unindent)
{
- if ( plainLines.isEmpty() )
+ if (plainLines.isEmpty())
return QString();
plainLines.removeFirst();
@@ -297,42 +297,42 @@ QString Quoter::getLine(int unindent)
t = t.mid(i);
t += QLatin1Char('\n');
- codeLocation.advanceLines( t.count( QLatin1Char('\n') ) );
+ codeLocation.advanceLines(t.count(QLatin1Char('\n')));
return t;
}
-bool Quoter::match( const Location& docLocation, const QString& pattern0,
- const QString& line )
+bool Quoter::match(const Location &docLocation, const QString &pattern0,
+ const QString &line)
{
QString str = line;
- while ( str.endsWith(QLatin1Char('\n')) )
- str.truncate( str.length() - 1 );
+ while (str.endsWith(QLatin1Char('\n')))
+ str.truncate(str.length() - 1);
QString pattern = pattern0;
- if ( pattern.startsWith(QLatin1Char('/'))
+ if (pattern.startsWith(QLatin1Char('/'))
&& pattern.endsWith(QLatin1Char('/'))
- && pattern.length() > 2 ) {
- QRegExp rx( pattern.mid(1, pattern.length() - 2) );
- if ( !silent && !rx.isValid() ) {
- docLocation.warning( tr("Invalid regular expression '%1'")
- .arg(rx.pattern()) );
+ && pattern.length() > 2) {
+ QRegExp rx(pattern.mid(1, pattern.length() - 2));
+ if (!silent && !rx.isValid()) {
+ docLocation.warning(tr("Invalid regular expression '%1'")
+ .arg(rx.pattern()));
silent = true;
}
- return str.indexOf( rx ) != -1;
+ return str.indexOf(rx) != -1;
}
trimWhiteSpace(str);
trimWhiteSpace(pattern);
return str.indexOf(pattern) != -1;
}
-void Quoter::failedAtEnd( const Location& docLocation, const QString& command )
+void Quoter::failedAtEnd(const Location &docLocation, const QString &command)
{
if (!silent && !command.isEmpty()) {
- if ( codeLocation.filePath().isEmpty() ) {
- docLocation.warning( tr("Unexpected '\\%1'").arg(command) );
+ if (codeLocation.filePath().isEmpty() ) {
+ docLocation.warning(tr("Unexpected '\\%1'").arg(command));
} else {
- docLocation.warning( tr("Command '\\%1' failed at end of file '%2'")
- .arg(command).arg(codeLocation.filePath()) );
+ docLocation.warning(tr("Command '\\%1' failed at end of file '%2'")
+ .arg(command).arg(codeLocation.filePath()));
}
silent = true;
}
diff --git a/src/qdoc/quoter.h b/src/qdoc/quoter.h
index d48376b2c..6dec63641 100644
--- a/src/qdoc/quoter.h
+++ b/src/qdoc/quoter.h
@@ -48,23 +48,23 @@ public:
Quoter();
void reset();
- void quoteFromFile( const QString& userFriendlyFileName,
- const QString& plainCode, const QString& markedCode );
- QString quoteLine( const Location& docLocation, const QString& command,
- const QString& pattern );
- QString quoteTo( const Location& docLocation, const QString& command,
- const QString& pattern );
- QString quoteUntil( const Location& docLocation, const QString& command,
- const QString& pattern );
+ void quoteFromFile(const QString &userFriendlyFileName,
+ const QString &plainCode, const QString &markedCode);
+ QString quoteLine(const Location &docLocation, const QString &command,
+ const QString &pattern);
+ QString quoteTo(const Location &docLocation, const QString &command,
+ const QString &pattern);
+ QString quoteUntil(const Location &docLocation, const QString &command,
+ const QString &pattern);
QString quoteSnippet(const Location &docLocation, const QString &identifier);
static QStringList splitLines(const QString &line);
private:
QString getLine(int unindent = 0);
- void failedAtEnd( const Location& docLocation, const QString& command );
- bool match( const Location& docLocation, const QString& pattern,
- const QString& line );
+ void failedAtEnd(const Location &docLocation, const QString &command);
+ bool match(const Location &docLocation, const QString &pattern,
+ const QString &line);
QString commentForCode() const;
QString removeSpecialLines(const QString &line, const QString &comment,
int unindent = 0);
diff --git a/src/qdoc/sections.cpp b/src/qdoc/sections.cpp
index 978e856f2..4b4712180 100644
--- a/src/qdoc/sections.cpp
+++ b/src/qdoc/sections.cpp
@@ -116,7 +116,7 @@ void Section::clear()
a set of nodes into equivalence classes. If \a name is provided,
start with that name. Itherwise start with the name in \a node.
*/
-QString Section::sortName(const Node *node, const QString* name)
+QString Section::sortName(const Node *node, const QString *name)
{
QString nodeName;
if (name != nullptr)
@@ -176,7 +176,7 @@ void Section::insert(Node *node)
bool irrelevant = false;
bool inherited = false;
if (!node->isRelatedNonmember()) {
- Aggregate* p = node->parent();
+ Aggregate *p = node->parent();
if (!p->isNamespace() && p != aggregate_) {
if ((!p->isQmlType() && !p->isJsType()) || !p->isAbstract())
inherited = true;
@@ -193,7 +193,7 @@ void Section::insert(Node *node)
else if (node->isClassNode() || node->isEnumType() || node->isTypedef() || node->isVariable()) {
irrelevant = (inherited && style_ != AllMembers);
if (!irrelevant && style_ == Details && node->isTypedef()) {
- const TypedefNode* tdn = static_cast<const TypedefNode*>(node);
+ const TypedefNode *tdn = static_cast<const TypedefNode *>(node);
if (tdn->associatedEnum())
irrelevant = true;
}
@@ -230,10 +230,10 @@ void Section::insert(Node *node)
That is, false is returned if the \a node is already in
the map.
*/
-bool Section::insertReimplementedMember(Node* node)
+bool Section::insertReimplementedMember(Node *node)
{
if (!node->isPrivate() && !node->isRelatedNonmember()) {
- const FunctionNode* fn = static_cast<const FunctionNode*>(node);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(node);
if (!fn->overridesThis().isEmpty() && (status_ == Active)) {
if (fn->parent() == aggregate_) {
QString key = sortName(fn);
@@ -252,10 +252,10 @@ bool Section::insertReimplementedMember(Node* node)
node, append it to the list of class maps, and return a
pointer to the new class map.
*/
-ClassMap *Section::newClassMap(const Aggregate* aggregate)
+ClassMap *Section::newClassMap(const Aggregate *aggregate)
{
ClassMap *classMap = new ClassMap;
- classMap->first = static_cast<const QmlTypeNode*>(aggregate);
+ classMap->first = static_cast<const QmlTypeNode *>(aggregate);
classMapList_.append(classMap);
return classMap;
}
@@ -342,7 +342,7 @@ Sections::Sections(Aggregate *aggregate) : aggregate_(aggregate)
This constructor builds a vector of sections from the \e since
node map, \a nsmap
*/
-Sections::Sections(const NodeMultiMap& nsmap) : aggregate_(nullptr)
+Sections::Sections(const NodeMultiMap &nsmap) : aggregate_(nullptr)
{
initSections();
if (nsmap.isEmpty())
@@ -350,7 +350,7 @@ Sections::Sections(const NodeMultiMap& nsmap) : aggregate_(nullptr)
SectionVector &sections = sinceSections();
NodeMultiMap::const_iterator n = nsmap.constBegin();
while (n != nsmap.constEnd()) {
- Node* node = n.value();
+ Node *node = n.value();
switch (node->nodeType()) {
case Node::JsType:
case Node::QmlType:
@@ -371,7 +371,7 @@ Sections::Sections(const NodeMultiMap& nsmap) : aggregate_(nullptr)
sections[SinceTypedefs].appendMember(node);
break;
case Node::Function: {
- const FunctionNode* fn = static_cast<const FunctionNode*>(node);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(node);
switch (fn->metaness()) {
case FunctionNode::JsSignal:
case FunctionNode::QmlSignal:
@@ -389,7 +389,7 @@ Sections::Sections(const NodeMultiMap& nsmap) : aggregate_(nullptr)
if (fn->isMacro())
sections[SinceMacros].appendMember(node);
else {
- Node* p = fn->parent();
+ Node *p = fn->parent();
if (p) {
if (p->isClassNode())
sections[SinceMemberFunctions].appendMember(node);
@@ -636,7 +636,7 @@ void Sections::stdRefPageSwitch(SectionVector &v, Node *n, Node *t)
return;
case Node::Variable:
{
- const VariableNode* var = static_cast<const VariableNode*>(t);
+ const VariableNode *var = static_cast<const VariableNode *>(t);
if (!var->doc().isEmpty()) {
if (var->isStatic())
v[StdStaticVariables].insert(n);
@@ -675,10 +675,10 @@ void Sections::stdRefPageSwitch(SectionVector &v, Node *n, Node *t)
*/
void Sections::buildStdRefPageSections()
{
- const NamespaceNode* ns = nullptr;
+ const NamespaceNode *ns = nullptr;
bool documentAll = true; // document all the children
if (aggregate_->isNamespace()) {
- ns = static_cast<const NamespaceNode*>(aggregate_);
+ ns = static_cast<const NamespaceNode *>(aggregate_);
if (!ns->hasDoc())
documentAll = false; // only document children that have documentation
}
@@ -728,7 +728,7 @@ void Sections::distributeNodeInSummaryVector(SectionVector &sv, Node *n)
if (n->isSharedCommentNode())
return;
if (n->isFunction()) {
- FunctionNode *fn = static_cast<FunctionNode*>(n);
+ FunctionNode *fn = static_cast<FunctionNode *>(n);
if (fn->isRelatedNonmember()) {
if (fn->isMacro())
sv[Macros].insert(n);
@@ -830,7 +830,7 @@ void Sections::distributeNodeInDetailsVector(SectionVector &dv, Node *n)
}
if (t->isFunction()) {
- FunctionNode *fn = static_cast<FunctionNode*>(t);
+ FunctionNode *fn = static_cast<FunctionNode *>(t);
if (fn->isRelatedNonmember()) {
if (fn->isMacro())
dv[DetailsMacros].insert(n);
@@ -881,13 +881,13 @@ void Sections::distributeQmlNodeInDetailsVector(SectionVector &dv, Node *n)
}
if (t->isQmlProperty() || t->isJsProperty()) {
- QmlPropertyNode* pn = static_cast<QmlPropertyNode*>(t);
+ QmlPropertyNode *pn = static_cast<QmlPropertyNode *>(t);
if (pn->isAttached())
dv[QmlAttachedProperties].insert(n);
else
dv[QmlProperties].insert(n);
} else if (t->isFunction()) {
- FunctionNode* fn = static_cast<FunctionNode*>(t);
+ FunctionNode *fn = static_cast<FunctionNode *>(t);
if (fn->isQmlSignal() || fn->isJsSignal()) {
if (fn->isAttached())
dv[QmlAttachedSignals].insert(n);
@@ -909,13 +909,13 @@ void Sections::distributeQmlNodeInSummaryVector(SectionVector &sv, Node *n)
if (n->isSharedCommentNode())
return;
if (n->isQmlProperty() || n->isJsProperty()) {
- QmlPropertyNode* pn = static_cast<QmlPropertyNode*>(n);
+ QmlPropertyNode *pn = static_cast<QmlPropertyNode *>(n);
if (pn->isAttached())
sv[QmlAttachedProperties].insert(pn);
else
sv[QmlProperties].insert(pn);
} else if (n->isFunction()) {
- FunctionNode* fn = static_cast<FunctionNode*>(n);
+ FunctionNode *fn = static_cast<FunctionNode *>(n);
if (fn->isQmlSignal() || fn->isJsSignal()) {
if (fn->isAttached())
sv[QmlAttachedSignals].insert(fn);
@@ -932,7 +932,7 @@ void Sections::distributeQmlNodeInSummaryVector(SectionVector &sv, Node *n)
}
}
-static void pushBaseClasses(QStack<ClassNode*> &stack, ClassNode *cn)
+static void pushBaseClasses(QStack<ClassNode *> &stack, ClassNode *cn)
{
QList<RelatedClass>::ConstIterator r = cn->baseClasses().constBegin();
while (r != cn->baseClasses().constEnd()) {
@@ -956,7 +956,7 @@ void Sections::buildStdCppClassRefPageSections()
documentAll = false;
NodeList::ConstIterator c = aggregate_->constBegin();
while (c != aggregate_->constEnd()) {
- Node* n = *c;
+ Node *n = *c;
if (!n->isPrivate() && !n->isProperty() && !n->isRelatedNonmember())
allMembers.insert(n);
if (!documentAll && !n->hasDoc()) {
@@ -976,14 +976,14 @@ void Sections::buildStdCppClassRefPageSections()
}
}
- QStack<ClassNode*> stack;
- ClassNode* cn = static_cast<ClassNode*>(aggregate_);
+ QStack<ClassNode *> stack;
+ ClassNode *cn = static_cast<ClassNode *>(aggregate_);
pushBaseClasses(stack, cn);
while (!stack.isEmpty()) {
ClassNode *cn = stack.pop();
c = cn->constBegin();
while (c != cn->constEnd()) {
- Node* n = *c;
+ Node *n = *c;
if (!n->isPrivate() && !n->isProperty())
allMembers.insert(n);
if (!documentAll && !n->hasDoc()) {
@@ -1012,7 +1012,7 @@ void Sections::buildStdQmlTypeRefPageSections()
SectionVector &dv = stdQmlTypeDetailsSections();
Section &allMembers = allMembersSection();
- const Aggregate* qtn = aggregate_;
+ const Aggregate *qtn = aggregate_;
while (true) {
if (!qtn->isAbstract() || !classMap)
classMap = allMembers.newClassMap(qtn);
@@ -1035,7 +1035,7 @@ void Sections::buildStdQmlTypeRefPageSections()
qtn = nullptr;
break;
}
- qtn = static_cast<QmlTypeNode*>(qtn->qmlBaseNode());
+ qtn = static_cast<QmlTypeNode *>(qtn->qmlBaseNode());
if (qtn == nullptr)
break;
if (!qtn->isAbstract())
@@ -1062,7 +1062,7 @@ void Sections::buildStdQmlTypeRefPageSections()
qtn = nullptr;
break;
}
- qtn = static_cast<QmlTypeNode*>(qtn->qmlBaseNode());
+ qtn = static_cast<QmlTypeNode *>(qtn->qmlBaseNode());
}
reduce(sv);
reduce(dv);
diff --git a/src/qdoc/sections.h b/src/qdoc/sections.h
index 704691c41..c2f07cf65 100644
--- a/src/qdoc/sections.h
+++ b/src/qdoc/sections.h
@@ -35,13 +35,13 @@
QT_BEGIN_NAMESPACE
-typedef QMultiMap<QString, Node*> MemberMap; // the string is the member signature
-typedef QPair<const QmlTypeNode*, MemberMap> ClassMap; // the node is the QML type
-typedef QList<ClassMap*> ClassMapList;
+typedef QMultiMap<QString, Node *> MemberMap; // the string is the member signature
+typedef QPair<const QmlTypeNode *, MemberMap> ClassMap; // the node is the QML type
+typedef QList<ClassMap *> ClassMapList;
typedef QPair<QStringList, NodeVector> KeysAndNodes;
-typedef QPair<const QmlTypeNode*, KeysAndNodes> ClassKeysNodes;
-typedef QList<ClassKeysNodes*> ClassKeysNodesList;
+typedef QPair<const QmlTypeNode *, KeysAndNodes> ClassKeysNodes;
+typedef QList<ClassKeysNodes *> ClassKeysNodesList;
class Section
{
@@ -54,33 +54,33 @@ class Section
Section(Style style, Status status);
~Section();
- void init(const QString& title) {
+ void init(const QString &title) {
title_ = title;
}
- void init(const QString& singular,
- const QString& plural) {
+ void init(const QString &singular,
+ const QString &plural) {
singular_ = singular; plural_ = plural;
}
- void init(const QString& title,
- const QString& singular,
- const QString& plural) {
+ void init(const QString &title,
+ const QString &singular,
+ const QString &plural) {
title_ = title; divClass_.clear(); singular_= singular; plural_ = plural;
}
- void init(const QString& title,
- const QString& divClass,
- const QString& singular,
- const QString& plural) {
+ void init(const QString &title,
+ const QString &divClass,
+ const QString &singular,
+ const QString &plural) {
title_ = title; divClass_ = divClass; singular_= singular; plural_ = plural;
}
void insert(Node *node);
- void insert(const QString& key, Node *node) { memberMap_.insertMulti(key, node); }
- bool insertReimplementedMember(Node* node);
+ void insert(const QString &key, Node *node) { memberMap_.insertMulti(key, node); }
+ bool insertReimplementedMember(Node *node);
ClassMap *newClassMap(const Aggregate *aggregate);
void add(ClassMap *classMap, Node *n);
- void appendMember(Node* node) { members_.append(node); }
- void appendReimplementedMember(Node* node) { reimplementedMembers_.append(node); }
+ void appendMember(Node *node) { members_.append(node); }
+ void appendReimplementedMember(Node *node) { reimplementedMembers_.append(node); }
void clear();
void reduce();
@@ -109,7 +109,7 @@ class Section
void setAggregate(Aggregate *t) { aggregate_ = t; }
private:
- QString sortName(const Node *node, const QString* name = nullptr);
+ QString sortName(const Node *node, const QString *name = nullptr);
private:
Style style_;
@@ -135,7 +135,7 @@ class Section
};
typedef QVector<Section> SectionVector;
-typedef QVector<const Section*> SectionPtrVector;
+typedef QVector<const Section *> SectionPtrVector;
class Sections
{
@@ -198,7 +198,7 @@ class Sections
};
Sections(Aggregate *aggregate);
- Sections(const NodeMultiMap& nsmap);
+ Sections(const NodeMultiMap &nsmap);
~Sections();
void initSections();
@@ -237,7 +237,7 @@ class Sections
void initAggregate(SectionVector &v, Aggregate *aggregate);
private:
- Aggregate *aggregate_;
+ Aggregate *aggregate_;
static SectionVector stdSummarySections_;
static SectionVector stdDetailsSections_;
diff --git a/src/qdoc/separator.h b/src/qdoc/separator.h
index ae4d58f7a..69346bd0c 100644
--- a/src/qdoc/separator.h
+++ b/src/qdoc/separator.h
@@ -37,8 +37,8 @@
QT_BEGIN_NAMESPACE
-QString separator( int index, int count );
-QString comma( int index, int count );
+QString separator(int index, int count);
+QString comma(int index, int count);
QT_END_NAMESPACE
diff --git a/src/qdoc/text.cpp b/src/qdoc/text.cpp
index 6fc57106e..c80ef00e3 100644
--- a/src/qdoc/text.cpp
+++ b/src/qdoc/text.cpp
@@ -49,7 +49,7 @@ Text::Text(const QString &str)
operator<<(str);
}
-Text::Text(const Text& text)
+Text::Text(const Text &text)
: first(nullptr), last(nullptr)
{
operator=(text);
@@ -60,7 +60,7 @@ Text::~Text()
clear();
}
-Text& Text::operator=(const Text& text)
+Text &Text::operator=(const Text &text)
{
if (this != &text) {
clear();
@@ -69,17 +69,17 @@ Text& Text::operator=(const Text& text)
return *this;
}
-Text& Text::operator<<(Atom::AtomType atomType)
+Text &Text::operator<<(Atom::AtomType atomType)
{
return operator<<(Atom(atomType));
}
-Text& Text::operator<<(const QString& string)
+Text &Text::operator<<(const QString &string)
{
return operator<<(Atom(Atom::String, string));
}
-Text& Text::operator<<(const Atom& atom)
+Text &Text::operator<<(const Atom& atom)
{
if (atom.count() < 2) {
if (first == nullptr) {
@@ -105,7 +105,7 @@ Text& Text::operator<<(const Atom& atom)
the LinkAtom \a atom and connects the cop;y to the list
in this Text.
*/
-Text& Text::operator<<(const LinkAtom& atom)
+Text &Text::operator<<(const LinkAtom &atom)
{
if (first == nullptr) {
first = new LinkAtom(atom);
@@ -116,9 +116,9 @@ Text& Text::operator<<(const LinkAtom& atom)
return *this;
}
-Text& Text::operator<<(const Text& text)
+Text &Text::operator<<(const Text &text)
{
- const Atom* atom = text.firstAtom();
+ const Atom *atom = text.firstAtom();
while (atom != nullptr) {
operator<<(*atom);
atom = atom->next();
@@ -131,7 +131,7 @@ void Text::stripFirstAtom()
if (first != nullptr) {
if (first == last)
last = nullptr;
- Atom* oldFirst = first;
+ Atom *oldFirst = first;
first = first->next();
delete oldFirst;
}
@@ -140,7 +140,7 @@ void Text::stripFirstAtom()
void Text::stripLastAtom()
{
if (last != nullptr) {
- Atom* oldLast = last;
+ Atom *oldLast = last;
if (first == last) {
first = nullptr;
last = nullptr;
@@ -162,7 +162,7 @@ void Text::stripLastAtom()
QString Text::toString() const
{
QString str;
- const Atom* atom = firstAtom();
+ const Atom *atom = firstAtom();
while (atom != nullptr) {
if (atom->type() == Atom::String ||
atom->type() == Atom::AutoLink ||
@@ -178,7 +178,7 @@ QString Text::toString() const
*/
bool Text::contains(const QString &str) const
{
- const Atom* atom = firstAtom();
+ const Atom *atom = firstAtom();
while (atom != nullptr) {
if (atom->type() == Atom::String ||
atom->type() == Atom::AutoLink ||
@@ -190,10 +190,10 @@ bool Text::contains(const QString &str) const
return false;
}
-Text Text::subText(Atom::AtomType left, Atom::AtomType right, const Atom* from, bool inclusive) const
+Text Text::subText(Atom::AtomType left, Atom::AtomType right, const Atom *from, bool inclusive) const
{
- const Atom* begin = from ? from : firstAtom();
- const Atom* end;
+ const Atom *begin = from ? from : firstAtom();
+ const Atom *end;
while (begin != nullptr && begin->type() != left)
begin = begin->next();
@@ -212,16 +212,16 @@ Text Text::subText(Atom::AtomType left, Atom::AtomType right, const Atom* from,
return subText(begin, end);
}
-Text Text::sectionHeading(const Atom* sectionLeft)
+Text Text::sectionHeading(const Atom *sectionLeft)
{
if (sectionLeft != nullptr) {
- const Atom* begin = sectionLeft;
+ const Atom *begin = sectionLeft;
while (begin != nullptr && begin->type() != Atom::SectionHeadingLeft)
begin = begin->next();
if (begin != nullptr)
begin = begin->next();
- const Atom* end = begin;
+ const Atom *end = begin;
while (end != nullptr && end->type() != Atom::SectionHeadingRight)
end = end->next();
@@ -231,10 +231,10 @@ Text Text::sectionHeading(const Atom* sectionLeft)
return Text();
}
-const Atom* Text::sectionHeadingAtom(const Atom* sectionLeft)
+const Atom *Text::sectionHeadingAtom(const Atom *sectionLeft)
{
if (sectionLeft != nullptr) {
- const Atom* begin = sectionLeft;
+ const Atom *begin = sectionLeft;
while (begin != nullptr && begin->type() != Atom::SectionHeadingLeft)
begin = begin->next();
if (begin != nullptr)
@@ -247,7 +247,7 @@ const Atom* Text::sectionHeadingAtom(const Atom* sectionLeft)
void Text::dump() const
{
- const Atom* atom = firstAtom();
+ const Atom *atom = firstAtom();
while (atom != nullptr) {
QString str = atom->string();
str.replace("\\", "\\\\");
@@ -261,7 +261,7 @@ void Text::dump() const
}
}
-Text Text::subText(const Atom* begin, const Atom* end)
+Text Text::subText(const Atom *begin, const Atom *end)
{
Text text;
if (begin != nullptr) {
@@ -276,7 +276,7 @@ Text Text::subText(const Atom* begin, const Atom* end)
void Text::clear()
{
while (first != nullptr) {
- Atom* atom = first;
+ Atom *atom = first;
first = first->next();
delete atom;
}
@@ -291,8 +291,8 @@ int Text::compare(const Text &text1, const Text &text2)
if (text2.isEmpty())
return 1;
- const Atom* atom1 = text1.firstAtom();
- const Atom* atom2 = text2.firstAtom();
+ const Atom *atom1 = text1.firstAtom();
+ const Atom *atom2 = text2.firstAtom();
for (;;) {
if (atom1->type() != atom2->type())
diff --git a/src/qdoc/text.h b/src/qdoc/text.h
index d0639ae4c..7c31fcde0 100644
--- a/src/qdoc/text.h
+++ b/src/qdoc/text.h
@@ -42,23 +42,23 @@ class Text
public:
Text();
explicit Text(const QString &str);
- Text(const Text& text);
+ Text(const Text &text);
~Text();
- Text& operator=(const Text& text);
+ Text &operator=(const Text &text);
Atom *firstAtom() { return first; }
Atom *lastAtom() { return last; }
- Text& operator<<(Atom::AtomType atomType);
- Text& operator<<(const QString& string);
- Text& operator<<(const Atom& atom);
- Text& operator<<(const LinkAtom& atom);
- Text& operator<<(const Text& text);
+ Text &operator<<(Atom::AtomType atomType);
+ Text &operator<<(const QString &string);
+ Text &operator<<(const Atom& atom);
+ Text &operator<<(const LinkAtom &atom);
+ Text &operator<<(const Text &text);
void stripFirstAtom();
void stripLastAtom();
bool isEmpty() const { return first == nullptr; }
- bool contains(const QString& str) const;
+ bool contains(const QString &str) const;
QString toString() const;
const Atom *firstAtom() const { return first; }
const Atom *lastAtom() const { return last; }
diff --git a/src/qdoc/tokenizer.cpp b/src/qdoc/tokenizer.cpp
index 6c3d6b3d6..ddfe61002 100644
--- a/src/qdoc/tokenizer.cpp
+++ b/src/qdoc/tokenizer.cpp
@@ -116,7 +116,7 @@ static void insertKwordIntoHash(const char *s, int number)
kwordHashTable[k] = number;
}
-Tokenizer::Tokenizer(const Location& loc, QFile &in)
+Tokenizer::Tokenizer(const Location &loc, QFile &in)
{
init();
yyIn = in.readAll();
@@ -124,7 +124,7 @@ Tokenizer::Tokenizer(const Location& loc, QFile &in)
start(loc);
}
-Tokenizer::Tokenizer(const Location& loc, const QByteArray &in)
+Tokenizer::Tokenizer(const Location &loc, const QByteArray &in)
: yyIn(in)
{
init();
@@ -573,7 +573,7 @@ void Tokenizer::init()
parsingMacro = false;
}
-void Tokenizer::start(const Location& loc)
+void Tokenizer::start(const Location &loc)
{
yyTokLoc = loc;
yyCurLoc = loc;
diff --git a/src/qdoc/tokenizer.h b/src/qdoc/tokenizer.h
index 2750bf9b8..2f0c1937c 100644
--- a/src/qdoc/tokenizer.h
+++ b/src/qdoc/tokenizer.h
@@ -88,8 +88,8 @@ class Tokenizer
Q_DECLARE_TR_FUNCTIONS(QDoc::Tokenizer)
public:
- Tokenizer(const Location& loc, const QByteArray &in);
- Tokenizer(const Location& loc, QFile &file);
+ Tokenizer(const Location &loc, const QByteArray &in);
+ Tokenizer(const Location &loc, QFile &file);
~Tokenizer();
@@ -104,7 +104,7 @@ public:
int braceDepth() const { return yyBraceDepth; }
int parenDepth() const { return yyParenDepth; }
int bracketDepth() const { return yyBracketDepth; }
- Location& tokenLocation() { return yyTokLoc; }
+ Location &tokenLocation() { return yyTokLoc; }
static void initialize(const Config &config);
static void terminate();
@@ -112,7 +112,7 @@ public:
private:
void init();
- void start(const Location& loc);
+ void start(const Location &loc);
/*
This limit on the length of a lexeme seems fairly high, but a
doc comment can be arbitrarily long. The previous 65,536 limit
diff --git a/src/qdoc/tree.cpp b/src/qdoc/tree.cpp
index 5fab833ca..14d826ef1 100644
--- a/src/qdoc/tree.cpp
+++ b/src/qdoc/tree.cpp
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
though the pointer to the singleton QDocDatabase.
Tree is being converted to a forest. A static member provides a
- map of Tree* values with the module names as the keys. There is
+ map of Tree *values with the module names as the keys. There is
one Tree in the map for each index file read, and there is one
tree that is not in the map for the module whose documentation
is being generated.
@@ -148,7 +148,7 @@ Node *Tree::findNodeForInclude(const QStringList &path) const
Aggregate *Tree::findAggregate(const QString &name)
{
QStringList path = name.split(QLatin1String("::"));
- return static_cast<Aggregate*>(findNodeRecursive(path, 0, const_cast<NamespaceNode*>(root()), &Node::isFirstClassAggregate));
+ return static_cast<Aggregate *>(findNodeRecursive(path, 0, const_cast<NamespaceNode *>(root()), &Node::isFirstClassAggregate));
}
/*!
@@ -160,8 +160,8 @@ Aggregate *Tree::findAggregate(const QString &name)
ClassNode *Tree::findClassNode(const QStringList &path, const Node *start) const
{
if (start == nullptr)
- start = const_cast<NamespaceNode*>(root());
- return static_cast<ClassNode*>(findNodeRecursive(path, 0, start, &Node::isClassNode));
+ start = const_cast<NamespaceNode *>(root());
+ return static_cast<ClassNode *>(findNodeRecursive(path, 0, start, &Node::isClassNode));
}
/*!
@@ -171,8 +171,8 @@ ClassNode *Tree::findClassNode(const QStringList &path, const Node *start) const
*/
NamespaceNode *Tree::findNamespaceNode(const QStringList &path) const
{
- Node *start = const_cast<NamespaceNode*>(root());
- return static_cast<NamespaceNode*>(findNodeRecursive(path, 0, start, &Node::isNamespace));
+ Node *start = const_cast<NamespaceNode *>(root());
+ return static_cast<NamespaceNode *>(findNodeRecursive(path, 0, start, &Node::isNamespace));
}
/*!
@@ -196,7 +196,7 @@ QmlTypeNode *Tree::findQmlTypeNode(const QStringList &path)
if (qcn != nullptr)
return qcn;
}
- return static_cast<QmlTypeNode*>(findNodeRecursive(path, 0, root(), &Node::isQmlType));
+ return static_cast<QmlTypeNode *>(findNodeRecursive(path, 0, root(), &Node::isQmlType));
}
/*!
@@ -214,7 +214,7 @@ QmlTypeNode *Tree::findQmlTypeNode(const QStringList &path)
Aggregate *Tree::findRelatesNode(const QStringList &path)
{
Node *n = findNodeRecursive(path, 0, root(), &Node::isRelatableType);
- return (((n != nullptr) && n->isAggregate()) ? static_cast<Aggregate*>(n) : nullptr);
+ return (((n != nullptr) && n->isAggregate()) ? static_cast<Aggregate *>(n) : nullptr);
}
/*!
@@ -241,7 +241,7 @@ void Tree::resolveBaseClasses(Aggregate *n)
NodeList::ConstIterator c = n->constBegin();
while (c != n->constEnd()) {
if ((*c)->isClassNode()) {
- ClassNode *cn = static_cast<ClassNode*>(*c);
+ ClassNode *cn = static_cast<ClassNode *>(*c);
QList<RelatedClass> &bases = cn->baseClasses();
QList<RelatedClass>::iterator b = bases.begin();
while (b != bases.end()) {
@@ -265,7 +265,7 @@ void Tree::resolveBaseClasses(Aggregate *n)
n = findClassNode((*b).path_, parent);
}
if (n != nullptr) {
- ClassNode *bcn = static_cast<ClassNode*>(n);
+ ClassNode *bcn = static_cast<ClassNode *>(n);
(*b).node_ = bcn;
bcn->addDerivedClass((*b).access_, cn);
}
@@ -274,7 +274,7 @@ void Tree::resolveBaseClasses(Aggregate *n)
}
resolveBaseClasses(cn);
} else if ((*c)->isNamespace()) {
- resolveBaseClasses(static_cast<NamespaceNode*>(*c));
+ resolveBaseClasses(static_cast<NamespaceNode *>(*c));
}
++c;
}
@@ -287,16 +287,16 @@ void Tree::resolvePropertyOverriddenFromPtrs(Aggregate *n)
NodeList::ConstIterator c = n->constBegin();
while (c != n->constEnd()) {
if ((*c)->isClassNode()) {
- ClassNode *cn = static_cast<ClassNode*>(*c);
+ ClassNode *cn = static_cast<ClassNode *>(*c);
NodeList::ConstIterator p = cn->constBegin();
while (p != cn->constEnd()) {
if ((*p)->isProperty())
- cn->resolvePropertyOverriddenFromPtrs(static_cast<PropertyNode*>(*p));
+ cn->resolvePropertyOverriddenFromPtrs(static_cast<PropertyNode *>(*p));
++p;
}
resolvePropertyOverriddenFromPtrs(cn);
} else if ((*c)->isNamespace()) {
- resolvePropertyOverriddenFromPtrs(static_cast<NamespaceNode*>(*c));
+ resolvePropertyOverriddenFromPtrs(static_cast<NamespaceNode *>(*c));
}
++c;
}
@@ -320,7 +320,7 @@ void Tree::resolveProperties()
NodeList::ConstIterator c = parent->constBegin();
while (c != parent->constEnd()) {
if ((*c)->isFunction()) {
- FunctionNode *function = static_cast<FunctionNode*>(*c);
+ FunctionNode *function = static_cast<FunctionNode *>(*c);
if (function->access() == property->access() &&
(function->status() == property->status() ||
function->doc().isEmpty())) {
@@ -366,8 +366,8 @@ void Tree::resolveCppToQmlLinks()
const NodeList &children = root_.childNodes();
foreach (Node *child, children) {
if (child->isQmlType() || child->isJsType()) {
- QmlTypeNode *qcn = static_cast<QmlTypeNode*>(child);
- ClassNode *cn = const_cast<ClassNode*>(qcn->classNode());
+ QmlTypeNode *qcn = static_cast<QmlTypeNode *>(child);
+ ClassNode *cn = const_cast<ClassNode *>(qcn->classNode());
if (cn)
cn->setQmlElement(qcn);
}
@@ -383,7 +383,7 @@ void Tree::resolveUsingClauses()
const NodeList &children = root_.childNodes();
foreach (Node *child, children) {
if (child->isClassNode()) {
- ClassNode *cn = static_cast<ClassNode*>(child);
+ ClassNode *cn = static_cast<ClassNode *>(child);
QList<UsingClause> &usingClauses = cn->usingClauses();
QList<UsingClause>::iterator uc = usingClauses.begin();
while (uc != usingClauses.end()) {
@@ -415,9 +415,9 @@ void Tree::removePrivateAndInternalBases(NamespaceNode *rootNode)
NodeList::ConstIterator c = rootNode->constBegin();
while (c != rootNode->constEnd()) {
if ((*c)->isClassNode())
- static_cast<ClassNode*>(*c)->removePrivateAndInternalBases();
+ static_cast<ClassNode *>(*c)->removePrivateAndInternalBases();
else if ((*c)->isNamespace())
- removePrivateAndInternalBases(static_cast<NamespaceNode*>(*c));
+ removePrivateAndInternalBases(static_cast<NamespaceNode *>(*c));
++c;
}
}
@@ -471,14 +471,14 @@ Node *Tree::findNodeRecursive(const QStringList &path,
{
if (start == nullptr || path.isEmpty())
return nullptr;
- Node *node = const_cast<Node*>(start);
+ Node *node = const_cast<Node *>(start);
if (!node->isAggregate())
return ((pathIndex >= path.size()) ? node : nullptr);
#if 0
if (pathIndex >= path.size())
return nullptr;
#endif
- Aggregate *current = static_cast<Aggregate*>(node);
+ Aggregate *current = static_cast<Aggregate *>(node);
const NodeList &children = current->childNodes();
const QString &name = path.at(pathIndex);
foreach (Node *n, children) {
@@ -636,7 +636,7 @@ const Node *Tree::matchPathAndTarget(const QStringList &path,
QString name = path.at(idx);
if (node->isAggregate()) {
NodeVector nodes;
- static_cast<const Aggregate*>(node)->findChildren(name, nodes);
+ static_cast<const Aggregate *>(node)->findChildren(name, nodes);
foreach (const Node *n, nodes) {
if (genus != Node::DontCare && n->genus() != genus)
continue;
@@ -647,14 +647,14 @@ const Node *Tree::matchPathAndTarget(const QStringList &path,
}
if (target.isEmpty()) {
if ((idx) == (path.size()-1) && node->isAggregate() && (flags & SearchEnumValues)) {
- const Node *t = static_cast<const Aggregate*>(node)->findEnumNodeForValue(path.at(idx));
+ const Node *t = static_cast<const Aggregate *>(node)->findEnumNodeForValue(path.at(idx));
if (t)
return t;
}
}
if (((genus == Node::CPP) || (genus == Node::DontCare)) &&
node->isClassNode() && (flags & SearchBaseClasses)) {
- ClassList bases = allBaseClasses(static_cast<const ClassNode*>(node));
+ ClassList bases = allBaseClasses(static_cast<const ClassNode *>(node));
foreach (const ClassNode *base, bases) {
const Node *t = matchPathAndTarget(path, idx, target, base, flags, genus, ref);
if (t && ! t->isPrivate())
@@ -718,13 +718,13 @@ const Node *Tree::findNode(const QStringList &path,
// We also ignore module nodes as they are not aggregates and thus have no children.
int tmpFlags = (i < path.size() - 1) ? (flags & ~TypesOnly) | IgnoreModules : flags;
- const Node *next = static_cast<const Aggregate*>(node)->findChildNode(path.at(i), genus, tmpFlags);
+ const Node *next = static_cast<const Aggregate *>(node)->findChildNode(path.at(i), genus, tmpFlags);
if ((next == nullptr) && (flags & SearchEnumValues) && i == path.size()-1) {
- next = static_cast<const Aggregate*>(node)->findEnumNodeForValue(path.at(i));
+ next = static_cast<const Aggregate *>(node)->findEnumNodeForValue(path.at(i));
}
if ((next == nullptr) && ((genus == Node::CPP) || (genus == Node::DontCare)) &&
node->isClassNode() && (flags & SearchBaseClasses)) {
- ClassList bases = allBaseClasses(static_cast<const ClassNode*>(node));
+ ClassList bases = allBaseClasses(static_cast<const ClassNode *>(node));
foreach (const ClassNode *base, bases) {
next = base->findChildNode(path.at(i), genus, tmpFlags);
if ((next == nullptr) && (flags & SearchEnumValues) && i == path.size() - 1)
@@ -794,12 +794,12 @@ void Tree::resolveTargets(Aggregate *root)
{
foreach (Node *child, root->childNodes()) {
if (child->isTextPageNode()) {
- PageNode *node = static_cast<PageNode*>(child);
+ PageNode *node = static_cast<PageNode *>(child);
QString key = node->title();
if (!key.isEmpty()) {
if (key.contains(QChar(' ')))
key = Doc::canonicalTitle(key);
- QList<PageNode*> nodes = pageNodesByTitle_.values(key);
+ QList<PageNode *> nodes = pageNodesByTitle_.values(key);
bool alreadyThere = false;
if (!nodes.empty()) {
for (int i=0; i< nodes.size(); ++i) {
@@ -817,7 +817,7 @@ void Tree::resolveTargets(Aggregate *root)
}
if (child->doc().hasTableOfContents()) {
- const QList<Atom*> &toc = child->doc().tableOfContents();
+ const QList<Atom *> &toc = child->doc().tableOfContents();
for (int i = 0; i < toc.size(); ++i) {
QString ref = refForAtom(toc.at(i));
QString title = Text::sectionHeading(toc.at(i)).toString();
@@ -830,7 +830,7 @@ void Tree::resolveTargets(Aggregate *root)
}
}
if (child->doc().hasKeywords()) {
- const QList<Atom*> &keywords = child->doc().keywords();
+ const QList<Atom *> &keywords = child->doc().keywords();
for (int i = 0; i < keywords.size(); ++i) {
QString ref = refForAtom(keywords.at(i));
QString title = keywords.at(i)->string();
@@ -842,7 +842,7 @@ void Tree::resolveTargets(Aggregate *root)
}
}
if (child->doc().hasTargets()) {
- const QList<Atom*> &targets = child->doc().targets();
+ const QList<Atom *> &targets = child->doc().targets();
for (int i = 0; i < targets.size(); ++i) {
QString ref = refForAtom(targets.at(i));
QString title = targets.at(i)->string();
@@ -855,7 +855,7 @@ void Tree::resolveTargets(Aggregate *root)
}
}
if (child->isAggregate())
- resolveTargets(static_cast<Aggregate*>(child));
+ resolveTargets(static_cast<Aggregate *>(child));
}
}
@@ -868,7 +868,7 @@ Tree::findUnambiguousTarget(const QString &target, Node::Genus genus, QString &r
{
int numBestTargets = 0;
TargetRec *bestTarget = nullptr;
- QList<TargetRec*> bestTargetList;
+ QList<TargetRec *> bestTargetList;
QString key = target;
TargetMap::const_iterator i = nodesByTargetTitle_.find(key);
@@ -1185,7 +1185,7 @@ CollectionNode *Tree::addToQmlModule(const QString &name, Node *node)
cn->addMember(node);
node->setQmlModule(cn);
if (node->isQmlType()) {
- QmlTypeNode *n = static_cast<QmlTypeNode*>(node);
+ QmlTypeNode *n = static_cast<QmlTypeNode *>(node);
for (int i=0; i<qmid.size(); ++i) {
QString key = qmid[i] + "::" + node->name();
insertQmlType(key, n);
@@ -1216,7 +1216,7 @@ CollectionNode *Tree::addToJsModule(const QString &name, Node *node)
cn->addMember(node);
node->setQmlModule(cn);
if (node->isJsType()) {
- QmlTypeNode *n = static_cast<QmlTypeNode*>(node);
+ QmlTypeNode *n = static_cast<QmlTypeNode *>(node);
for (int i=0; i<qmid.size(); ++i) {
QString key = qmid[i] + "::" + node->name();
insertQmlType(key, n);
@@ -1259,10 +1259,10 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
QStringList p(path[1]);
Node *n = findNodeByNameAndType(p, &Node::isQmlType);
if ((n != nullptr) && (n->isQmlType() || n->isJsType()))
- qcn = static_cast<QmlTypeNode*>(n);
+ qcn = static_cast<QmlTypeNode *>(n);
}
if (qcn != nullptr)
- return static_cast<const FunctionNode*>(qcn->findFunctionChild(path[2], parameters));
+ return static_cast<const FunctionNode *>(qcn->findFunctionChild(path[2], parameters));
}
if (relative == nullptr)
@@ -1280,7 +1280,7 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
if (node == nullptr || !node->isAggregate())
break;
- Aggregate *aggregate = static_cast<Aggregate*>(node);
+ Aggregate *aggregate = static_cast<Aggregate *>(node);
Node *next = nullptr;
if (i == path.size() - 1)
next = aggregate->findFunctionChild(path.at(i), parameters);
@@ -1288,7 +1288,7 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
next = aggregate->findChildNode(path.at(i), genus);
if ((next == nullptr) && aggregate->isClassNode()) {
- ClassList bases = allBaseClasses(static_cast<const ClassNode*>(aggregate));
+ ClassList bases = allBaseClasses(static_cast<const ClassNode *>(aggregate));
foreach (ClassNode *base, bases) {
if (i == path.size() - 1)
next = base->findFunctionChild(path.at(i), parameters);
@@ -1311,7 +1311,7 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
// be marked private. If all the overloads are
// marked private, return the original function node.
// This should be replace with findOverriddenFunctionNode().
- const FunctionNode *fn = static_cast<const FunctionNode*>(node);
+ const FunctionNode *fn = static_cast<const FunctionNode *>(node);
const FunctionNode *FN = fn;
while (FN->isPrivate() && !FN->overridesThis().isEmpty()) {
QStringList path = FN->overridesThis().split("::");
@@ -1387,13 +1387,13 @@ FunctionNode *Tree::findFunctionNodeForTag(const QString &tag, Aggregate *parent
const NodeList &children = parent->childNodes();
for (Node *n : children) {
if (n != nullptr && n->isFunction() && n->hasTag(tag))
- return static_cast<FunctionNode*>(n);
+ return static_cast<FunctionNode *>(n);
}
for (Node *n : children) {
if (n != nullptr && n->isAggregate()) {
- n = findFunctionNodeForTag(tag, static_cast<Aggregate*>(n));
+ n = findFunctionNodeForTag(tag, static_cast<Aggregate *>(n));
if (n != nullptr)
- return static_cast<FunctionNode*>(n);
+ return static_cast<FunctionNode *>(n);
}
}
return nullptr;
@@ -1410,11 +1410,11 @@ FunctionNode *Tree::findMacroNode(const QString &t, const Aggregate *parent)
const NodeList &children = parent->childNodes();
for (Node *n : children) {
if (n != nullptr && (n->isMacro() || n->isFunction()) && n->name() == t)
- return static_cast<FunctionNode*>(n);
+ return static_cast<FunctionNode *>(n);
}
for (Node *n : children) {
if (n != nullptr && n->isAggregate()) {
- FunctionNode *fn = findMacroNode(t, static_cast<Aggregate*>(n));
+ FunctionNode *fn = findMacroNode(t, static_cast<Aggregate *>(n));
if (fn != nullptr)
return fn;
}
diff --git a/src/qdoc/tree.h b/src/qdoc/tree.h
index 865ee2266..b5b01eaf8 100644
--- a/src/qdoc/tree.h
+++ b/src/qdoc/tree.h
@@ -47,10 +47,10 @@ struct TargetRec
public:
enum TargetType { Unknown, Target, Keyword, Contents, Class, Function, Page, Subtitle };
- TargetRec(const QString& name,
- const QString& title,
+ TargetRec(const QString &name,
+ const QString &title,
TargetRec::TargetType type,
- Node* node,
+ Node *node,
int priority)
: node_(node), ref_(name), title_(title), priority_(priority), type_(type) {
// Discard the dedicated ref for keywords - they always
@@ -62,7 +62,7 @@ struct TargetRec
bool isEmpty() const { return ref_.isEmpty(); }
Node::Genus genus() { return (node_ ? node_->genus() : Node::DontCare); }
- Node* node_;
+ Node *node_;
QString ref_;
QString title_;
int priority_;
@@ -72,21 +72,21 @@ struct TargetRec
struct TargetLoc
{
public:
- TargetLoc(const Node* loc, const QString& t, const QString& fileName, const QString& text, bool broken)
+ 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_;
+ const Node *loc_;
QString target_;
QString fileName_;
QString text_;
- bool broken_;
+ bool broken_;
};
-typedef QMultiMap<QString, TargetRec*> TargetMap;
-typedef QMultiMap<QString, PageNode*> PageNodeMultiMap;
-typedef QMap<QString, QmlTypeNode*> QmlTypeMap;
-typedef QMultiMap<QString, const ExampleNode*> ExampleNodeMap;
-typedef QVector<TargetLoc*> TargetList;
-typedef QMap<QString, TargetList*> TargetListMap;
+typedef QMultiMap<QString, TargetRec *> TargetMap;
+typedef QMultiMap<QString, PageNode *> PageNodeMultiMap;
+typedef QMap<QString, QmlTypeNode *> QmlTypeMap;
+typedef QMultiMap<QString, const ExampleNode *> ExampleNodeMap;
+typedef QVector<TargetLoc *> TargetList;
+typedef QMap<QString, TargetList *> TargetListMap;
class Tree
{
@@ -95,9 +95,9 @@ class Tree
private: // Note the constructor and destructor are private.
typedef QMap<PropertyNode::FunctionRole, QString> RoleMap;
- typedef QMap<PropertyNode*, RoleMap> PropertyMap;
+ typedef QMap<PropertyNode *, RoleMap> PropertyMap;
- Tree(const QString& camelCaseModuleName, QDocDatabase* qdb);
+ Tree(const QString &camelCaseModuleName, QDocDatabase *qdb);
~Tree();
public: // Of necessity, a few public functions remain.
@@ -116,55 +116,55 @@ class Tree
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;
- NamespaceNode* findNamespaceNode(const QStringList& path) const;
+ Node *findNodeForInclude(const QStringList &path) const;
+ ClassNode *findClassNode(const QStringList &path, const Node *start = nullptr) const;
+ NamespaceNode *findNamespaceNode(const QStringList &path) const;
const FunctionNode *findFunctionNode(const QStringList &path,
const Parameters &parameters,
const Node *relative,
Node::Genus genus) const;
- Node* findNodeRecursive(const QStringList& path,
+ Node *findNodeRecursive(const QStringList &path,
int pathIndex,
- const Node* start,
+ const Node *start,
bool (Node::*) () const) const;
#if 0
- Node* findNodeRecursive(const QStringList& path,
+ Node *findNodeRecursive(const QStringList &path,
int pathIndex,
- const Node* start,
+ const Node *start,
Node::NodeType type) const;
#endif
- const Node* findNodeForTarget(const QStringList& path,
- const QString& target,
- const Node* node,
+ const Node *findNodeForTarget(const QStringList &path,
+ const QString &target,
+ const Node *node,
int flags,
Node::Genus genus,
- QString& ref) const;
- const Node* matchPathAndTarget(const QStringList& path,
+ QString &ref) const;
+ const Node *matchPathAndTarget(const QStringList &path,
int idx,
- const QString& target,
- const Node* node,
+ const QString &target,
+ const Node *node,
int flags,
Node::Genus genus,
- QString& ref) const;
+ QString &ref) const;
- const Node* findNode(const QStringList &path,
+ const Node *findNode(const QStringList &path,
const Node *relative,
int flags,
Node::Genus genus) const;
- QmlTypeNode* findQmlTypeNode(const QStringList& path);
+ QmlTypeNode *findQmlTypeNode(const QStringList &path);
- Node* findNodeByNameAndType(const QStringList& path, bool (Node::*isMatch) () const) const;
- Aggregate* findRelatesNode(const QStringList& path);
- QString getRef(const QString& target, const Node* node) const;
- void insertTarget(const QString& name,
- const QString& title,
+ Node *findNodeByNameAndType(const QStringList &path, bool (Node::*isMatch) () const) const;
+ Aggregate *findRelatesNode(const QStringList &path);
+ QString getRef(const QString &target, const Node *node) const;
+ void insertTarget(const QString &name,
+ const QString &title,
TargetRec::TargetType type,
- Node* node,
+ Node *node,
int priority);
- void resolveTargets(Aggregate* root);
- const Node* findUnambiguousTarget(const QString& target, Node::Genus genus, QString& ref) const;
- const PageNode* findPageNodeByTitle(const QString& title) const;
+ void resolveTargets(Aggregate *root);
+ const Node *findUnambiguousTarget(const QString &target, Node::Genus genus, QString &ref) const;
+ const PageNode *findPageNodeByTitle(const QString &title) const;
void addPropertyFunction(PropertyNode *property,
const QString &funcName,
@@ -180,49 +180,49 @@ class Tree
const NamespaceNode *root() const { return &root_; }
ClassList allBaseClasses(const ClassNode *classe) const;
- QString refForAtom(const Atom* atom);
-
- CNMap* getCollectionMap(Node::NodeType type);
- const CNMap& groups() const { return groups_; }
- const CNMap& modules() const { return modules_; }
- const CNMap& qmlModules() const { return qmlModules_; }
- const CNMap& jsModules() const { return jsModules_; }
-
- CollectionNode* getCollection(const QString& name, Node::NodeType type);
- CollectionNode* findCollection(const QString& name, Node::NodeType type);
-
- CollectionNode* findGroup(const QString& name) { return findCollection(name, Node::Group); }
- CollectionNode* findModule(const QString& name) { return findCollection(name, Node::Module); }
- CollectionNode* findQmlModule(const QString& name) { return findCollection(name, Node::QmlModule); }
- CollectionNode* findJsModule(const QString& name) { return findCollection(name, Node::JsModule); }
-
- CollectionNode* addGroup(const QString& name) { return findGroup(name); }
- CollectionNode* addModule(const QString& name) { return findModule(name); }
- CollectionNode* addQmlModule(const QString& name) { return findQmlModule(name); }
- CollectionNode* addJsModule(const QString& name) { return findJsModule(name); }
-
- CollectionNode* addToGroup(const QString& name, Node* node);
- CollectionNode* addToModule(const QString& name, Node* node);
- CollectionNode* addToQmlModule(const QString& name, Node* node);
- CollectionNode* addToJsModule(const QString& name, Node* node);
-
- QmlTypeNode* lookupQmlType(const QString& name) const { return qmlTypeMap_.value(name); }
- Aggregate* lookupQmlBasicType(const QString& name) const { return qmlTypeMap_.value(name); }
- void insertQmlType(const QString& key, QmlTypeNode* n);
- void addExampleNode(ExampleNode* n) { exampleNodeMap_.insert(n->title(), n); }
- ExampleNodeMap& exampleNodeMap() { return exampleNodeMap_; }
- void setIndexFileName(const QString& t) { indexFileName_ = t; }
+ QString refForAtom(const Atom *atom);
+
+ CNMap *getCollectionMap(Node::NodeType type);
+ const CNMap &groups() const { return groups_; }
+ const CNMap &modules() const { return modules_; }
+ const CNMap &qmlModules() const { return qmlModules_; }
+ const CNMap &jsModules() const { return jsModules_; }
+
+ CollectionNode *getCollection(const QString &name, Node::NodeType type);
+ CollectionNode *findCollection(const QString &name, Node::NodeType type);
+
+ CollectionNode *findGroup(const QString &name) { return findCollection(name, Node::Group); }
+ CollectionNode *findModule(const QString &name) { return findCollection(name, Node::Module); }
+ CollectionNode *findQmlModule(const QString &name) { return findCollection(name, Node::QmlModule); }
+ CollectionNode *findJsModule(const QString &name) { return findCollection(name, Node::JsModule); }
+
+ CollectionNode *addGroup(const QString &name) { return findGroup(name); }
+ CollectionNode *addModule(const QString &name) { return findModule(name); }
+ CollectionNode *addQmlModule(const QString &name) { return findQmlModule(name); }
+ CollectionNode *addJsModule(const QString &name) { return findJsModule(name); }
+
+ CollectionNode *addToGroup(const QString &name, Node *node);
+ CollectionNode *addToModule(const QString &name, Node *node);
+ CollectionNode *addToQmlModule(const QString &name, Node *node);
+ CollectionNode *addToJsModule(const QString &name, Node *node);
+
+ QmlTypeNode *lookupQmlType(const QString &name) const { return qmlTypeMap_.value(name); }
+ Aggregate *lookupQmlBasicType(const QString &name) const { return qmlTypeMap_.value(name); }
+ void insertQmlType(const QString &key, QmlTypeNode *n);
+ void addExampleNode(ExampleNode *n) { exampleNodeMap_.insert(n->title(), n); }
+ ExampleNodeMap &exampleNodeMap() { return exampleNodeMap_; }
+ void setIndexFileName(const QString &t) { indexFileName_ = t; }
bool treeHasBeenAnalyzed() const { return treeHasBeenAnalyzed_; }
bool docsHaveBeenGenerated() const { return docsHaveBeenGenerated_; }
void setTreeHasBeenAnalyzed() { treeHasBeenAnalyzed_ = true; }
void setdocsHaveBeenGenerated() { docsHaveBeenGenerated_ = true; }
- QString getNewLinkTarget(const Node* locNode,
- const Node* t,
- const QString& fileName,
- QString& text,
+ QString getNewLinkTarget(const Node *locNode,
+ const Node *t,
+ const QString &fileName,
+ QString &text,
bool broken);
- TargetList* getTargetList(const QString& module);
+ TargetList* getTargetList(const QString &module);
QStringList getTargetListKeys() { return targetListMap_->keys(); }
FunctionNode *findFunctionNodeForTag(const QString &tag, Aggregate *parent = nullptr);
FunctionNode *findMacroNode(const QString &t, const Aggregate *parent = nullptr);
@@ -235,21 +235,21 @@ private:
QString physicalModuleName_;
QString indexFileName_;
QString indexTitle_;
- QDocDatabase* qdb_;
+ QDocDatabase *qdb_;
NamespaceNode root_;
PropertyMap unresolvedPropertyMap;
- PageNodeMultiMap pageNodesByTitle_;
- TargetMap nodesByTargetRef_;
- TargetMap nodesByTargetTitle_;
- CNMap groups_;
- CNMap modules_;
- CNMap qmlModules_;
- CNMap jsModules_;
- QmlTypeMap qmlTypeMap_;
- ExampleNodeMap exampleNodeMap_;
- TargetListMap* targetListMap_;
+ PageNodeMultiMap pageNodesByTitle_;
+ TargetMap nodesByTargetRef_;
+ TargetMap nodesByTargetTitle_;
+ CNMap groups_;
+ CNMap modules_;
+ CNMap qmlModules_;
+ CNMap jsModules_;
+ QmlTypeMap qmlTypeMap_;
+ ExampleNodeMap exampleNodeMap_;
+ TargetListMap *targetListMap_;
NodeList proxies_;
- NodeMap dontDocumentMap_;
+ NodeMap dontDocumentMap_;
};
QT_END_NAMESPACE
diff --git a/src/qdoc/webxmlgenerator.cpp b/src/qdoc/webxmlgenerator.cpp
index 97eab1ed0..a4a14f7b7 100644
--- a/src/qdoc/webxmlgenerator.cpp
+++ b/src/qdoc/webxmlgenerator.cpp
@@ -195,7 +195,7 @@ void WebXMLGenerator::generateDocumentation(Node *node)
if (node->parent()) {
if (node->isNamespace() || node->isClassNode() || node->isHeader())
- generateCppReferencePage(static_cast<Aggregate*>(node), nullptr);
+ generateCppReferencePage(static_cast<Aggregate *>(node), nullptr);
else if (node->isCollectionNode()) {
if (node->wasSeen()) {
// see remarks in base class impl.
@@ -209,7 +209,7 @@ void WebXMLGenerator::generateDocumentation(Node *node)
}
if (node->isAggregate()) {
- Aggregate* aggregate = static_cast<Aggregate*>(node);
+ Aggregate *aggregate = static_cast<Aggregate *>(node);
for (auto c : aggregate->childNodes()) {
if ((c->isAggregate() ||
c->isTextPageNode() ||
diff --git a/src/qdoc/yyindent.cpp b/src/qdoc/yyindent.cpp
index f27402483..6e4b1a6ca 100644
--- a/src/qdoc/yyindent.cpp
+++ b/src/qdoc/yyindent.cpp
@@ -102,12 +102,12 @@ static int ppContinuationIndentSize = 8;
static const int ppCommentOffset = 2;
-void setTabSize( int size )
+void setTabSize(int size)
{
ppHardwareTabSize = size;
}
-void setIndentSize( int size )
+void setIndentSize(int size)
{
ppIndentSize = size;
ppContinuationIndentSize = 2 * size;
@@ -123,11 +123,11 @@ static QRegExp *iflikeKeyword = nullptr;
Returns the first non-space character in the string t, or
QChar::Null if the string is made only of white space.
*/
-static QChar firstNonWhiteSpace( const QString& t )
+static QChar firstNonWhiteSpace(const QString &t)
{
int i = 0;
- while ( i < (int) t.length() ) {
- if ( !t[i].isSpace() )
+ while (i < (int) t.length()) {
+ if (!t[i].isSpace())
return t[i];
i++;
}
@@ -138,9 +138,9 @@ static QChar firstNonWhiteSpace( const QString& t )
Returns \c true if string t is made only of white space; otherwise
returns \c false.
*/
-static bool isOnlyWhiteSpace( const QString& t )
+static bool isOnlyWhiteSpace(const QString &t)
{
- return firstNonWhiteSpace( t ).isNull();
+ return firstNonWhiteSpace(t).isNull();
}
/*
@@ -148,15 +148,15 @@ static bool isOnlyWhiteSpace( const QString& t )
index. Column numbers and index are identical for strings that don't
contain '\t's.
*/
-int columnForIndex( const QString& t, int index )
+int columnForIndex(const QString &t, int index)
{
int col = 0;
- if ( index > (int) t.length() )
+ if (index > (int) t.length())
index = t.length();
- for ( int i = 0; i < index; i++ ) {
- if ( t[i] == QChar('\t') ) {
- col = ( (col / ppHardwareTabSize) + 1 ) * ppHardwareTabSize;
+ for (int i = 0; i < index; i++) {
+ if (t[i] == QChar('\t')) {
+ col = ((col / ppHardwareTabSize) + 1) * ppHardwareTabSize;
} else {
col++;
}
@@ -167,9 +167,9 @@ int columnForIndex( const QString& t, int index )
/*
Returns the indentation size of string t.
*/
-int indentOfLine( const QString& t )
+int indentOfLine(const QString &t)
{
- return columnForIndex( t, t.indexOf(firstNonWhiteSpace(t)) );
+ return columnForIndex(t, t.indexOf(firstNonWhiteSpace(t)));
}
/*
@@ -178,9 +178,9 @@ int indentOfLine( const QString& t )
provisions are taken against '\n' or '\r', which shouldn't occur in
t anyway.
*/
-static inline void eraseChar( QString& t, int k, QChar ch )
+static inline void eraseChar(QString &t, int k, QChar ch)
{
- if ( t[k] != '\t' )
+ if (t[k] != '\t')
t[k] = ch;
}
@@ -188,7 +188,7 @@ static inline void eraseChar( QString& t, int k, QChar ch )
Removes some nefast constructs from a code line and returns the
resulting line.
*/
-static QString trimmedCodeLine( const QString& t )
+static QString trimmedCodeLine(const QString &t)
{
QString trimmed = t;
int k;
@@ -201,9 +201,9 @@ static QString trimmedCodeLine( const QString& t )
continuation lines.
*/
k = 0;
- while ( (k = trimmed.indexOf(*literal, k)) != -1 ) {
- for ( int i = 0; i < literal->matchedLength(); i++ )
- eraseChar( trimmed, k + i, 'X' );
+ while ((k = trimmed.indexOf(*literal, k)) != -1) {
+ for (int i = 0; i < literal->matchedLength(); i++)
+ eraseChar(trimmed, k + i, 'X');
k += literal->matchedLength();
}
@@ -212,9 +212,9 @@ static QString trimmedCodeLine( const QString& t )
handled elsewhere.
*/
k = 0;
- while ( (k = trimmed.indexOf(*inlineCComment, k)) != -1 ) {
- for ( int i = 0; i < inlineCComment->matchedLength(); i++ )
- eraseChar( trimmed, k + i, ' ' );
+ while ((k = trimmed.indexOf(*inlineCComment, k)) != -1) {
+ for (int i = 0; i < inlineCComment->matchedLength(); i++)
+ eraseChar(trimmed, k + i, ' ');
k += inlineCComment->matchedLength();
}
@@ -225,21 +225,21 @@ static QString trimmedCodeLine( const QString& t )
foo1: bar1;
bar2;
*/
- while ( trimmed.lastIndexOf(':') != -1 && trimmed.indexOf(*label) != -1 ) {
- QString cap1 = label->cap( 1 );
- int pos1 = label->pos( 1 );
+ while (trimmed.lastIndexOf(':') != -1 && trimmed.indexOf(*label) != -1) {
+ QString cap1 = label->cap(1);
+ int pos1 = label->pos(1);
int stop = cap1.length();
- if ( pos1 + stop < (int) trimmed.length() && ppIndentSize < stop )
+ if (pos1 + stop < (int) trimmed.length() && ppIndentSize < stop)
stop = ppIndentSize;
int i = 0;
- while ( i < stop ) {
- eraseChar( trimmed, pos1 + i, ' ' );
+ while (i < stop) {
+ eraseChar(trimmed, pos1 + i, ' ');
i++;
}
- while ( i < (int) cap1.length() ) {
- eraseChar( trimmed, pos1 + i, ';' );
+ while (i < (int) cap1.length()) {
+ eraseChar(trimmed, pos1 + i, ';');
i++;
}
}
@@ -248,8 +248,8 @@ static QString trimmedCodeLine( const QString& t )
Remove C++-style comments.
*/
k = trimmed.indexOf( "//" );
- if ( k != -1 )
- trimmed.truncate( k );
+ if (k != -1)
+ trimmed.truncate(k);
return trimmed;
}
@@ -258,12 +258,12 @@ static QString trimmedCodeLine( const QString& t )
Returns '(' if the last parenthesis is opening, ')' if it is
closing, and QChar::Null if there are no parentheses in t.
*/
-static inline QChar lastParen( const QString& t )
+static inline QChar lastParen(const QString &t)
{
int i = t.length();
- while ( i > 0 ) {
+ while (i > 0) {
i--;
- if ( t[i] == QChar('(') || t[i] == QChar(')') )
+ if (t[i] == QChar('(') || t[i] == QChar(')'))
return t[i];
}
return QChar::Null;
@@ -273,7 +273,7 @@ static inline QChar lastParen( const QString& t )
Returns \c true if typedIn the same as okayCh or is null; otherwise
returns \c false.
*/
-static inline bool okay( QChar typedIn, QChar okayCh )
+static inline bool okay(QChar typedIn, QChar okayCh)
{
return typedIn == QChar::Null || typedIn == okayCh;
}
@@ -324,10 +324,10 @@ static bool readLine()
int k;
yyLinizerState->leftBraceFollows =
- ( firstNonWhiteSpace(yyLinizerState->line) == QChar('{') );
+ (firstNonWhiteSpace(yyLinizerState->line) == QChar('{'));
do {
- if ( yyLinizerState->iter == yyProgram->constBegin() ) {
+ if (yyLinizerState->iter == yyProgram->constBegin()) {
yyLinizerState->line.clear();
return false;
}
@@ -335,7 +335,7 @@ static bool readLine()
--yyLinizerState->iter;
yyLinizerState->line = *yyLinizerState->iter;
- yyLinizerState->line = trimmedCodeLine( yyLinizerState->line );
+ yyLinizerState->line = trimmedCodeLine(yyLinizerState->line);
/*
Remove C-style comments that span multiple lines. If the
@@ -347,25 +347,25 @@ static bool readLine()
the first if. The order of the if's is also important.
*/
- if ( yyLinizerState->inCComment ) {
- QString slashAster( "/*" );
+ if (yyLinizerState->inCComment) {
+ QString slashAster("/*");
- k = yyLinizerState->line.indexOf( slashAster );
- if ( k == -1 ) {
+ k = yyLinizerState->line.indexOf(slashAster);
+ if (k == -1) {
yyLinizerState->line.clear();
} else {
- yyLinizerState->line.truncate( k );
+ yyLinizerState->line.truncate(k);
yyLinizerState->inCComment = false;
}
}
- if ( !yyLinizerState->inCComment ) {
- QString asterSlash( "*/" );
+ if (!yyLinizerState->inCComment) {
+ QString asterSlash("*/");
- k = yyLinizerState->line.indexOf( asterSlash );
- if ( k != -1 ) {
- for ( int i = 0; i < k + 2; i++ )
- eraseChar( yyLinizerState->line, i, ' ' );
+ k = yyLinizerState->line.indexOf(asterSlash);
+ if (k != -1) {
+ for (int i = 0; i < k + 2; i++)
+ eraseChar(yyLinizerState->line, i, ' ');
yyLinizerState->inCComment = true;
}
}
@@ -374,11 +374,11 @@ static bool readLine()
Remove preprocessor directives.
*/
k = 0;
- while ( k < (int) yyLinizerState->line.length() ) {
+ while (k < (int) yyLinizerState->line.length()) {
QChar ch = yyLinizerState->line[k];
- if ( ch == QChar('#') ) {
+ if (ch == QChar('#')) {
yyLinizerState->line.clear();
- } else if ( !ch.isSpace() ) {
+ } else if (!ch.isSpace()) {
break;
}
k++;
@@ -388,17 +388,17 @@ static bool readLine()
Remove trailing spaces.
*/
k = yyLinizerState->line.length();
- while ( k > 0 && yyLinizerState->line[k - 1].isSpace() )
+ while (k > 0 && yyLinizerState->line[k - 1].isSpace())
k--;
- yyLinizerState->line.truncate( k );
+ yyLinizerState->line.truncate(k);
/*
'}' increment the brace depth and '{' decrements it and not
the other way around, as we are parsing backwards.
*/
yyLinizerState->braceDepth +=
- yyLinizerState->line.count( '}' ) -
- yyLinizerState->line.count( '{' );
+ yyLinizerState->line.count('}') -
+ yyLinizerState->line.count('{');
/*
We use a dirty trick for
@@ -411,13 +411,13 @@ static bool readLine()
}
else ...
*/
- if ( yyLinizerState->pendingRightBrace )
+ if (yyLinizerState->pendingRightBrace)
yyLinizerState->braceDepth++;
yyLinizerState->pendingRightBrace =
- ( yyLinizerState->line.indexOf(*braceX) == 0 );
- if ( yyLinizerState->pendingRightBrace )
+ (yyLinizerState->line.indexOf(*braceX) == 0);
+ if (yyLinizerState->pendingRightBrace)
yyLinizerState->braceDepth--;
- } while ( yyLinizerState->line.isEmpty() );
+ } while (yyLinizerState->line.isEmpty());
return true;
}
@@ -449,8 +449,8 @@ static void startLinizer()
*/
static bool bottomLineStartsInCComment()
{
- QString slashAster( "/*" );
- QString asterSlash( "*/" );
+ QString slashAster("/*");
+ QString asterSlash("*/");
/*
We could use the linizer here, but that would slow us down
@@ -459,17 +459,17 @@ static bool bottomLineStartsInCComment()
QStringList::ConstIterator p = yyProgram->constEnd();
--p; // skip bottom line
- for ( int i = 0; i < BigRoof; i++ ) {
- if ( p == yyProgram->constBegin() )
+ for (int i = 0; i < BigRoof; i++) {
+ if (p == yyProgram->constBegin())
return false;
--p;
- if ( (*p).indexOf(slashAster) != -1 || (*p).indexOf(asterSlash) != -1 ) {
- QString trimmed = trimmedCodeLine( *p );
+ if ((*p).indexOf(slashAster) != -1 || (*p).indexOf(asterSlash) != -1) {
+ QString trimmed = trimmedCodeLine(*p);
- if ( trimmed.indexOf(slashAster) != -1 ) {
+ if (trimmed.indexOf(slashAster) != -1) {
return true;
- } else if ( trimmed.indexOf(asterSlash) != -1 ) {
+ } else if (trimmed.indexOf(asterSlash) != -1) {
return false;
}
}
@@ -487,24 +487,24 @@ static bool bottomLineStartsInCComment()
*/
static int indentWhenBottomLineStartsInCComment()
{
- int k = yyLine->lastIndexOf( "/*" );
- if ( k == -1 ) {
+ int k = yyLine->lastIndexOf("/*");
+ if (k == -1) {
/*
We found a normal text line in a comment. Align the
bottom line with the text on this line.
*/
- return indentOfLine( *yyLine );
+ return indentOfLine(*yyLine);
} else {
/*
The C-style comment starts on this line. If there is
text on the same line, align with it. Otherwise, align
with the slash-aster plus a given offset.
*/
- int indent = columnForIndex( *yyLine, k );
+ int indent = columnForIndex(*yyLine, k);
k += 2;
- while ( k < (int) yyLine->length() ) {
- if ( !(*yyLine)[k].isSpace() )
- return columnForIndex( *yyLine, k );
+ while (k < (int) yyLine->length()) {
+ if (!(*yyLine)[k].isSpace())
+ return columnForIndex(*yyLine, k);
k++;
}
return indent + ppCommentOffset;
@@ -533,26 +533,26 @@ static bool matchBracelessControlStatement()
{
int delimDepth = 0;
- if ( yyLine->endsWith("else") )
+ if (yyLine->endsWith("else"))
return true;
- if ( !yyLine->endsWith(QLatin1Char(')')) )
+ if (!yyLine->endsWith(QLatin1Char(')')))
return false;
- for ( int i = 0; i < SmallRoof; i++ ) {
+ for (int i = 0; i < SmallRoof; i++) {
int j = yyLine->length();
- while ( j > 0 ) {
+ while (j > 0) {
j--;
QChar ch = (*yyLine)[j];
- switch ( ch.unicode() ) {
+ switch (ch.unicode()) {
case ')':
delimDepth++;
break;
case '(':
delimDepth--;
- if ( delimDepth == 0 ) {
- if ( yyLine->indexOf(*iflikeKeyword) != -1 ) {
+ if (delimDepth == 0) {
+ if (yyLine->indexOf(*iflikeKeyword) != -1) {
/*
We have
@@ -565,7 +565,7 @@ static bool matchBracelessControlStatement()
return true;
}
}
- if ( delimDepth == -1 ) {
+ if (delimDepth == -1) {
/*
We have
@@ -589,12 +589,12 @@ static bool matchBracelessControlStatement()
continuation line. Be careful with ';' in for,
though.
*/
- if ( ch != QChar(';') || delimDepth == 0 )
+ if (ch != QChar(';') || delimDepth == 0)
return false;
}
}
- if ( !readLine() )
+ if (!readLine())
break;
}
return false;
@@ -620,27 +620,27 @@ static bool isUnfinishedLine()
YY_SAVE();
- if ( yyLine->isEmpty() )
+ if (yyLine->isEmpty())
return false;
QChar lastCh = (*yyLine)[(int) yyLine->length() - 1];
- if ( QString("{};").indexOf(lastCh) == -1 && !yyLine->endsWith("...") ) {
+ if (QString("{};").indexOf(lastCh) == -1 && !yyLine->endsWith("...")) {
/*
It doesn't end with ';' or similar. If it's neither
"Q_OBJECT" nor "if ( x )", it must be an unfinished line.
*/
- unf = ( yyLine->indexOf("Q_OBJECT") == -1 &&
- !matchBracelessControlStatement() );
- } else if ( lastCh == QChar(';') ) {
- if ( lastParen(*yyLine) == QChar('(') ) {
+ unf = (yyLine->indexOf("Q_OBJECT") == -1 &&
+ !matchBracelessControlStatement());
+ } else if (lastCh == QChar(';')) {
+ if (lastParen(*yyLine) == QChar('(')) {
/*
Exception:
for ( int i = 1; i < 10;
*/
unf = true;
- } else if ( readLine() && yyLine->endsWith(QLatin1Char(';')) &&
- lastParen(*yyLine) == QChar('(') ) {
+ } else if (readLine() && yyLine->endsWith(QLatin1Char(';')) &&
+ lastParen(*yyLine) == QChar('(')) {
/*
Exception:
@@ -664,7 +664,7 @@ static bool isContinuationLine()
bool cont = false;
YY_SAVE();
- if ( readLine() )
+ if (readLine())
cont = isUnfinishedLine();
YY_RESTORE();
return cont;
@@ -685,15 +685,15 @@ static int indentForContinuationLine()
bool leftBraceFollowed = *yyLeftBraceFollows;
- for ( int i = 0; i < SmallRoof; i++ ) {
+ for (int i = 0; i < SmallRoof; i++) {
int hook = -1;
int j = yyLine->length();
- while ( j > 0 && hook < 0 ) {
+ while (j > 0 && hook < 0) {
j--;
QChar ch = (*yyLine)[j];
- switch ( ch.unicode() ) {
+ switch (ch.unicode()) {
case ')':
case ']':
delimDepth++;
@@ -708,7 +708,7 @@ static int indentForContinuationLine()
An unclosed delimiter is a good place to align at,
at least for some styles (including Qt's).
*/
- if ( delimDepth == -1 )
+ if (delimDepth == -1)
hook = j;
break;
case '{':
@@ -720,7 +720,7 @@ static int indentForContinuationLine()
delimiters.
*/
if ( braceDepth == -1 ) {
- if ( j < (int) yyLine->length() - 1 ) {
+ if (j < (int) yyLine->length() - 1) {
hook = j;
} else {
return 0; // shouldn't happen
@@ -753,18 +753,18 @@ static int indentForContinuationLine()
end of the unfinished lines or by unbalanced
parentheses.
*/
- if ( QString("!=<>").indexOf((*yyLine)[j - 1]) == -1 &&
- (*yyLine)[j + 1] != '=' ) {
- if ( braceDepth == 0 && delimDepth == 0 &&
+ if (QString("!=<>").indexOf((*yyLine)[j - 1]) == -1 &&
+ (*yyLine)[j + 1] != '=') {
+ if (braceDepth == 0 && delimDepth == 0 &&
j < (int) yyLine->length() - 1 &&
!yyLine->endsWith(QLatin1Char(',')) &&
- (yyLine->contains('(') == yyLine->contains(')')) )
+ (yyLine->contains('(') == yyLine->contains(')')))
hook = j;
}
}
}
- if ( hook >= 0 ) {
+ if (hook >= 0) {
/*
Yes, we have a delimiter or an operator to align
against! We don't really align against it, but rather
@@ -780,23 +780,23 @@ static int indentForContinuationLine()
"foo foo foo foo foo foo foo foo foo") );
*/
hook++;
- while ( hook < (int) yyLine->length() ) {
- if ( !(*yyLine)[hook].isSpace() )
- return columnForIndex( *yyLine, hook );
+ while (hook < (int) yyLine->length()) {
+ if (!(*yyLine)[hook].isSpace())
+ return columnForIndex(*yyLine, hook);
hook++;
}
- return indentOfLine( *yyLine ) + ppContinuationIndentSize;
+ return indentOfLine(*yyLine) + ppContinuationIndentSize;
}
- if ( braceDepth != 0 )
+ if (braceDepth != 0)
break;
/*
The line's delimiters are balanced. It looks like a
continuation line or something.
*/
- if ( delimDepth == 0 ) {
- if ( leftBraceFollowed ) {
+ if (delimDepth == 0) {
+ if (leftBraceFollowed) {
/*
We have
@@ -811,9 +811,9 @@ static int indentForContinuationLine()
The "{" should be flush left.
*/
- if ( !isContinuationLine() )
- return indentOfLine( *yyLine );
- } else if ( isContinuationLine() || yyLine->endsWith(QLatin1Char(',')) ) {
+ if (!isContinuationLine())
+ return indentOfLine(*yyLine);
+ } else if (isContinuationLine() || yyLine->endsWith(QLatin1Char(','))) {
/*
We have
@@ -830,7 +830,7 @@ static int indentForContinuationLine()
The "c;" should fall right under the "b +", and the
"4, 5, 6" right under the "1, 2, 3,".
*/
- return indentOfLine( *yyLine );
+ return indentOfLine(*yyLine);
} else {
/*
We have
@@ -848,11 +848,11 @@ static int indentForContinuationLine()
We do have a special trick above for the assignment
operator above, though.
*/
- return indentOfLine( *yyLine ) + ppContinuationIndentSize;
+ return indentOfLine(*yyLine) + ppContinuationIndentSize;
}
}
- if ( !readLine() )
+ if (!readLine())
break;
}
return 0;
@@ -911,11 +911,11 @@ static int indentForContinuationLine()
*/
static int indentForStandaloneLine()
{
- for ( int i = 0; i < SmallRoof; i++ ) {
- if ( !*yyLeftBraceFollows ) {
+ for (int i = 0; i < SmallRoof; i++) {
+ if (!*yyLeftBraceFollows) {
YY_SAVE();
- if ( matchBracelessControlStatement() ) {
+ if (matchBracelessControlStatement()) {
/*
The situation is this, and we want to indent "z;":
@@ -925,12 +925,12 @@ static int indentForStandaloneLine()
yyLine is "if ( x &&".
*/
- return indentOfLine( *yyLine ) + ppIndentSize;
+ return indentOfLine(*yyLine) + ppIndentSize;
}
YY_RESTORE();
}
- if ( yyLine->endsWith(QLatin1Char(';')) || yyLine->contains('{') ) {
+ if (yyLine->endsWith(QLatin1Char(';')) || yyLine->contains('{')) {
/*
The situation is possibly this, and we want to indent
"z;":
@@ -943,42 +943,42 @@ static int indentForStandaloneLine()
any arbitrarily complex compound statement can appear.
*/
- if ( *yyBraceDepth > 0 ) {
+ if (*yyBraceDepth > 0) {
do {
- if ( !readLine() )
+ if (!readLine())
break;
- } while ( *yyBraceDepth > 0 );
+ } while (*yyBraceDepth > 0);
}
LinizerState hookState;
- while ( isContinuationLine() )
+ while (isContinuationLine())
readLine();
hookState = *yyLinizerState;
readLine();
- if ( *yyBraceDepth <= 0 ) {
+ if (*yyBraceDepth <= 0) {
do {
- if ( !matchBracelessControlStatement() )
+ if (!matchBracelessControlStatement())
break;
hookState = *yyLinizerState;
- } while ( readLine() );
+ } while (readLine());
}
*yyLinizerState = hookState;
- while ( isContinuationLine() )
+ while (isContinuationLine())
readLine();
/*
Never trust lines containing only '{' or '}', as some
people (Richard M. Stallman) format them weirdly.
*/
- if ( yyLine->trimmed().length() > 1 )
- return indentOfLine( *yyLine ) - *yyBraceDepth * ppIndentSize;
+ if (yyLine->trimmed().length() > 1)
+ return indentOfLine(*yyLine) - *yyBraceDepth * ppIndentSize;
}
- if ( !readLine() )
+ if (!readLine())
return -*yyBraceDepth * ppIndentSize;
}
return 0;
@@ -989,14 +989,14 @@ static int indentForStandaloneLine()
*/
static void initializeIndenter()
{
- literal = new QRegExp( "([\"'])(?:\\\\.|[^\\\\])*\\1" );
- literal->setMinimal( true );
+ literal = new QRegExp("([\"'])(?:\\\\.|[^\\\\])*\\1");
+ literal->setMinimal(true);
label = new QRegExp(
- "^\\s*((?:case\\b([^:]|::)+|[a-zA-Z_0-9]+)(?:\\s+slots)?:)(?!:)" );
- inlineCComment = new QRegExp( "/\\*.*\\*/" );
- inlineCComment->setMinimal( true );
- braceX = new QRegExp( "^\\s*\\}\\s*(?:else|catch)\\b" );
- iflikeKeyword = new QRegExp( "\\b(?:catch|do|for|if|while)\\b" );
+ "^\\s*((?:case\\b([^:]|::)+|[a-zA-Z_0-9]+)(?:\\s+slots)?:)(?!:)");
+ inlineCComment = new QRegExp("/\\*.*\\*/");
+ inlineCComment->setMinimal(true);
+ braceX = new QRegExp("^\\s*\\}\\s*(?:else|catch)\\b");
+ iflikeKeyword = new QRegExp("\\b(?:catch|do|for|if|while)\\b");
yyLinizerState = new LinizerState;
}
@@ -1024,56 +1024,56 @@ static void terminateIndenter()
slighly more liberal if typedIn is always null. The user might be
annoyed by the liberal behavior.
*/
-int indentForBottomLine( const QStringList& program, QChar typedIn )
+int indentForBottomLine(const QStringList &program, QChar typedIn)
{
- if ( program.isEmpty() )
+ if (program.isEmpty())
return 0;
initializeIndenter();
- yyProgram = new QStringList( program );
+ yyProgram = new QStringList(program);
startLinizer();
- const QString& bottomLine = program.last();
- QChar firstCh = firstNonWhiteSpace( bottomLine );
+ const QString &bottomLine = program.last();
+ QChar firstCh = firstNonWhiteSpace(bottomLine);
int indent;
- if ( bottomLineStartsInCComment() ) {
+ if (bottomLineStartsInCComment()) {
/*
The bottom line starts in a C-style comment. Indent it
smartly, unless the user has already played around with it,
in which case it's better to leave her stuff alone.
*/
- if ( isOnlyWhiteSpace(bottomLine) ) {
+ if (isOnlyWhiteSpace(bottomLine)) {
indent = indentWhenBottomLineStartsInCComment();
} else {
- indent = indentOfLine( bottomLine );
+ indent = indentOfLine(bottomLine);
}
- } else if ( okay(typedIn, '#') && firstCh == QChar('#') ) {
+ } else if (okay(typedIn, '#') && firstCh == QChar('#')) {
/*
Preprocessor directives go flush left.
*/
indent = 0;
} else {
- if ( isUnfinishedLine() ) {
+ if (isUnfinishedLine()) {
indent = indentForContinuationLine();
} else {
indent = indentForStandaloneLine();
}
- if ( okay(typedIn, '}') && firstCh == QChar('}') ) {
+ if (okay(typedIn, '}') && firstCh == QChar('}')) {
/*
A closing brace is one level more to the left than the
code it follows.
*/
indent -= ppIndentSize;
- } else if ( okay(typedIn, ':') ) {
+ } else if (okay(typedIn, ':')) {
QRegExp caseLabel(
"\\s*(?:case\\b(?:[^:]|::)+"
"|(?:public|protected|private|signals|default)(?:\\s+slots)?\\s*"
")?:.*" );
- if ( caseLabel.exactMatch(bottomLine) ) {
+ if (caseLabel.exactMatch(bottomLine)) {
/*
Move a case label (or the ':' in front of a
constructor initialization list) one level to the
@@ -1087,16 +1087,16 @@ int indentForBottomLine( const QStringList& program, QChar typedIn )
user is probably the middle of "foo::bar". (Who
uses goto, anyway?)
*/
- if ( indentOfLine(bottomLine) <= indent )
+ if (indentOfLine(bottomLine) <= indent)
indent -= ppIndentSize;
else
- indent = indentOfLine( bottomLine );
+ indent = indentOfLine(bottomLine);
}
}
}
delete yyProgram;
terminateIndenter();
- return qMax( 0, indent );
+ return qMax(0, indent);
}
QT_END_NAMESPACE
@@ -1113,7 +1113,7 @@ QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
-static QString fileContents( const QString& fileName )
+static QString fileContents( const QString &fileName )
{
QFile f( fileName );
if ( !f.open(QFile::ReadOnly) ) {