summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/bootstrap/bootstrap.pro1
-rw-r--r--src/tools/moc/generator.cpp6
-rw-r--r--src/tools/moc/preprocessor.cpp8
-rw-r--r--src/tools/qdoc/atom.cpp4
-rw-r--r--src/tools/qdoc/atom.h2
-rw-r--r--src/tools/qdoc/codeparser.cpp27
-rw-r--r--src/tools/qdoc/cppcodeparser.cpp34
-rw-r--r--src/tools/qdoc/cppcodeparser.h1
-rw-r--r--src/tools/qdoc/doc.cpp23
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-cmdindex.qdoc1
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc40
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc14
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp65
-rw-r--r--src/tools/qdoc/location.cpp4
-rw-r--r--src/tools/qdoc/node.cpp12
-rw-r--r--src/tools/qdoc/puredocparser.cpp4
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp4
-rw-r--r--src/tools/qdoc/qmlcodeparser.cpp2
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp3
-rw-r--r--src/tools/qdoc/tree.cpp8
20 files changed, 109 insertions, 154 deletions
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index a92e5b8f3d..be6bcadacb 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -97,6 +97,7 @@ SOURCES += \
../../corelib/tools/qlocale_tools.cpp \
../../corelib/tools/qmap.cpp \
../../corelib/tools/qregexp.cpp \
+ ../../corelib/tools/qringbuffer.cpp \
../../corelib/tools/qpoint.cpp \
../../corelib/tools/qrect.cpp \
../../corelib/tools/qsize.cpp \
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 8b6a0519c5..5be58d3c4b 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -448,7 +448,8 @@ void Generator::generateCode()
// Generate internal qt_static_metacall() function
//
const bool hasStaticMetaCall = !isQt &&
- (cdef->hasQObject || !cdef->methodList.isEmpty() || !cdef->propertyList.isEmpty());
+ (cdef->hasQObject || !cdef->methodList.isEmpty()
+ || !cdef->propertyList.isEmpty() || !cdef->constructorList.isEmpty());
if (hasStaticMetaCall)
generateStaticMetacall();
@@ -1125,7 +1126,8 @@ void Generator::generateStaticMetacall()
fprintf(out, "%s", QByteArray("QPrivateSignal()").constData());
}
fprintf(out, ");\n");
- fprintf(out, " if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break;\n");
+ fprintf(out, " if (_a[0]) *reinterpret_cast<%s**>(_a[0]) = _r; } break;\n",
+ cdef->hasQGadget ? "void" : "QObject");
}
fprintf(out, " default: break;\n");
fprintf(out, " }\n");
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index 51873033c7..f253c49995 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -661,8 +661,10 @@ Symbols Preprocessor::macroExpandIdentifier(Preprocessor *that, SymbolStack &sym
expansion += s;
}
} else if (mode == Hash) {
- if (index < 0)
+ if (index < 0 || index >= arguments.size()) {
that->error("'#' is not followed by a macro parameter");
+ continue;
+ }
const Symbols &arg = arguments.at(index);
QByteArray stringified;
@@ -681,7 +683,7 @@ Symbols Preprocessor::macroExpandIdentifier(Preprocessor *that, SymbolStack &sym
expansion.pop_back();
Symbol next = s;
- if (index >= 0) {
+ if (index >= 0 && index < arguments.size()) {
const Symbols &arg = arguments.at(index);
if (arg.size() == 0) {
mode = Normal;
@@ -703,7 +705,7 @@ Symbols Preprocessor::macroExpandIdentifier(Preprocessor *that, SymbolStack &sym
expansion += next;
}
- if (index >= 0) {
+ if (index >= 0 && index < arguments.size()) {
const Symbols &arg = arguments.at(index);
for (int i = 1; i < arg.size(); ++i)
expansion += arg.at(i);
diff --git a/src/tools/qdoc/atom.cpp b/src/tools/qdoc/atom.cpp
index ebbe685985..f50f401c5b 100644
--- a/src/tools/qdoc/atom.cpp
+++ b/src/tools/qdoc/atom.cpp
@@ -66,8 +66,6 @@ QT_BEGIN_NAMESPACE
/*! \enum Atom::AtomType
- \value AbstractLeft
- \value AbstractRight
\value AnnotatedList
\value AutoLink
\value BaseName
@@ -149,8 +147,6 @@ static const struct {
const char *english;
int no;
} atms[] = {
- { "AbstractLeft", Atom::AbstractLeft },
- { "AbstractRight", Atom::AbstractRight },
{ "AnnotatedList", Atom::AnnotatedList },
{ "AutoLink", Atom::AutoLink },
{ "BaseName", Atom::BaseName },
diff --git a/src/tools/qdoc/atom.h b/src/tools/qdoc/atom.h
index dae106a742..86b8ba7b3c 100644
--- a/src/tools/qdoc/atom.h
+++ b/src/tools/qdoc/atom.h
@@ -47,8 +47,6 @@ class Atom
{
public:
enum AtomType {
- AbstractLeft,
- AbstractRight,
AnnotatedList,
AutoLink,
BaseName,
diff --git a/src/tools/qdoc/codeparser.cpp b/src/tools/qdoc/codeparser.cpp
index 90823080ce..4f80ec80d9 100644
--- a/src/tools/qdoc/codeparser.cpp
+++ b/src/tools/qdoc/codeparser.cpp
@@ -423,33 +423,6 @@ void CodeParser::checkModuleInclusion(Node* n)
.arg(n->name()).arg(Generator::defaultModuleName()));
}
break;
-#if 0
- case Node::Document:
- if (n->access() != Node::Private && !n->doc().isEmpty()) {
- if (n->docSubtype() == Node::HeaderFile) {
-#if 0
- n->doc().location().warning(tr("Header file with title \"%1\" has no \\inmodule command; "
- "using project name by default: %2")
- .arg(n->title()).arg(Generator::defaultModuleName()));
-#endif
- }
- else if (n->docSubtype() == Node::Page) {
-#if 0
- n->doc().location().warning(tr("Page with title \"%1\" has no \\inmodule command; "
- "using project name by default: %2")
- .arg(n->title()).arg(Generator::defaultModuleName()));
-#endif
- }
- else if (n->docSubtype() == Node::Example) {
-#if 0
- n->doc().location().warning(tr("Example with title \"%1\" has no \\inmodule command; "
- "using project name by default: %2")
- .arg(n->title()).arg(Generator::defaultModuleName()));
-#endif
- }
- }
- break;
-#endif
default:
break;
}
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp
index 552fb6a4ba..0468f3691e 100644
--- a/src/tools/qdoc/cppcodeparser.cpp
+++ b/src/tools/qdoc/cppcodeparser.cpp
@@ -520,16 +520,6 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
else if (t == "ditamap")
ptype = Node::DitaMapPage;
}
-
-#if 0
- const Node* n = qdb_->checkForCollision(args[0]);
- if (n) {
- QString other = n->doc().location().fileName();
- doc.location().warning(tr("Name/title collision detected: '%1' in '\\%2'")
- .arg(args[0]).arg(command),
- tr("Also used here: %1").arg(other));
- }
-#endif
DocumentNode* dn = 0;
if (ptype == Node::DitaMapPage)
dn = new DitaMapNode(qdb_->primaryTreeRoot(), args[0]);
@@ -870,7 +860,8 @@ const QSet<QString>& CppCodeParser::otherMetaCommands()
<< COMMAND_QMLINSTANTIATES
<< COMMAND_QMLDEFAULT
<< COMMAND_QMLREADONLY
- << COMMAND_QMLABSTRACT;
+ << COMMAND_QMLABSTRACT
+ << COMMAND_ABSTRACT;
}
return otherMetaCommands_;
}
@@ -891,8 +882,7 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
((Aggregate *) node)->addInclude(arg);
}
else {
- doc.location().warning(tr("Ignored '\\%1'")
- .arg(COMMAND_INHEADERFILE));
+ doc.location().warning(tr("Ignored '\\%1'").arg(COMMAND_INHEADERFILE));
}
}
else if (command == COMMAND_OVERLOAD) {
@@ -931,9 +921,7 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
func->setReimplemented(true);
}
else {
- doc.location().warning(tr("Ignored '\\%1' in %2")
- .arg(COMMAND_REIMP)
- .arg(node->name()));
+ doc.location().warning(tr("Ignored '\\%1' in %2").arg(COMMAND_REIMP).arg(node->name()));
}
}
}
@@ -1014,7 +1002,7 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
}
}
}
- else if (command == COMMAND_QMLABSTRACT) {
+ else if ((command == COMMAND_QMLABSTRACT) || (command == COMMAND_ABSTRACT)) {
if (node->isQmlType() || node->isJsType())
node->setAbstract(true);
}
@@ -2077,29 +2065,25 @@ bool CppCodeParser::matchDeclList(Aggregate *parent)
case Tok_Q_DECLARE_SEQUENTIAL_ITERATOR:
readToken();
if (match(Tok_LeftParen) && match(Tok_Ident))
- sequentialIteratorClasses.insert(previousLexeme(),
- location().fileName());
+ sequentialIteratorClasses.insert(previousLexeme(), location().fileName());
match(Tok_RightParen);
break;
case Tok_Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR:
readToken();
if (match(Tok_LeftParen) && match(Tok_Ident))
- mutableSequentialIteratorClasses.insert(previousLexeme(),
- location().fileName());
+ mutableSequentialIteratorClasses.insert(previousLexeme(), location().fileName());
match(Tok_RightParen);
break;
case Tok_Q_DECLARE_ASSOCIATIVE_ITERATOR:
readToken();
if (match(Tok_LeftParen) && match(Tok_Ident))
- associativeIteratorClasses.insert(previousLexeme(),
- location().fileName());
+ associativeIteratorClasses.insert(previousLexeme(), location().fileName());
match(Tok_RightParen);
break;
case Tok_Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR:
readToken();
if (match(Tok_LeftParen) && match(Tok_Ident))
- mutableAssociativeIteratorClasses.insert(previousLexeme(),
- location().fileName());
+ mutableAssociativeIteratorClasses.insert(previousLexeme(), location().fileName());
match(Tok_RightParen);
break;
case Tok_Q_DECLARE_FLAGS:
diff --git a/src/tools/qdoc/cppcodeparser.h b/src/tools/qdoc/cppcodeparser.h
index 4acd370541..31964699a2 100644
--- a/src/tools/qdoc/cppcodeparser.h
+++ b/src/tools/qdoc/cppcodeparser.h
@@ -177,6 +177,7 @@ protected:
QString exampleImageFilter;
};
+#define COMMAND_ABSTRACT Doc::alias("abstract")
#define COMMAND_CLASS Doc::alias("class")
#define COMMAND_CONTENTSPAGE Doc::alias("contentspage")
#define COMMAND_DITAMAP Doc::alias("ditamap")
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index bfe9cbe935..f322bd9360 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -69,7 +69,6 @@ struct Macro
enum {
CMD_A,
- CMD_ABSTRACT,
CMD_ANNOTATEDLIST,
CMD_B,
CMD_BADCODE,
@@ -85,7 +84,6 @@ enum {
CMD_DOTS,
CMD_E,
CMD_ELSE,
- CMD_ENDABSTRACT,
CMD_ENDCHAPTER,
CMD_ENDCODE,
CMD_ENDDIV,
@@ -187,7 +185,6 @@ static struct {
QString *alias;
} cmds[] = {
{ "a", CMD_A, 0 },
- { "abstract", CMD_ABSTRACT, 0 },
{ "annotatedlist", CMD_ANNOTATEDLIST, 0 },
{ "b", CMD_B, 0 },
{ "badcode", CMD_BADCODE, 0 },
@@ -203,7 +200,6 @@ static struct {
{ "dots", CMD_DOTS, 0 },
{ "e", CMD_E, 0 },
{ "else", CMD_ELSE, 0 },
- { "endabstract", CMD_ENDABSTRACT, 0 },
{ "endchapter", CMD_ENDCHAPTER, 0 },
{ "endcode", CMD_ENDCODE, 0 },
{ "enddiv", CMD_ENDDIV, 0 },
@@ -631,12 +627,6 @@ void DocParser::parse(const QString& source,
append(Atom::FormattingRight,ATOM_FORMATTING_PARAMETER);
priv->params.insert(p1);
break;
- case CMD_ABSTRACT:
- if (openCommand(cmd)) {
- leavePara();
- append(Atom::AbstractLeft);
- }
- break;
case CMD_BADCODE:
leavePara();
append(Atom::CodeBad,getCode(CMD_BADCODE, marker));
@@ -748,12 +738,6 @@ void DocParser::parse(const QString& source,
location().warning(tr("Unexpected '\\%1'").arg(cmdName(CMD_ELSE)));
}
break;
- case CMD_ENDABSTRACT:
- if (closeCommand(cmd)) {
- leavePara();
- append(Atom::AbstractRight);
- }
- break;
case CMD_ENDCHAPTER:
endSection(Doc::Chapter, cmd);
break;
@@ -1830,11 +1814,6 @@ bool DocParser::openCommand(int cmd)
if (outer == CMD_LIST) {
ok = (cmd == CMD_FOOTNOTE || cmd == CMD_LIST);
}
- else if (outer == CMD_ABSTRACT) {
- ok = (cmd == CMD_LIST ||
- cmd == CMD_QUOTATION ||
- cmd == CMD_TABLE);
- }
else if (outer == CMD_SIDEBAR) {
ok = (cmd == CMD_LIST ||
cmd == CMD_QUOTATION ||
@@ -2674,8 +2653,6 @@ void DocParser::skipToNextPreprocessorCommand()
int DocParser::endCmdFor(int cmd)
{
switch (cmd) {
- case CMD_ABSTRACT:
- return CMD_ENDABSTRACT;
case CMD_BADCODE:
return CMD_ENDCODE;
case CMD_CHAPTER:
diff --git a/src/tools/qdoc/doc/qdoc-manual-cmdindex.qdoc b/src/tools/qdoc/doc/qdoc-manual-cmdindex.qdoc
index 87416fcd14..63fcee6469 100644
--- a/src/tools/qdoc/doc/qdoc-manual-cmdindex.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual-cmdindex.qdoc
@@ -106,6 +106,7 @@
\li \l {printto-command} {\\printto}
\li \l {printuntil-command} {\\printuntil}
\li \l {property-command} {\\property}
+ \li \l {qmlabstract-command} {\\qmlabstract}
\li \l {qmlattachedproperty-command} {\\qmlattachedproperty}
\li \l {qmlattachedsignal-command} {\\qmlattachedsignal}
\li \l {qmlbasictype-command} {\\qmlbasictype}
diff --git a/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc b/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
index 700b1a09c7..3bf63214ad 100644
--- a/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual-contextcmds.qdoc
@@ -46,6 +46,7 @@
below the \l {Topic Commands} {topic} command.
\list
+ \li \l {abstract-command} {\\abstract}
\li \l {compat-command}{\\compat},
\li \l {contentspage-command}{\\contentspage},
\li \l {indexpage-command}{\\indexpage},
@@ -59,6 +60,7 @@
\li \l {overload-command}{\\overload},
\li \l {preliminary-command}{\\preliminary},
\li \l {previouspage-command}{\\previouspage},
+ \li \l {qmlabstract-command} {\\qmlabstract}
\li \l {reentrant-command}{\\reentrant},
\li \l {reimp-command}{\\reimp},
\li \l {relates-command}{\\relates},
@@ -199,21 +201,41 @@
index page of the collection.
*/
-
/*!
\page 16-qdoc-commands-status.html
\previouspage Document Navigation
\contentspage QDoc Manual
\nextpage Thread Support
- \title Reporting Status
-
- These commands are for indicating that a documented element is
- still under development, is becoming obsolete, is provided for
- compatibility reasons, or is simply not to be included in the
- public interface. The \l {since-command}{\\since} command is for
- including information about the version when a function or class
- first appeared.
+ \title Status
+
+ These commands are for indicating that a documented element has
+ some special status. The element could be marked as about to be
+ made obsolete, or that it is provided for compatibility with an
+ earlier version, or is simply not to be included in the public
+ interface. The \l {since-command}{\\since} command is for
+ specifying the version number in which a function or class first
+ appeared. The \l {qmlabstract-command} {\\qmlabstract} command is
+ for marking a QML type as an abstract base class.
+
+ \target abstract-command
+ \target qmlabstract-command
+ \section1 \\abstract and \\qmlabstract
+
+ \\abstract is a synonym for the \\qmlabstract command. Add this
+ command to the \l {qmltype-command} {\\qmltype} comment for a QML
+ type when that type is meant to be used \e {only} as an abstract
+ base type. When a QML type is abstract, it means that the QML type
+ that can't be instantiated. Instead, the properties in its public
+ API are included in the public properties list on the reference
+ page for each QML type that inherits the abstract QML type. The
+ properties are documented as if they are properties of the
+ inheriting QML type.
+
+ Normally, when a QML type is marked with \e{\\qmlabstract}, it is
+ also marked with \e{\\internal} so that its reference page is not
+ generated. It the abstract QML type is not marked internal, it
+ will have a reference page in the documentation.
\target compat-command
\section1 \\compat
diff --git a/src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc
index d9b5a6f659..9458d96045 100644
--- a/src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc
@@ -38,7 +38,6 @@
\list
\li \l {a-command} {\\a}
- \li \l {abstract-command} {\\abstract}
\li \l {annotatedlist-command} {\\annotatedlist}
\li \l {b-command} {\\b} \span {class="newStuff"}
\li \l {b-command} {\\bold} {(deprecated, use \\b)}
@@ -2886,19 +2885,6 @@
parts with a special rendering, conceptual meaning or
function.
- \target abstract-command
- \section1 \\abstract
-
- The \\abstract and \\endabstract commands delimit a
- document's abstract section.
-
- The abstract section is rendered as an indented italicized
- paragraph.
-
- \warning The \b{\\abstract} and \b{\\endabstract} commands
- have not been implemented. The abstract section is rendered as a
- regular HTML paragraph.
-
\target quotation-command
\section1 \\quotation
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 3fb6acf72b..d7a17fce26 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -474,14 +474,6 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
static bool in_para = false;
switch (atom->type()) {
- case Atom::AbstractLeft:
- if (relative)
- relative->doc().location().warning(tr("\abstract is not implemented."));
- else
- Location::information(tr("\abstract is not implemented."));
- break;
- case Atom::AbstractRight:
- break;
case Atom::AutoLink:
case Atom::NavAutoLink:
if (!inLink_ && !inContents_ && !inSectionHeading_) {
@@ -2199,7 +2191,7 @@ void HtmlGenerator::generateRequisites(Aggregate *inner, CodeMarker *marker)
out() << "<div class=\"table\"><table class=\"alignedsummary\">\n";
QStringList::ConstIterator i;
- for (i = requisiteorder.begin(); i != requisiteorder.constEnd(); ++i) {
+ for (i = requisiteorder.constBegin(); i != requisiteorder.constEnd(); ++i) {
if (requisites.contains(*i)) {
out() << "<tr>"
@@ -2319,7 +2311,7 @@ void HtmlGenerator::generateQmlRequisites(QmlTypeNode *qcn, CodeMarker *marker)
out() << "<div class=\"table\"><table class=\"alignedsummary\">\n";
QStringList::ConstIterator i;
- for (i = requisiteorder.begin(); i != requisiteorder.constEnd(); ++i) {
+ for (i = requisiteorder.constBegin(); i != requisiteorder.constEnd(); ++i) {
if (requisites.contains(*i)) {
out() << "<tr>"
@@ -3559,7 +3551,8 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
bool handled = false;
for (int k = 0; k != 18; ++k) {
const QString & tag = spanTags[2 * k];
- if (tag == QStringRef(&src, i, tag.length())) {
+ if (i + tag.length() <= src.length() &&
+ tag == QStringRef(&src, i, tag.length())) {
html += spanTags[2 * k + 1];
i += tag.length();
handled = true;
@@ -4544,33 +4537,49 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
writer.writeCDATA(QString("No description available"));
writer.writeEndElement(); // description
- // Add words from module name as tags (QtQuickControls -> qt,quick,controls)
- QRegExp re("([A-Z]+[a-z0-9]*)");
+ // Add words from module name as tags
+ // QtQuickControls -> qt,quick,controls
+ // QtOpenGL -> qt,opengl
+ QRegExp re("([A-Z]+[a-z0-9]*(3D|GL)?)");
int pos = 0;
while ((pos = re.indexIn(project, pos)) != -1) {
tags << re.cap(1).toLower();
pos += re.matchedLength();
}
tags += QSet<QString>::fromList(en->title().toLower().split(QLatin1Char(' ')));
+
+ // Clean up tags, exclude invalid and common words
+ QSet<QString>::iterator tag_it = tags.begin();
+ QSet<QString> modified;
+ while (tag_it != tags.end()) {
+ QString s = *tag_it;
+ if (s.at(0) == '(')
+ s.remove(0, 1).chop(1);
+ if (s.endsWith(QLatin1Char(':')))
+ s.chop(1);
+
+ if (s.length() < 2
+ || s.at(0).isDigit()
+ || s.at(0) == '-'
+ || s == QStringLiteral("qt")
+ || s == QStringLiteral("the")
+ || s == QStringLiteral("and")
+ || s.startsWith(QStringLiteral("example"))
+ || s.startsWith(QStringLiteral("chapter")))
+ tag_it = tags.erase(tag_it);
+ else if (s != *tag_it) {
+ modified << s;
+ tag_it = tags.erase(tag_it);
+ }
+ else
+ ++tag_it;
+ }
+ tags += modified;
+
if (!tags.isEmpty()) {
writer.writeStartElement("tags");
bool wrote_one = false;
- // Exclude invalid and common words
foreach (QString tag, tags) {
- if (tag.length() < 2)
- continue;
- if (tag.at(0).isDigit())
- continue;
- if (tag.at(0) == '-')
- continue;
- if (tag == QLatin1String("qt"))
- continue;
- if (tag.startsWith("example"))
- continue;
- if (tag.startsWith("chapter"))
- continue;
- if (tag.endsWith(QLatin1Char(':')))
- tag.chop(1);
if (wrote_one)
writer.writeCharacters(",");
writer.writeCharacters(tag);
diff --git a/src/tools/qdoc/location.cpp b/src/tools/qdoc/location.cpp
index 12dc9e1b4c..5eba2a69ef 100644
--- a/src/tools/qdoc/location.cpp
+++ b/src/tools/qdoc/location.cpp
@@ -256,7 +256,7 @@ QString Location::canonicalRelativePath(const QString &path)
*/
void Location::warning(const QString& message, const QString& details) const
{
- if (!Generator::preparing())
+ if (!Generator::preparing() || Generator::singleExec())
emitMessage(Warning, message, details);
}
@@ -267,7 +267,7 @@ void Location::warning(const QString& message, const QString& details) const
*/
void Location::error(const QString& message, const QString& details) const
{
- if (!Generator::preparing())
+ if (!Generator::preparing() || Generator::singleExec())
emitMessage(Error, message, details);
}
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp
index ec721aee64..dbe397357c 100644
--- a/src/tools/qdoc/node.cpp
+++ b/src/tools/qdoc/node.cpp
@@ -2760,8 +2760,8 @@ bool CollectionNode::hasNamespaces() const
bool CollectionNode::hasClasses() const
{
if (!members_.isEmpty()) {
- NodeList::const_iterator i = members_.begin();
- while (i != members_.end()) {
+ NodeList::const_iterator i = members_.cbegin();
+ while (i != members_.cend()) {
if ((*i)->isClass())
return true;
++i;
@@ -2777,8 +2777,8 @@ bool CollectionNode::hasClasses() const
void CollectionNode::getMemberNamespaces(NodeMap& out)
{
out.clear();
- NodeList::const_iterator i = members_.begin();
- while (i != members_.end()) {
+ NodeList::const_iterator i = members_.cbegin();
+ while (i != members_.cend()) {
if ((*i)->isNamespace())
out.insert((*i)->name(),(*i));
++i;
@@ -2792,8 +2792,8 @@ void CollectionNode::getMemberNamespaces(NodeMap& out)
void CollectionNode::getMemberClasses(NodeMap& out)
{
out.clear();
- NodeList::const_iterator i = members_.begin();
- while (i != members_.end()) {
+ NodeList::const_iterator i = members_.cbegin();
+ while (i != members_.cend()) {
if ((*i)->isClass())
out.insert((*i)->name(),(*i));
++i;
diff --git a/src/tools/qdoc/puredocparser.cpp b/src/tools/qdoc/puredocparser.cpp
index 6b644cac31..bfd3925353 100644
--- a/src/tools/qdoc/puredocparser.cpp
+++ b/src/tools/qdoc/puredocparser.cpp
@@ -188,8 +188,8 @@ bool PureDocParser::processQdocComments()
topics.insert(i+1,"and");
doc.location().warning(tr("Multiple topic commands found in comment: %1").arg(topics));
}
- ArgList::ConstIterator a = args.begin();
- while (a != args.end()) {
+ ArgList::ConstIterator a = args.cbegin();
+ while (a != args.cend()) {
Doc nodeDoc = doc;
Node* node = processTopicCommand(nodeDoc,topic,*a);
if (node != 0) {
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index fca34b0a6a..f10072a943 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -1549,8 +1549,8 @@ void QDocDatabase::mergeCollections(Node::Genus genus, CNMap& cnm, const Node* r
foreach (Tree* t, searchOrder()) {
CNMap* m = t->getCollectionMap(genus);
if (m && !m->isEmpty()) {
- CNMap::const_iterator i = m->begin();
- while (i != m->end()) {
+ CNMap::const_iterator i = m->cbegin();
+ while (i != m->cend()) {
if (!i.value()->isInternal())
cnmm.insert(i.key(), i.value());
++i;
diff --git a/src/tools/qdoc/qmlcodeparser.cpp b/src/tools/qdoc/qmlcodeparser.cpp
index 4f5720a94d..f485255b8e 100644
--- a/src/tools/qdoc/qmlcodeparser.cpp
+++ b/src/tools/qdoc/qmlcodeparser.cpp
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_SINCE Doc::alias("since")
#define COMMAND_WRAPPER Doc::alias("wrapper")
+#define COMMAND_ABSTRACT Doc::alias("abstract")
#define COMMAND_QMLABSTRACT Doc::alias("qmlabstract")
#define COMMAND_QMLCLASS Doc::alias("qmlclass")
#define COMMAND_QMLTYPE Doc::alias("qmltype")
@@ -251,6 +252,7 @@ const QSet<QString>& QmlCodeParser::otherMetaCommands()
<< COMMAND_OBSOLETE
<< COMMAND_PRELIMINARY
<< COMMAND_SINCE
+ << COMMAND_ABSTRACT
<< COMMAND_QMLABSTRACT
<< COMMAND_INQMLMODULE
<< COMMAND_INJSMODULE
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index 4803a1d63a..360af5adf6 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -55,6 +55,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_SINCE Doc::alias(QLatin1String("since"))
#define COMMAND_WRAPPER Doc::alias(QLatin1String("wrapper"))
+#define COMMAND_ABSTRACT Doc::alias(QLatin1String("abstract"))
#define COMMAND_QMLABSTRACT Doc::alias(QLatin1String("qmlabstract"))
#define COMMAND_QMLCLASS Doc::alias(QLatin1String("qmlclass"))
#define COMMAND_QMLTYPE Doc::alias(QLatin1String("qmltype"))
@@ -497,7 +498,7 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
while (i != metacommands.end()) {
QString command = *i;
ArgList args = doc.metaCommandArgs(command);
- if (command == COMMAND_QMLABSTRACT) {
+ if ((command == COMMAND_QMLABSTRACT) || (command == COMMAND_ABSTRACT)) {
if (node->isQmlType() || node->isJsType()) {
node->setAbstract(true);
}
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp
index 0da963fe0b..629514e7d1 100644
--- a/src/tools/qdoc/tree.cpp
+++ b/src/tools/qdoc/tree.cpp
@@ -1222,8 +1222,8 @@ CollectionNode* Tree::getCollection(const QString& name, Node::Genus genus)
{
CNMap* m = getCollectionMap(genus);
if (m) {
- CNMap::const_iterator i = m->find(name);
- if (i != m->end())
+ CNMap::const_iterator i = m->constFind(name);
+ if (i != m->cend())
return i.value();
}
return 0;
@@ -1249,8 +1249,8 @@ CollectionNode* Tree::findCollection(const QString& name, Node::Genus genus)
CNMap* m = getCollectionMap(genus);
if (!m) // error
return 0;
- CNMap::const_iterator i = m->find(name);
- if (i != m->end())
+ CNMap::const_iterator i = m->constFind(name);
+ if (i != m->cend())
return i.value();
Node::NodeType t = Node::NoType;
switch (genus) {