From 395f7579c004927f3ac3ac8a5e28817634bfc881 Mon Sep 17 00:00:00 2001
From: Thiago Macieira
Date: Thu, 24 May 2012 16:08:54 +0200
Subject: [PATCH] Make qdoc compile with QT_STRICT_ITERATORS
Change-Id: I2923315678d1aef516b35a8c83fe734367723a28
Reviewed-by: Casper van Donderen
---
src/tools/qdoc/codemarker.cpp | 20 +--
src/tools/qdoc/codeparser.cpp | 24 ++--
src/tools/qdoc/config.cpp | 60 ++++-----
src/tools/qdoc/cppcodemarker.cpp | 76 ++++++------
src/tools/qdoc/cppcodeparser.cpp | 26 ++--
src/tools/qdoc/ditaxmlgenerator.cpp | 230 +++++++++++++++++------------------
src/tools/qdoc/doc.cpp | 24 ++--
src/tools/qdoc/editdistance.cpp | 4 +-
src/tools/qdoc/generator.cpp | 72 +++++------
src/tools/qdoc/helpprojectwriter.cpp | 2 +-
src/tools/qdoc/htmlgenerator.cpp | 146 +++++++++++-----------
src/tools/qdoc/main.cpp | 16 +--
src/tools/qdoc/node.cpp | 52 ++++----
src/tools/qdoc/qmlcodemarker.cpp | 4 +-
src/tools/qdoc/qmlvisitor.cpp | 8 +-
src/tools/qdoc/tree.cpp | 46 +++----
src/tools/qdoc/yyindent.cpp | 12 +-
17 files changed, 411 insertions(+), 411 deletions(-)
diff --git a/src/tools/qdoc/codemarker.cpp b/src/tools/qdoc/codemarker.cpp
index 1ba6a0f..122feeb 100644
--- a/src/tools/qdoc/codemarker.cpp
+++ b/src/tools/qdoc/codemarker.cpp
@@ -95,8 +95,8 @@ void CodeMarker::terminateMarker()
void CodeMarker::initialize(const Config& config)
{
defaultLang = config.getString(QLatin1String(CONFIG_LANGUAGE));
- QList::ConstIterator m = markers.begin();
- while (m != markers.end()) {
+ QList::ConstIterator m = markers.constBegin();
+ while (m != markers.constEnd()) {
(*m)->initializeMarker(config);
++m;
}
@@ -107,8 +107,8 @@ void CodeMarker::initialize(const Config& config)
*/
void CodeMarker::terminate()
{
- QList::ConstIterator m = markers.begin();
- while (m != markers.end()) {
+ QList::ConstIterator m = markers.constBegin();
+ while (m != markers.constEnd()) {
(*m)->terminateMarker();
++m;
}
@@ -120,8 +120,8 @@ CodeMarker *CodeMarker::markerForCode(const QString& code)
if (defaultMarker != 0 && defaultMarker->recognizeCode(code))
return defaultMarker;
- QList::ConstIterator m = markers.begin();
- while (m != markers.end()) {
+ QList::ConstIterator m = markers.constBegin();
+ while (m != markers.constEnd()) {
if ((*m)->recognizeCode(code))
return *m;
++m;
@@ -137,8 +137,8 @@ CodeMarker *CodeMarker::markerForFileName(const QString& fileName)
QString ext = fileName.mid(dot + 1);
if (defaultMarker != 0 && defaultMarker->recognizeExtension(ext))
return defaultMarker;
- QList::ConstIterator m = markers.begin();
- while (m != markers.end()) {
+ QList::ConstIterator m = markers.constBegin();
+ while (m != markers.constEnd()) {
if ((*m)->recognizeExtension(ext))
return *m;
++m;
@@ -150,8 +150,8 @@ CodeMarker *CodeMarker::markerForFileName(const QString& fileName)
CodeMarker *CodeMarker::markerForLanguage(const QString& lang)
{
- QList::ConstIterator m = markers.begin();
- while (m != markers.end()) {
+ QList::ConstIterator m = markers.constBegin();
+ while (m != markers.constEnd()) {
if ((*m)->recognizeLanguage(lang))
return *m;
++m;
diff --git a/src/tools/qdoc/codeparser.cpp b/src/tools/qdoc/codeparser.cpp
index 71a82a7..bfa0064 100644
--- a/src/tools/qdoc/codeparser.cpp
+++ b/src/tools/qdoc/codeparser.cpp
@@ -132,8 +132,8 @@ void CodeParser::doneParsingHeaderFiles(Tree *tree)
*/
void CodeParser::initialize(const Config& config)
{
- QList::ConstIterator p = parsers.begin();
- while (p != parsers.end()) {
+ QList::ConstIterator p = parsers.constBegin();
+ while (p != parsers.constEnd()) {
(*p)->initializeParser(config);
++p;
}
@@ -144,8 +144,8 @@ void CodeParser::initialize(const Config& config)
*/
void CodeParser::terminate()
{
- QList::ConstIterator p = parsers.begin();
- while (p != parsers.end()) {
+ QList::ConstIterator p = parsers.constBegin();
+ while (p != parsers.constEnd()) {
(*p)->terminateParser();
++p;
}
@@ -153,8 +153,8 @@ void CodeParser::terminate()
CodeParser *CodeParser::parserForLanguage(const QString& language)
{
- QList::ConstIterator p = parsers.begin();
- while (p != parsers.end()) {
+ QList::ConstIterator p = parsers.constBegin();
+ while (p != parsers.constEnd()) {
if ((*p)->language() == language)
return *p;
++p;
@@ -166,8 +166,8 @@ CodeParser *CodeParser::parserForHeaderFile(const QString &filePath)
{
QString fileName = QFileInfo(filePath).fileName();
- QList::ConstIterator p = parsers.begin();
- while (p != parsers.end()) {
+ QList::ConstIterator p = parsers.constBegin();
+ while (p != parsers.constEnd()) {
QStringList headerPatterns = (*p)->headerFileNameFilter();
foreach (QString pattern, headerPatterns) {
@@ -184,8 +184,8 @@ CodeParser *CodeParser::parserForSourceFile(const QString &filePath)
{
QString fileName = QFileInfo(filePath).fileName();
- QList::ConstIterator p = parsers.begin();
- while (p != parsers.end()) {
+ QList::ConstIterator p = parsers.constBegin();
+ while (p != parsers.constEnd()) {
QStringList sourcePatterns = (*p)->sourceFileNameFilter();
foreach (QString pattern, sourcePatterns) {
@@ -276,8 +276,8 @@ void CodeParser::processCommonMetaCommand(const Location& location,
node->setStatus(Node::Internal);
if (node->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast(node);
- NodeList::ConstIterator p = qpgn->childNodes().begin();
- while (p != qpgn->childNodes().end()) {
+ NodeList::ConstIterator p = qpgn->childNodes().constBegin();
+ while (p != qpgn->childNodes().constEnd()) {
if ((*p)->type() == Node::QmlProperty) {
(*p)->setAccess(Node::Private);
(*p)->setStatus(Node::Internal);
diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp
index e715ea1..09b752c 100644
--- a/src/tools/qdoc/config.cpp
+++ b/src/tools/qdoc/config.cpp
@@ -115,10 +115,10 @@ void MetaStack::process(QChar ch, const Location& location)
QStringList prefixes = top().next;
top().next.clear();
- QStringList::ConstIterator pre = prefixes.begin();
- while (pre != prefixes.end()) {
- QStringList::ConstIterator suf = suffixes.begin();
- while (suf != suffixes.end()) {
+ QStringList::ConstIterator pre = prefixes.constBegin();
+ while (pre != prefixes.constEnd()) {
+ QStringList::ConstIterator suf = suffixes.constBegin();
+ while (suf != suffixes.constEnd()) {
top().next << (*pre + *suf);
++suf;
}
@@ -212,8 +212,8 @@ void Config::load(const QString& fileName)
*/
void Config::unload(const QString& fileName)
{
- QStringMultiMap::ConstIterator v = stringValueMap.begin();
- while (v != stringValueMap.end()) {
+ QStringMultiMap::ConstIterator v = stringValueMap.constBegin();
+ while (v != stringValueMap.constEnd()) {
qDebug() << v.key() << " = " << v.value();
#if 0
if (v.key().startsWith(varDot)) {
@@ -261,10 +261,10 @@ bool Config::getBool(const QString& var) const
int Config::getInt(const QString& var) const
{
QStringList strs = getStringList(var);
- QStringList::ConstIterator s = strs.begin();
+ QStringList::ConstIterator s = strs.constBegin();
int sum = 0;
- while (s != strs.end()) {
+ while (s != strs.constEnd()) {
sum += (*s).toInt();
++s;
}
@@ -357,8 +357,8 @@ QStringList Config::getCleanPathList(const QString& var) const
if (!locMap[var].isEmpty())
(Location&) lastLoc = locMap[var];
QStringList t;
- QMap::const_iterator it = stringListValueMap.find(var);
- if (it != stringListValueMap.end()) {
+ QMap::const_iterator it = stringListValueMap.constFind(var);
+ if (it != stringListValueMap.constEnd()) {
const QStringList& sl = it.value();
if (!sl.isEmpty()) {
t.reserve(sl.size());
@@ -382,9 +382,9 @@ QRegExp Config::getRegExp(const QString& var) const
{
QString pattern;
QList subRegExps = getRegExpList(var);
- QList::ConstIterator s = subRegExps.begin();
+ QList::ConstIterator s = subRegExps.constBegin();
- while (s != subRegExps.end()) {
+ while (s != subRegExps.constEnd()) {
if (!(*s).isValid())
return *s;
if (!pattern.isEmpty())
@@ -405,10 +405,10 @@ QRegExp Config::getRegExp(const QString& var) const
QList Config::getRegExpList(const QString& var) const
{
QStringList strs = getStringList(var);
- QStringList::ConstIterator s = strs.begin();
+ QStringList::ConstIterator s = strs.constBegin();
QList regExps;
- while (s != strs.end()) {
+ while (s != strs.constEnd()) {
regExps += QRegExp(*s);
++s;
}
@@ -425,8 +425,8 @@ QSet Config::subVars(const QString& var) const
{
QSet result;
QString varDot = var + QLatin1Char('.');
- QStringMultiMap::ConstIterator v = stringValueMap.begin();
- while (v != stringValueMap.end()) {
+ QStringMultiMap::ConstIterator v = stringValueMap.constBegin();
+ while (v != stringValueMap.constEnd()) {
if (v.key().startsWith(varDot)) {
QString subVar = v.key().mid(varDot.length());
int dot = subVar.indexOf(QLatin1Char('.'));
@@ -447,8 +447,8 @@ QSet Config::subVars(const QString& var) const
void Config::subVarsAndValues(const QString& var, QStringMultiMap& t) const
{
QString varDot = var + QLatin1Char('.');
- QStringMultiMap::ConstIterator v = stringValueMap.begin();
- while (v != stringValueMap.end()) {
+ QStringMultiMap::ConstIterator v = stringValueMap.constBegin();
+ while (v != stringValueMap.constEnd()) {
if (v.key().startsWith(varDot)) {
QString subVar = v.key().mid(varDot.length());
int dot = subVar.indexOf(QLatin1Char('.'));
@@ -479,8 +479,8 @@ QStringList Config::getAllFiles(const QString &filesVar,
QString nameFilter = getString(filesVar + dot + QLatin1String(CONFIG_FILEEXTENSIONS));
- QStringList::ConstIterator d = dirs.begin();
- while (d != dirs.end()) {
+ QStringList::ConstIterator d = dirs.constBegin();
+ while (d != dirs.constEnd()) {
result += getFilesHere(*d, nameFilter, excludedDirs, excludedFiles);
++d;
}
@@ -511,8 +511,8 @@ QString Config::findFile(const Location& location,
QStringList components = fileName.split(QLatin1Char('?'));
QString firstComponent = components.first();
- QStringList::ConstIterator f = files.begin();
- while (f != files.end()) {
+ QStringList::ConstIterator f = files.constBegin();
+ while (f != files.constEnd()) {
if (*f == firstComponent ||
(*f).endsWith(QLatin1Char('/') + firstComponent)) {
fileInfo.setFile(*f);
@@ -524,8 +524,8 @@ QString Config::findFile(const Location& location,
}
if (fileInfo.fileName().isEmpty()) {
- QStringList::ConstIterator d = dirs.begin();
- while (d != dirs.end()) {
+ QStringList::ConstIterator d = dirs.constBegin();
+ while (d != dirs.constEnd()) {
fileInfo.setFile(QDir(*d), firstComponent);
if (fileInfo.exists()) {
break;
@@ -538,9 +538,9 @@ QString Config::findFile(const Location& location,
if (!fileInfo.exists())
return QString();
- QStringList::ConstIterator c = components.begin();
+ QStringList::ConstIterator c = components.constBegin();
for (;;) {
- bool isArchive = (c != components.end() - 1);
+ bool isArchive = (c != components.constEnd() - 1);
QString userFriendly = *c;
userFriendlyFilePath += userFriendly;
@@ -567,8 +567,8 @@ QString Config::findFile(const Location& location,
const QStringList& fileExtensions,
QString& userFriendlyFilePath)
{
- QStringList::ConstIterator e = fileExtensions.begin();
- while (e != fileExtensions.end()) {
+ QStringList::ConstIterator e = fileExtensions.constBegin();
+ while (e != fileExtensions.constEnd()) {
QString filePath = findFile(location,
files,
dirs,
@@ -900,8 +900,8 @@ void Config::load(Location location, const QString& fileName)
}
}
- QStringList::ConstIterator key = keys.begin();
- while (key != keys.end()) {
+ QStringList::ConstIterator key = keys.constBegin();
+ while (key != keys.constEnd()) {
if (!keySyntax.exactMatch(*key))
keyLoc.fatal(tr("Invalid key '%1'").arg(*key));
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp
index 90507ca..61f8070 100644
--- a/src/tools/qdoc/cppcodemarker.cpp
+++ b/src/tools/qdoc/cppcodemarker.cpp
@@ -197,9 +197,9 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node,
synopsis += "(";
if (!func->parameters().isEmpty()) {
//synopsis += QLatin1Char(' ');
- QList::ConstIterator p = func->parameters().begin();
- while (p != func->parameters().end()) {
- if (p != func->parameters().begin())
+ QList::ConstIterator p = func->parameters().constBegin();
+ while (p != func->parameters().constEnd()) {
+ if (p != func->parameters().constBegin())
synopsis += ", ";
synopsis += typified((*p).leftType());
if (style != Subpage && !(*p).name().isEmpty())
@@ -368,9 +368,9 @@ QString CppCodeMarker::markedUpQmlItem(const Node* node, bool summary)
synopsis = name;
synopsis += QLatin1Char('(');
if (!func->parameters().isEmpty()) {
- QList::ConstIterator p = func->parameters().begin();
- while (p != func->parameters().end()) {
- if (p != func->parameters().begin())
+ QList::ConstIterator p = func->parameters().constBegin();
+ while (p != func->parameters().constEnd()) {
+ if (p != func->parameters().constBegin())
synopsis += ", ";
synopsis += typified((*p).leftType());
if (!(*p).name().isEmpty()) {
@@ -455,8 +455,8 @@ QString CppCodeMarker::markedUpIncludes(const QStringList& includes)
{
QString code;
- QStringList::ConstIterator inc = includes.begin();
- while (inc != includes.end()) {
+ QStringList::ConstIterator inc = includes.constBegin();
+ while (inc != includes.constEnd()) {
code += "<@preprocessor>#include <<@headerfile>" + *inc + "@headerfile>>@preprocessor>\n";
++inc;
}
@@ -547,8 +547,8 @@ QList CppCodeMarker::sections(const InnerNode *inner,
"static public members");
FastSection macros(inner, "Macros", "", "macro", "macros");
- NodeList::ConstIterator r = classe->relatedNodes().begin();
- while (r != classe->relatedNodes().end()) {
+ NodeList::ConstIterator r = classe->relatedNodes().constBegin();
+ while (r != classe->relatedNodes().constEnd()) {
if ((*r)->type() == Node::Function) {
FunctionNode *func = static_cast(*r);
if (func->isMacro())
@@ -568,8 +568,8 @@ QList CppCodeMarker::sections(const InnerNode *inner,
while (!stack.isEmpty()) {
const ClassNode *ancestorClass = stack.pop();
- NodeList::ConstIterator c = ancestorClass->childNodes().begin();
- while (c != ancestorClass->childNodes().end()) {
+ NodeList::ConstIterator c = ancestorClass->childNodes().constBegin();
+ while (c != ancestorClass->childNodes().constEnd()) {
bool isSlot = false;
bool isSignal = false;
bool isStatic = false;
@@ -654,8 +654,8 @@ QList CppCodeMarker::sections(const InnerNode *inner,
}
QList::ConstIterator r =
- ancestorClass->baseClasses().begin();
- while (r != ancestorClass->baseClasses().end()) {
+ ancestorClass->baseClasses().constBegin();
+ while (r != ancestorClass->baseClasses().constEnd()) {
stack.prepend((*r).node);
++r;
}
@@ -688,8 +688,8 @@ QList CppCodeMarker::sections(const InnerNode *inner,
FastSection relatedNonMembers(classe,"Related Non-Members","relnonmem","member","members");
FastSection macros(classe,"Macro Documentation","macros","member","members");
- NodeList::ConstIterator r = classe->relatedNodes().begin();
- while (r != classe->relatedNodes().end()) {
+ NodeList::ConstIterator r = classe->relatedNodes().constBegin();
+ while (r != classe->relatedNodes().constEnd()) {
if ((*r)->type() == Node::Function) {
FunctionNode *func = static_cast(*r);
if (func->isMacro())
@@ -703,8 +703,8 @@ QList CppCodeMarker::sections(const InnerNode *inner,
++r;
}
- NodeList::ConstIterator c = classe->childNodes().begin();
- while (c != classe->childNodes().end()) {
+ NodeList::ConstIterator c = classe->childNodes().constBegin();
+ while (c != classe->childNodes().constEnd()) {
if ((*c)->type() == Node::Enum ||
(*c)->type() == Node::Typedef) {
insert(memberTypes, *c, style, status);
@@ -740,8 +740,8 @@ QList CppCodeMarker::sections(const InnerNode *inner,
while (!stack.isEmpty()) {
const ClassNode *ancestorClass = stack.pop();
- NodeList::ConstIterator c = ancestorClass->childNodes().begin();
- while (c != ancestorClass->childNodes().end()) {
+ NodeList::ConstIterator c = ancestorClass->childNodes().constBegin();
+ while (c != ancestorClass->childNodes().constEnd()) {
if ((*c)->access() != Node::Private &&
(*c)->type() != Node::Property)
insert(all, *c, style, status);
@@ -749,8 +749,8 @@ QList CppCodeMarker::sections(const InnerNode *inner,
}
QList::ConstIterator r =
- ancestorClass->baseClasses().begin();
- while (r != ancestorClass->baseClasses().end()) {
+ ancestorClass->baseClasses().constBegin();
+ while (r != ancestorClass->baseClasses().constEnd()) {
stack.prepend((*r).node);
++r;
}
@@ -791,8 +791,8 @@ QList CppCodeMarker::sections(const InnerNode *inner,
NodeList nodeList = inner->childNodes();
nodeList += inner->relatedNodes();
- NodeList::ConstIterator n = nodeList.begin();
- while (n != nodeList.end()) {
+ NodeList::ConstIterator n = nodeList.constBegin();
+ while (n != nodeList.constEnd()) {
switch ((*n)->type()) {
case Node::Namespace:
insert(namespaces, *n, style, status);
@@ -1169,12 +1169,12 @@ QList CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
const QmlClassNode* qcn = qmlClassNode;
while (qcn != 0) {
- NodeList::ConstIterator c = qcn->childNodes().begin();
- while (c != qcn->childNodes().end()) {
+ NodeList::ConstIterator c = qcn->childNodes().constBegin();
+ while (c != qcn->childNodes().constEnd()) {
if ((*c)->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast(*c);
- NodeList::ConstIterator p = qpgn->childNodes().begin();
- while (p != qpgn->childNodes().end()) {
+ NodeList::ConstIterator p = qpgn->childNodes().constBegin();
+ while (p != qpgn->childNodes().constEnd()) {
if ((*p)->type() == Node::QmlProperty) {
const QmlPropertyNode* pn = static_cast(*p);
if (pn->isAttached())
@@ -1194,8 +1194,8 @@ QList CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
insert(qmlproperties,*c,style,Okay);
}
else {
- NodeList::ConstIterator p = pn->qmlPropNodes().begin();
- while (p != pn->qmlPropNodes().end()) {
+ NodeList::ConstIterator p = pn->qmlPropNodes().constBegin();
+ while (p != pn->qmlPropNodes().constEnd()) {
if ((*p)->type() == Node::QmlProperty) {
const QmlPropertyNode* pn = static_cast(*p);
if (pn->isAttached())
@@ -1255,13 +1255,13 @@ QList CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
"member","members");
const QmlClassNode* qcn = qmlClassNode;
while (qcn != 0) {
- NodeList::ConstIterator c = qcn->childNodes().begin();
- while (c != qcn->childNodes().end()) {
+ NodeList::ConstIterator c = qcn->childNodes().constBegin();
+ while (c != qcn->childNodes().constEnd()) {
if ((*c)->subType() == Node::QmlPropertyGroup) {
bool attached = false;
const QmlPropGroupNode* pgn = static_cast(*c);
- NodeList::ConstIterator C = pgn->childNodes().begin();
- while (C != pgn->childNodes().end()) {
+ NodeList::ConstIterator C = pgn->childNodes().constBegin();
+ while (C != pgn->childNodes().constEnd()) {
if ((*C)->type() == Node::QmlProperty) {
const QmlPropertyNode* pn = static_cast(*C);
if (pn->isAttached()) {
@@ -1323,12 +1323,12 @@ QList CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
const QmlClassNode* current = qmlClassNode;
while (current != 0) {
- NodeList::ConstIterator c = current->childNodes().begin();
- while (c != current->childNodes().end()) {
+ NodeList::ConstIterator c = current->childNodes().constBegin();
+ while (c != current->childNodes().constEnd()) {
if ((*c)->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast(*c);
- NodeList::ConstIterator p = qpgn->childNodes().begin();
- while (p != qpgn->childNodes().end()) {
+ NodeList::ConstIterator p = qpgn->childNodes().constBegin();
+ while (p != qpgn->childNodes().constEnd()) {
if ((*p)->type() == Node::QmlProperty) {
QString key = current->name() + "::" + (*p)->name();
key = sortName(*p, &key);
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp
index e7c7595..affc985 100644
--- a/src/tools/qdoc/cppcodeparser.cpp
+++ b/src/tools/qdoc/cppcodeparser.cpp
@@ -908,7 +908,7 @@ Node *CppCodeParser::processTopicCommandGroup(const QString& command, const ArgL
QString property;
QmlClassNode* qmlClass = 0;
bool attached = (command == COMMAND_QMLATTACHEDPROPERTY);
- ArgList::ConstIterator argsIter = args.begin();
+ ArgList::ConstIterator argsIter = args.constBegin();
arg = argsIter->first;
if (splitQmlPropertyArg(arg,type,module,element,property)) {
qmlClass = tree_->findQmlClassNode(module,element);
@@ -937,7 +937,7 @@ Node *CppCodeParser::processTopicCommandGroup(const QString& command, const ArgL
}
}
++argsIter;
- while (argsIter != args.end()) {
+ while (argsIter != args.constEnd()) {
arg = argsIter->first;
if (splitQmlPropertyArg(arg,type,module,element,property)) {
if (qmlClass->hasProperty(property)) {
@@ -1110,8 +1110,8 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
}
else if (node->type() == Node::Fake && node->subType() == Node::QmlPropertyGroup) {
QmlPropGroupNode* qpgn = static_cast(node);
- NodeList::ConstIterator p = qpgn->childNodes().begin();
- while (p != qpgn->childNodes().end()) {
+ NodeList::ConstIterator p = qpgn->childNodes().constBegin();
+ while (p != qpgn->childNodes().constEnd()) {
if ((*p)->type() == Node::QmlProperty) {
QmlPropertyNode* qpn = static_cast(*p);
qpn->setDefault();
@@ -1127,8 +1127,8 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
}
else if (node->type() == Node::Fake && node->subType() == Node::QmlPropertyGroup) {
QmlPropGroupNode* qpgn = static_cast(node);
- NodeList::ConstIterator p = qpgn->childNodes().begin();
- while (p != qpgn->childNodes().end()) {
+ NodeList::ConstIterator p = qpgn->childNodes().constBegin();
+ while (p != qpgn->childNodes().constEnd()) {
if ((*p)->type() == Node::QmlProperty) {
QmlPropertyNode* qpn = static_cast(*p);
qpn->setReadOnly(1);
@@ -1155,11 +1155,11 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
void CppCodeParser::processOtherMetaCommands(const Doc& doc, Node *node)
{
const QSet metaCommands = doc.metaCommandsUsed();
- QSet::ConstIterator cmd = metaCommands.begin();
- while (cmd != metaCommands.end()) {
+ QSet::ConstIterator cmd = metaCommands.constBegin();
+ while (cmd != metaCommands.constEnd()) {
ArgList args = doc.metaCommandArgs(*cmd);
- ArgList::ConstIterator arg = args.begin();
- while (arg != args.end()) {
+ ArgList::ConstIterator arg = args.constBegin();
+ while (arg != args.constEnd()) {
processOtherMetaCommand(doc, *cmd, *arg, node);
++arg;
}
@@ -2210,7 +2210,7 @@ bool CppCodeParser::matchDocsAndStuff()
should be a function description.
*/
if (topicCommandsUsed.count() > 0) {
- topic = *topicCommandsUsed.begin();
+ topic = *topicCommandsUsed.constBegin();
args = doc.metaCommandArgs(topic);
}
@@ -2263,8 +2263,8 @@ bool CppCodeParser::matchDocsAndStuff()
}
}
else {
- ArgList::ConstIterator a = args.begin();
- while (a != args.end()) {
+ ArgList::ConstIterator a = args.constBegin();
+ while (a != args.constEnd()) {
Doc nodeDoc = doc;
Node *node = processTopicCommand(nodeDoc,topic,*a);
if (node != 0) {
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index 1b51ace..9c84c43 100644
--- a/src/tools/qdoc/ditaxmlgenerator.cpp
+++ b/src/tools/qdoc/ditaxmlgenerator.cpp
@@ -525,8 +525,8 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
config.subVarsAndValues("dita.metadata.default",metadataDefaults);
QSet editionNames = config.subVars(CONFIG_EDITION);
- QSet::ConstIterator edition = editionNames.begin();
- while (edition != editionNames.end()) {
+ QSet::ConstIterator edition = editionNames.constBegin();
+ while (edition != editionNames.constEnd()) {
QString editionName = *edition;
QStringList editionModules = config.getStringList(CONFIG_EDITION +
Config::dot +
@@ -604,8 +604,8 @@ void DitaXmlGenerator::writeGuidAttribute(Node* node)
*/
QString DitaXmlGenerator::lookupGuid(QString text)
{
- QMap::const_iterator i = name2guidMap.find(text);
- if (i != name2guidMap.end())
+ QMap::const_iterator i = name2guidMap.constFind(text);
+ if (i != name2guidMap.constEnd())
return i.value();
#if 0
QString t = QUuid::createUuid().toString();
@@ -627,8 +627,8 @@ QString DitaXmlGenerator::lookupGuid(QString text)
QString DitaXmlGenerator::lookupGuid(const QString& fileName, const QString& text)
{
GuidMap* gm = lookupGuidMap(fileName);
- GuidMap::const_iterator i = gm->find(text);
- if (i != gm->end())
+ GuidMap::const_iterator i = gm->constFind(text);
+ if (i != gm->constEnd())
return i.value();
#if 0
QString t = QUuid::createUuid().toString();
@@ -647,8 +647,8 @@ QString DitaXmlGenerator::lookupGuid(const QString& fileName, const QString& tex
*/
GuidMap* DitaXmlGenerator::lookupGuidMap(const QString& fileName)
{
- GuidMaps::const_iterator i = guidMaps.find(fileName);
- if (i != guidMaps.end())
+ GuidMaps::const_iterator i = guidMaps.constFind(fileName);
+ if (i != guidMaps.constEnd())
return i.value();
GuidMap* gm = new GuidMap;
guidMaps.insert(fileName,gm);
@@ -1103,11 +1103,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::SinceList:
{
NewSinceMaps::const_iterator nsmap;
- nsmap = newSinceMaps.find(atom->string());
+ nsmap = newSinceMaps.constFind(atom->string());
NewClassMaps::const_iterator ncmap;
- ncmap = newClassMaps.find(atom->string());
+ ncmap = newClassMaps.constFind(atom->string());
NewClassMaps::const_iterator nqcmap;
- nqcmap = newQmlClassMaps.find(atom->string());
+ nqcmap = newQmlClassMaps.constFind(atom->string());
if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) {
QList sections;
QList::ConstIterator s;
@@ -1854,8 +1854,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
if (!summarySections.isEmpty()) {
enterSection("redundant",QString());
- s = summarySections.begin();
- while (s != summarySections.end()) {
+ s = summarySections.constBegin();
+ while (s != summarySections.constEnd()) {
if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
if (!s->inherited.isEmpty())
needOtherSection = true;
@@ -1889,8 +1889,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
xmlWriter().writeAttribute("outputclass","h3");
xmlWriter().writeCharacters("Additional Inherited Members");
writeEndTag(); //
- s = summarySections.begin();
- while (s != summarySections.end()) {
+ s = summarySections.constBegin();
+ while (s != summarySections.constEnd()) {
if (s->members.isEmpty())
generateSectionInheritedList(*s, inner, marker);
++s;
@@ -1906,8 +1906,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
QList detailSections;
detailSections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay);
- s = detailSections.begin();
- while (s != detailSections.end()) {
+ s = detailSections.constBegin();
+ while (s != detailSections.constEnd()) {
if ((*s).name == "Classes") {
writeNestedClasses((*s),nsn);
break;
@@ -1915,8 +1915,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
++s;
}
- s = detailSections.begin();
- while (s != detailSections.end()) {
+ s = detailSections.constBegin();
+ while (s != detailSections.constEnd()) {
if ((*s).name == "Function Documentation") {
writeFunctions((*s),nsn,marker);
}
@@ -1991,8 +1991,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
if (!summarySections.isEmpty()) {
enterSection("redundant",QString());
- s = summarySections.begin();
- while (s != summarySections.end()) {
+ s = summarySections.constBegin();
+ while (s != summarySections.constEnd()) {
if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
if (!s->inherited.isEmpty())
needOtherSection = true;
@@ -2026,8 +2026,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
xmlWriter().writeAttribute("outputclass","h3");
xmlWriter().writeCharacters("Additional Inherited Members");
writeEndTag(); //
- s = summarySections.begin();
- while (s != summarySections.end()) {
+ s = summarySections.constBegin();
+ while (s != summarySections.constEnd()) {
if (s->members.isEmpty())
generateSectionInheritedList(*s, inner, marker);
++s;
@@ -2045,8 +2045,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
QList detailSections;
detailSections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay);
- s = detailSections.begin();
- while (s != detailSections.end()) {
+ s = detailSections.constBegin();
+ while (s != detailSections.constEnd()) {
if ((*s).name == "Member Function Documentation") {
writeFunctions((*s),cn,marker);
}
@@ -2116,8 +2116,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
if (!summarySections.isEmpty()) {
enterSection("redundant",QString());
- s = summarySections.begin();
- while (s != summarySections.end()) {
+ s = summarySections.constBegin();
+ while (s != summarySections.constEnd()) {
if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
if (!s->inherited.isEmpty())
needOtherSection = true;
@@ -2152,8 +2152,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
xmlWriter().writeAttribute("outputclass","h3");
xmlWriter().writeCharacters("Additional Inherited Members");
writeEndTag(); //
- s = summarySections.begin();
- while (s != summarySections.end()) {
+ s = summarySections.constBegin();
+ while (s != summarySections.constEnd()) {
if (s->members.isEmpty())
generateSectionInheritedList(*s, inner, marker);
++s;
@@ -2169,8 +2169,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
QList detailSections;
detailSections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay);
- s = detailSections.begin();
- while (s != detailSections.end()) {
+ s = detailSections.constBegin();
+ while (s != detailSections.constEnd()) {
if ((*s).name == "Classes") {
writeNestedClasses((*s),fn);
break;
@@ -2178,8 +2178,8 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
++s;
}
- s = detailSections.begin();
- while (s != detailSections.end()) {
+ s = detailSections.constBegin();
+ while (s != detailSections.constEnd()) {
if ((*s).name == "Function Documentation") {
writeFunctions((*s),fn,marker);
}
@@ -2240,11 +2240,11 @@ DitaXmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
QList members = marker->qmlSections(qcn,CodeMarker::Detailed);
if (!members.isEmpty()) {
- s = members.begin();
- while (s != members.end()) {
+ s = members.constBegin();
+ while (s != members.constEnd()) {
if (!s->members.isEmpty()) {
- NodeList::ConstIterator m = (*s).members.begin();
- while (m != (*s).members.end()) {
+ NodeList::ConstIterator m = (*s).members.constBegin();
+ while (m != (*s).members.constEnd()) {
generateDetailedQmlMember(*m, qcn, marker);
++m;
}
@@ -2702,8 +2702,8 @@ void DitaXmlGenerator::generateTableOfContents(const Node* node,
}
}
else if (sections && (node->type() == Node::Class)) {
- QList::ConstIterator s = sections->begin();
- while (s != sections->end()) {
+ QList::ConstIterator s = sections->constBegin();
+ while (s != sections->constEnd()) {
if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) {
out() << "::ConstIterator s = sections.begin();
- while (s != sections.end()) {
+ QList::ConstIterator s = sections.constBegin();
+ while (s != sections.constEnd()) {
if ((*s).name == "Member Function Documentation") {
writeFunctions((*s),inner,marker,attribute);
}
@@ -2817,8 +2817,8 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative,
return;
NodeMap topLevel;
- NodeMap::ConstIterator c = classMap.begin();
- while (c != classMap.end()) {
+ NodeMap::ConstIterator c = classMap.constBegin();
+ while (c != classMap.constEnd()) {
const ClassNode* classe = static_cast(*c);
if (classe->baseClasses().isEmpty())
topLevel.insert(classe->name(), classe);
@@ -2838,7 +2838,7 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative,
}
else {
const ClassNode *child =
- static_cast(*stack.top().begin());
+ static_cast(*stack.top().constBegin());
writeStartTag(DT_li);
generateFullName(child, relative, marker);
writeEndTag(); //
@@ -2945,8 +2945,8 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
for (int i=0; i<26; ++i)
count[i] = 0;
- NodeMap::const_iterator iter = classMap.begin();
- while (iter != classMap.end()) {
+ NodeMap::const_iterator iter = classMap.constBegin();
+ while (iter != classMap.constEnd()) {
if (!iter.key().contains("::")) {
QChar c = iter.key()[0];
if ((c >= 'A') && (c <= 'Z')) {
@@ -2986,8 +2986,8 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
*/
QString first;
QString last;
- NodeMap::const_iterator iter = classMap.begin();
- while (iter != classMap.end()) {
+ NodeMap::const_iterator iter = classMap.constBegin();
+ while (iter != classMap.constEnd()) {
if (!iter.key().contains("::")) {
first = iter.key();
break;
@@ -2996,10 +2996,10 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
}
if (first.isEmpty())
- first = classMap.begin().key();
+ first = classMap.constBegin().key();
- iter = classMap.end();
- while (iter != classMap.begin()) {
+ iter = classMap.constEnd();
+ while (iter != classMap.constBegin()) {
--iter;
if (!iter.key().contains("::")) {
last = iter.key();
@@ -3008,7 +3008,7 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
}
if (last.isEmpty())
- last = classMap.begin().key();
+ last = classMap.constBegin().key();
if (classMap.size() > 1) {
while (commonPrefixLen < first.length() + 1 &&
@@ -3031,8 +3031,8 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
QString paragraphName[NumParagraphs+1];
QSet usedParagraphNames;
- NodeMap::ConstIterator c = classMap.begin();
- while (c != classMap.end()) {
+ NodeMap::ConstIterator c = classMap.constBegin();
+ while (c != classMap.constEnd()) {
QStringList pieces = c.key().split("::");
QString key;
int idx = commonPrefixLen;
@@ -3194,8 +3194,8 @@ void DitaXmlGenerator::generateFunctionIndex(const Node* relative,
char currentLetter;
writeStartTag(DT_ul);
- QMap::ConstIterator f = funcIndex.begin();
- while (f != funcIndex.end()) {
+ QMap::ConstIterator f = funcIndex.constBegin();
+ while (f != funcIndex.constEnd()) {
writeStartTag(DT_li);
currentLetter = f.key()[0].unicode();
while (islower(currentLetter) && currentLetter >= nextLetter) {
@@ -3209,8 +3209,8 @@ void DitaXmlGenerator::generateFunctionIndex(const Node* relative,
xmlWriter().writeCharacters(protectEnc(f.key()));
xmlWriter().writeCharacters(":");
- NodeMap::ConstIterator s = (*f).begin();
- while (s != (*f).end()) {
+ NodeMap::ConstIterator s = (*f).constBegin();
+ while (s != (*f).constEnd()) {
generateFullName((*s)->parent(), relative, marker, *s);
++s;
}
@@ -3226,8 +3226,8 @@ void DitaXmlGenerator::generateFunctionIndex(const Node* relative,
void DitaXmlGenerator::generateLegaleseList(const Node* relative,
CodeMarker* marker)
{
- QMap::ConstIterator it = legaleseTexts.begin();
- while (it != legaleseTexts.end()) {
+ QMap::ConstIterator it = legaleseTexts.constBegin();
+ while (it != legaleseTexts.constEnd()) {
Text text = it.key();
generateText(text, relative, marker);
writeStartTag(DT_ul);
@@ -3236,7 +3236,7 @@ void DitaXmlGenerator::generateLegaleseList(const Node* relative,
generateFullName(it.value(), relative, marker);
writeEndTag(); //
++it;
- } while (it != legaleseTexts.end() && it.key() == text);
+ } while (it != legaleseTexts.constEnd() && it.key() == text);
writeEndTag(); //
}
}
@@ -3413,8 +3413,8 @@ void DitaXmlGenerator::generateSection(const NodeList& nl,
{
if (!nl.isEmpty()) {
writeStartTag(DT_ul);
- NodeList::ConstIterator m = nl.begin();
- while (m != nl.end()) {
+ NodeList::ConstIterator m = nl.constBegin();
+ while (m != nl.constEnd()) {
if ((*m)->access() != Node::Private) {
writeStartTag(DT_li);
QString marked = getMarkedUpSynopsis(*m, relative, marker, style);
@@ -3437,8 +3437,8 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section,
if (section.inherited.isEmpty())
return;
writeStartTag(DT_ul);
- QList >::ConstIterator p = section.inherited.begin();
- while (p != section.inherited.end()) {
+ QList >::ConstIterator p = section.inherited.constBegin();
+ while (p != section.inherited.constEnd()) {
writeStartTag(DT_li);
QString text;
text.setNum((*p).second);
@@ -4063,8 +4063,8 @@ void DitaXmlGenerator::findAllClasses(const InnerNode* node)
void DitaXmlGenerator::findAllFunctions(const InnerNode* node)
{
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
+ NodeList::ConstIterator c = node->childNodes().constBegin();
+ while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private) {
if ((*c)->isInnerNode() && (*c)->url().isEmpty()) {
findAllFunctions(static_cast(*c));
@@ -4085,8 +4085,8 @@ void DitaXmlGenerator::findAllFunctions(const InnerNode* node)
void DitaXmlGenerator::findAllLegaleseTexts(const InnerNode* node)
{
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
+ NodeList::ConstIterator c = node->childNodes().constBegin();
+ while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private) {
if (!(*c)->doc().legaleseText().isEmpty())
legaleseTexts.insertMulti((*c)->doc().legaleseText(), *c);
@@ -4099,8 +4099,8 @@ void DitaXmlGenerator::findAllLegaleseTexts(const InnerNode* node)
void DitaXmlGenerator::findAllNamespaces(const InnerNode* node)
{
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
+ NodeList::ConstIterator c = node->childNodes().constBegin();
+ while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private) {
if ((*c)->isInnerNode() && (*c)->url().isEmpty()) {
findAllNamespaces(static_cast(*c));
@@ -4413,8 +4413,8 @@ void DitaXmlGenerator::generateQmlSummary(const Section& section,
if (!section.members.isEmpty()) {
writeStartTag(DT_ul);
NodeList::ConstIterator m;
- m = section.members.begin();
- while (m != section.members.end()) {
+ m = section.members.constBegin();
+ while (m != section.members.constEnd()) {
writeStartTag(DT_li);
generateQmlItem(*m,relative,marker,true);
writeEndTag(); //
@@ -4481,7 +4481,7 @@ void DitaXmlGenerator::generateDetailedQmlMember(Node* node,
if (node->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast(node);
- NodeList::ConstIterator p = qpgn->childNodes().begin();
+ NodeList::ConstIterator p = qpgn->childNodes().constBegin();
if (qpgn->childNodes().size() == 1) {
qpn = static_cast(*p);
startQmlProperty(qpn,relative,marker);
@@ -4500,7 +4500,7 @@ void DitaXmlGenerator::generateDetailedQmlMember(Node* node,
writeStartTag(DT_qmlPropertyGroupDetail);
writeApiDesc(node, marker, node->title());
writeEndTag(); //
- while (p != qpgn->childNodes().end()) {
+ while (p != qpgn->childNodes().constEnd()) {
if ((*p)->type() == Node::QmlProperty) {
qpn = static_cast(*p);
startQmlProperty(qpn,relative,marker);
@@ -4546,8 +4546,8 @@ void DitaXmlGenerator::generateDetailedQmlMember(Node* node,
writeStartTag(DT_qmlPropertyGroupDetail);
writeApiDesc(node, marker, node->title());
writeEndTag(); //
- NodeList::ConstIterator p = qpn->qmlPropNodes().begin();
- while (p != qpn->qmlPropNodes().end()) {
+ NodeList::ConstIterator p = qpn->qmlPropNodes().constBegin();
+ while (p != qpn->qmlPropNodes().constEnd()) {
if ((*p)->type() == Node::QmlProperty) {
QmlPropertyNode* q = static_cast(*p);
startQmlProperty(q,relative,marker);
@@ -4793,8 +4793,8 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker)
if (!cn->baseClasses().isEmpty()) {
writeStartTag(DT_cxxClassDerivations);
- r = cn->baseClasses().begin();
- while (r != cn->baseClasses().end()) {
+ r = cn->baseClasses().constBegin();
+ while (r != cn->baseClasses().constEnd()) {
writeStartTag(DT_cxxClassDerivation);
writeStartTag(DT_cxxClassDerivationAccessSpecifier);
xmlWriter().writeAttribute("value",(*r).accessString());
@@ -4900,8 +4900,8 @@ void DitaXmlGenerator::writeFunctions(const Section& s,
CodeMarker* marker,
const QString& attribute)
{
- NodeList::ConstIterator m = s.members.begin();
- while (m != s.members.end()) {
+ NodeList::ConstIterator m = s.members.constBegin();
+ while (m != s.members.constEnd()) {
if ((*m)->type() == Node::Function) {
FunctionNode* fn = const_cast(static_cast(*m));
writeStartTag(DT_cxxFunction);
@@ -5091,8 +5091,8 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn,
const QList& parameters = fn->parameters();
if (!parameters.isEmpty()) {
writeStartTag(DT_cxxFunctionParameters);
- QList::ConstIterator p = parameters.begin();
- while (p != parameters.end()) {
+ QList::ConstIterator p = parameters.constBegin();
+ while (p != parameters.constEnd()) {
writeStartTag(DT_cxxFunctionParameter);
writeStartTag(DT_cxxFunctionParameterDeclaredType);
QString src = marker->typified((*p).leftType());
@@ -5129,8 +5129,8 @@ void DitaXmlGenerator::writeEnumerations(const Section& s,
CodeMarker* marker,
const QString& attribute)
{
- NodeList::ConstIterator m = s.members.begin();
- while (m != s.members.end()) {
+ NodeList::ConstIterator m = s.members.constBegin();
+ while (m != s.members.constEnd()) {
if ((*m)->type() == Node::Enum) {
const EnumNode* en = static_cast(*m);
writeStartTag(DT_cxxEnumeration);
@@ -5161,15 +5161,15 @@ void DitaXmlGenerator::writeEnumerations(const Section& s,
writeStartTag(DT_cxxEnumerationPrototype);
writeCharacters(en->name());
xmlWriter().writeCharacters(" = { ");
- QList::ConstIterator i = items.begin();
- while (i != items.end()) {
+ QList::ConstIterator i = items.constBegin();
+ while (i != items.constEnd()) {
writeCharacters((*i).name());
if (!(*i).value().isEmpty()) {
xmlWriter().writeCharacters(" = ");
writeCharacters((*i).value());
}
++i;
- if (i != items.end())
+ if (i != items.constEnd())
xmlWriter().writeCharacters(", ");
}
xmlWriter().writeCharacters(" }");
@@ -5184,8 +5184,8 @@ void DitaXmlGenerator::writeEnumerations(const Section& s,
if (!items.isEmpty()) {
writeStartTag(DT_cxxEnumerators);
- QList::ConstIterator i = items.begin();
- while (i != items.end()) {
+ QList::ConstIterator i = items.constBegin();
+ while (i != items.constEnd()) {
writeStartTag(DT_cxxEnumerator);
writeStartTag(DT_apiName);
writeCharacters((*i).name());
@@ -5251,8 +5251,8 @@ void DitaXmlGenerator::writeTypedefs(const Section& s,
const QString& attribute)
{
- NodeList::ConstIterator m = s.members.begin();
- while (m != s.members.end()) {
+ NodeList::ConstIterator m = s.members.constBegin();
+ while (m != s.members.constEnd()) {
if ((*m)->type() == Node::Typedef) {
const TypedefNode* tn = static_cast(*m);
writeStartTag(DT_cxxTypedef);
@@ -5314,8 +5314,8 @@ void DitaXmlGenerator::writeProperties(const Section& s,
CodeMarker* marker,
const QString& attribute)
{
- NodeList::ConstIterator m = s.members.begin();
- while (m != s.members.end()) {
+ NodeList::ConstIterator m = s.members.constBegin();
+ while (m != s.members.constEnd()) {
if ((*m)->type() == Node::Property) {
const PropertyNode* pn = static_cast(*m);
writeStartTag(DT_cxxVariable);
@@ -5426,8 +5426,8 @@ void DitaXmlGenerator::writeDataMembers(const Section& s,
CodeMarker* marker,
const QString& attribute)
{
- NodeList::ConstIterator m = s.members.begin();
- while (m != s.members.end()) {
+ NodeList::ConstIterator m = s.members.constBegin();
+ while (m != s.members.constEnd()) {
if ((*m)->type() == Node::Variable) {
const VariableNode* vn = static_cast(*m);
writeStartTag(DT_cxxVariable);
@@ -5510,8 +5510,8 @@ void DitaXmlGenerator::writeMacros(const Section& s,
CodeMarker* marker,
const QString& attribute)
{
- NodeList::ConstIterator m = s.members.begin();
- while (m != s.members.end()) {
+ NodeList::ConstIterator m = s.members.constBegin();
+ while (m != s.members.constEnd()) {
if ((*m)->type() == Node::Function) {
const FunctionNode* fn = static_cast(*m);
if (fn->isMacro()) {
@@ -5607,8 +5607,8 @@ void DitaXmlGenerator::writeMacros(const Section& s,
*/
void DitaXmlGenerator::writePropertyParameter(const QString& tag, const NodeList& nlist)
{
- NodeList::const_iterator n = nlist.begin();
- while (n != nlist.end()) {
+ NodeList::const_iterator n = nlist.constBegin();
+ while (n != nlist.constEnd()) {
xmlWriter().writeCharacters(" ");
writeCharacters(tag);
xmlWriter().writeCharacters(" ");
@@ -5695,8 +5695,8 @@ void DitaXmlGenerator::writeNestedClasses(const Section& s,
writeStartTag(DT_cxxClassNested);
writeStartTag(DT_cxxClassNestedDetail);
- NodeList::ConstIterator m = s.members.begin();
- while (m != s.members.end()) {
+ NodeList::ConstIterator m = s.members.constBegin();
+ while (m != s.members.constEnd()) {
if ((*m)->type() == Node::Class) {
writeStartTag(DT_cxxClassNestedClass);
QString link = linkForNode((*m), n);
@@ -5767,8 +5767,8 @@ DitaXmlGenerator::generateInnerNode(InnerNode* node)
}
}
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
+ NodeList::ConstIterator c = node->childNodes().constBegin();
+ while (c != node->childNodes().constEnd()) {
if ((*c)->isInnerNode() && (*c)->access() != Node::Private)
generateInnerNode((InnerNode*)*c);
++c;
@@ -5951,8 +5951,8 @@ void DitaXmlGenerator::writeDitaMap(Tree *tree)
xmlWriter().writeCharacters("The top level map for the Qt documentation");
writeEndTag(); //
writeEndTag(); //
- GuidMaps::iterator i = guidMaps.begin();
- while (i != guidMaps.end()) {
+ GuidMaps::iterator i = guidMaps.constBegin();
+ while (i != guidMaps.constEnd()) {
writeStartTag(DT_topicref);
if (i.key() != "qt.ditamap")
xmlWriter().writeAttribute("href",i.key());
@@ -6415,14 +6415,14 @@ DitaXmlGenerator::writeProlog(const InnerNode* inner)
writeStartTag(DT_othermeta);
xmlWriter().writeAttribute("name","includeFile");
QString text;
- QStringList::ConstIterator i = inner->includes().begin();
- while (i != inner->includes().end()) {
+ QStringList::ConstIterator i = inner->includes().constBegin();
+ while (i != inner->includes().constEnd()) {
if ((*i).startsWith(QLatin1Char('<')) && (*i).endsWith(QLatin1Char('>')))
text += *i;
else
text += QLatin1Char('<') + *i + QLatin1Char('>');
++i;
- if (i != inner->includes().end())
+ if (i != inner->includes().constEnd())
text += "\n";
}
xmlWriter().writeAttribute("content",text);
@@ -6506,8 +6506,8 @@ void DitaXmlGenerator::generateCollisionPages()
NodeList collisions;
const NodeList& nl = ncn->childNodes();
if (!nl.isEmpty()) {
- NodeList::ConstIterator it = nl.begin();
- while (it != nl.end()) {
+ NodeList::ConstIterator it = nl.constBegin();
+ while (it != nl.constEnd()) {
if (!(*it)->isInternal())
collisions.append(*it);
++it;
@@ -6545,8 +6545,8 @@ void DitaXmlGenerator::generateCollisionPages()
QList targets;
if (!ncn->linkTargets().isEmpty()) {
- QMap::ConstIterator t = ncn->linkTargets().begin();
- while (t != ncn->linkTargets().end()) {
+ QMap::ConstIterator t = ncn->linkTargets().constBegin();
+ while (t != ncn->linkTargets().constEnd()) {
int count = 0;
for (int i=0; i(collisions.at(i));
@@ -6562,8 +6562,8 @@ void DitaXmlGenerator::generateCollisionPages()
}
}
if (!targets.isEmpty()) {
- QList::ConstIterator t = targets.begin();
- while (t != targets.end()) {
+ QList::ConstIterator t = targets.constBegin();
+ while (t != targets.constEnd()) {
writeStartTag(DT_p);
writeGuidAttribute(Doc::canonicalTitle(*t));
xmlWriter().writeAttribute("outputclass","h2");
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index 3086a64..15d194e 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -1403,13 +1403,13 @@ void DocParser::parse(const QString& source,
const Macro ¯o = macroHash()->value(cmdStr);
int numPendingFi = 0;
QStringMap::ConstIterator d;
- d = macro.otherDefs.begin();
- while (d != macro.otherDefs.end()) {
+ d = macro.otherDefs.constBegin();
+ while (d != macro.otherDefs.constEnd()) {
append(Atom::FormatIf, d.key());
expandMacro(cmdStr, *d, macro.numParams);
++d;
- if (d == macro.otherDefs.end()) {
+ if (d == macro.otherDefs.constEnd()) {
append(Atom::FormatEndif);
}
else {
@@ -1785,8 +1785,8 @@ void DocParser::startFormat(const QString& format, int cmd)
{
enterPara();
- QMap::ConstIterator f = pendingFormats.begin();
- while (f != pendingFormats.end()) {
+ QMap::ConstIterator f = pendingFormats.constBegin();
+ while (f != pendingFormats.constEnd()) {
if (*f == format) {
location().warning(tr("Cannot nest '\\%1' commands")
.arg(cmdName(cmd)));
@@ -3108,8 +3108,8 @@ void Doc::initialize(const Config& config)
QStringMap reverseAliasMap;
QSet commands = config.subVars(CONFIG_ALIAS);
- QSet::ConstIterator c = commands.begin();
- while (c != commands.end()) {
+ QSet::ConstIterator c = commands.constBegin();
+ while (c != commands.constEnd()) {
QString alias = config.getString(CONFIG_ALIAS + Config::dot + *c);
if (reverseAliasMap.contains(alias)) {
config.lastLocation().warning(tr("Command name '\\%1' cannot stand"
@@ -3136,8 +3136,8 @@ void Doc::initialize(const Config& config)
}
QSet macroNames = config.subVars(CONFIG_MACRO);
- QSet::ConstIterator n = macroNames.begin();
- while (n != macroNames.end()) {
+ QSet::ConstIterator n = macroNames.constBegin();
+ while (n != macroNames.constEnd()) {
QString macroDotName = CONFIG_MACRO + Config::dot + *n;
Macro macro;
macro.numParams = -1;
@@ -3149,8 +3149,8 @@ void Doc::initialize(const Config& config)
bool silent = false;
QSet formats = config.subVars(macroDotName);
- QSet::ConstIterator f = formats.begin();
- while (f != formats.end()) {
+ QSet::ConstIterator f = formats.constBegin();
+ while (f != formats.constEnd()) {
QString def = config.getString(macroDotName + Config::dot + *f);
if (!def.isEmpty()) {
macro.otherDefs.insert(*f, def);
@@ -3162,7 +3162,7 @@ void Doc::initialize(const Config& config)
if (!silent) {
QString other = tr("default");
if (macro.defaultDef.isEmpty())
- other = macro.otherDefs.begin().key();
+ other = macro.otherDefs.constBegin().key();
config.lastLocation().warning(tr("Macro '\\%1' takes"
" inconsistent number"
" of arguments (%2"
diff --git a/src/tools/qdoc/editdistance.cpp b/src/tools/qdoc/editdistance.cpp
index 6538f6b..353f863 100644
--- a/src/tools/qdoc/editdistance.cpp
+++ b/src/tools/qdoc/editdistance.cpp
@@ -88,8 +88,8 @@ QString nearestName( const QString& actual, const QSet& candidates )
int numBest = 0;
QString best;
- QSet::ConstIterator c = candidates.begin();
- while ( c != candidates.end() ) {
+ QSet::ConstIterator c = candidates.constBegin();
+ while ( c != candidates.constEnd() ) {
if ( (*c)[0] == actual[0] ) {
int delta = editDistance( actual, *c );
if ( delta < deltaBest ) {
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index a0c7893..4f0c69f 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -146,9 +146,9 @@ void Generator::appendFullNames(Text& text,
const Node* relative,
CodeMarker* marker)
{
- NodeList::ConstIterator n = nodes.begin();
+ NodeList::ConstIterator n = nodes.constBegin();
int index = 0;
- while (n != nodes.end()) {
+ while (n != nodes.constEnd()) {
appendFullName(text,*n,relative,marker);
text << comma(index++,nodes.count());
++n;
@@ -164,8 +164,8 @@ void Generator::appendSortedNames(Text& text,
QMap classMap;
int index = 0;
- r = classes.begin();
- while (r != classes.end()) {
+ r = classes.constBegin();
+ while (r != classes.constEnd()) {
if ((*r).node->access() == Node::Public &&
(*r).node->status() != Node::Internal
&& !(*r).node->doc().isEmpty()) {
@@ -755,8 +755,8 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
const EnumNode *enume = (const EnumNode *) node;
QSet definedItems;
- QList::ConstIterator it = enume->items().begin();
- while (it != enume->items().end()) {
+ QList::ConstIterator it = enume->items().constBegin();
+ while (it != enume->items().constEnd()) {
definedItems.insert((*it).name());
++it;
}
@@ -765,8 +765,8 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
QSet allItems = definedItems + documentedItems;
if (allItems.count() > definedItems.count() ||
allItems.count() > documentedItems.count()) {
- QSet::ConstIterator a = allItems.begin();
- while (a != allItems.end()) {
+ QSet::ConstIterator a = allItems.constBegin();
+ while (a != allItems.constEnd()) {
if (!definedItems.contains(*a)) {
QString details;
QString best = nearestName(*a, definedItems);
@@ -790,8 +790,8 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
else if (node->type() == Node::Function) {
const FunctionNode *func = static_cast(node);
QSet definedParams;
- QList::ConstIterator p = func->parameters().begin();
- while (p != func->parameters().end()) {
+ QList::ConstIterator p = func->parameters().constBegin();
+ while (p != func->parameters().constEnd()) {
if ((*p).name().isEmpty() && (*p).leftType() != QLatin1String("...")
&& func->name() != QLatin1String("operator++")
&& func->name() != QLatin1String("operator--")) {
@@ -807,8 +807,8 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
QSet allParams = definedParams + documentedParams;
if (allParams.count() > definedParams.count()
|| allParams.count() > documentedParams.count()) {
- QSet::ConstIterator a = allParams.begin();
- while (a != allParams.end()) {
+ QSet::ConstIterator a = allParams.constBegin();
+ while (a != allParams.constEnd()) {
if (!definedParams.contains(*a)) {
QString details;
QString best = nearestName(*a, definedParams);
@@ -980,9 +980,9 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker)
<< "Inherits: "
<< Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD);
- r = classe->baseClasses().begin();
+ r = classe->baseClasses().constBegin();
index = 0;
- while (r != classe->baseClasses().end()) {
+ while (r != classe->baseClasses().constEnd()) {
text << Atom(Atom::LinkNode, CodeMarker::stringForNode((*r).node))
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
<< Atom(Atom::String, (*r).dataTypeWithTemplateArgs)
@@ -1055,8 +1055,8 @@ void Generator::generateInnerNode(InnerNode* node)
}
}
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
+ NodeList::ConstIterator c = node->childNodes().constBegin();
+ while (c != node->childNodes().constEnd()) {
if ((*c)->isInnerNode() && (*c)->access() != Node::Private) {
generateInnerNode((InnerNode*)*c);
}
@@ -1323,8 +1323,8 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker)
NodeList reentrant;
NodeList threadsafe;
NodeList nonreentrant;
- NodeList::ConstIterator c = innerNode->childNodes().begin();
- while (c != innerNode->childNodes().end()) {
+ NodeList::ConstIterator c = innerNode->childNodes().constBegin();
+ while (c != innerNode->childNodes().constEnd()) {
if ((*c)->status() != Node::Obsolete){
switch ((*c)->threadSafeness()) {
@@ -1420,8 +1420,8 @@ void Generator::generateTree(Tree *tree)
Generator *Generator::generatorForFormat(const QString& format)
{
- QList::ConstIterator g = generators.begin();
- while (g != generators.end()) {
+ QList::ConstIterator g = generators.constBegin();
+ while (g != generators.constEnd()) {
if ((*g)->format() == format)
return *g;
++g;
@@ -1600,22 +1600,22 @@ void Generator::initialize(const Config &config)
QString imagesDotFileExtensions =
CONFIG_IMAGES + Config::dot + CONFIG_FILEEXTENSIONS;
QSet formats = config.subVars(imagesDotFileExtensions);
- QSet::ConstIterator f = formats.begin();
- while (f != formats.end()) {
+ QSet::ConstIterator f = formats.constBegin();
+ while (f != formats.constEnd()) {
imgFileExts[*f] = config.getStringList(imagesDotFileExtensions +
Config::dot + *f);
++f;
}
- QList::ConstIterator g = generators.begin();
- while (g != generators.end()) {
+ QList::ConstIterator g = generators.constBegin();
+ while (g != generators.constEnd()) {
if (outputFormats.contains((*g)->format())) {
currentGenerator_ = (*g);
(*g)->initializeGenerator(config);
QStringList extraImages =
config.getCleanPathList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format());
- QStringList::ConstIterator e = extraImages.begin();
- while (e != extraImages.end()) {
+ QStringList::ConstIterator e = extraImages.constBegin();
+ while (e != extraImages.constEnd()) {
QString userFriendlyFilePath;
QString filePath = Config::findFile(config.lastLocation(),
imageFiles,
@@ -1641,8 +1641,8 @@ void Generator::initialize(const Config &config)
QStringList searchDirs = QStringList() << templateDir;
QStringList scripts =
config.getCleanPathList((*g)->format()+Config::dot+CONFIG_SCRIPTS);
- e = scripts.begin();
- while (e != scripts.end()) {
+ e = scripts.constBegin();
+ while (e != scripts.constEnd()) {
QString userFriendlyFilePath;
QString filePath = Config::findFile(config.lastLocation(),
scriptFiles,
@@ -1661,8 +1661,8 @@ void Generator::initialize(const Config &config)
QStringList styles =
config.getCleanPathList((*g)->format()+Config::dot+CONFIG_STYLESHEETS);
- e = styles.begin();
- while (e != styles.end()) {
+ e = styles.constBegin();
+ while (e != styles.constEnd()) {
QString userFriendlyFilePath;
QString filePath = Config::findFile(config.lastLocation(),
styleFiles,
@@ -1685,13 +1685,13 @@ void Generator::initialize(const Config &config)
QRegExp secondParamAndAbove("[\2-\7]");
QSet formattingNames = config.subVars(CONFIG_FORMATTING);
- QSet::ConstIterator n = formattingNames.begin();
- while (n != formattingNames.end()) {
+ QSet::ConstIterator n = formattingNames.constBegin();
+ while (n != formattingNames.constEnd()) {
QString formattingDotName = CONFIG_FORMATTING + Config::dot + *n;
QSet formats = config.subVars(formattingDotName);
- QSet::ConstIterator f = formats.begin();
- while (f != formats.end()) {
+ QSet::ConstIterator f = formats.constBegin();
+ while (f != formats.constEnd()) {
QString def = config.getString(formattingDotName +
Config::dot + *f);
if (!def.isEmpty()) {
@@ -1953,8 +1953,8 @@ void Generator::supplementAlsoList(const Node *node, QList &alsoList)
void Generator::terminate()
{
- QList::ConstIterator g = generators.begin();
- while (g != generators.end()) {
+ QList::ConstIterator g = generators.constBegin();
+ while (g != generators.constEnd()) {
if (outputFormats.contains((*g)->format()))
(*g)->terminateGenerator();
++g;
diff --git a/src/tools/qdoc/helpprojectwriter.cpp b/src/tools/qdoc/helpprojectwriter.cpp
index 626d9aa..5e4a60b 100644
--- a/src/tools/qdoc/helpprojectwriter.cpp
+++ b/src/tools/qdoc/helpprojectwriter.cpp
@@ -606,7 +606,7 @@ void HelpProjectWriter::generateProject(HelpProject &project)
// Write customFilter elements.
QHash >::ConstIterator it;
- for (it = project.customFilters.begin(); it != project.customFilters.end(); ++it) {
+ for (it = project.customFilters.constBegin(); it != project.customFilters.constEnd(); ++it) {
writer.writeStartElement("customFilter");
writer.writeAttribute("name", it.key());
foreach (const QString &filter, it.value())
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 0fdc8bf..83f3c4a 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -185,8 +185,8 @@ void HtmlGenerator::initializeGenerator(const Config &config)
naturalLanguage = QLatin1String("en");
QSet editionNames = config.subVars(CONFIG_EDITION);
- QSet::ConstIterator edition = editionNames.begin();
- while (edition != editionNames.end()) {
+ QSet::ConstIterator edition = editionNames.constBegin();
+ while (edition != editionNames.constEnd()) {
QString editionName = *edition;
QStringList editionModules = config.getStringList(CONFIG_EDITION +
Config::dot +
@@ -608,11 +608,11 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Atom::SinceList:
{
NewSinceMaps::const_iterator nsmap;
- nsmap = newSinceMaps.find(atom->string());
+ nsmap = newSinceMaps.constFind(atom->string());
NewClassMaps::const_iterator ncmap;
- ncmap = newClassMaps.find(atom->string());
+ ncmap = newClassMaps.constFind(atom->string());
NewClassMaps::const_iterator nqcmap;
- nqcmap = newQmlClassMaps.find(atom->string());
+ nqcmap = newQmlClassMaps.constFind(atom->string());
if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) {
QList sections;
@@ -1231,8 +1231,8 @@ void HtmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
/*
sections is built above for the call to generateTableOfContents().
*/
- s = sections.begin();
- while (s != sections.end()) {
+ s = sections.constBegin();
+ while (s != sections.constEnd()) {
if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
if (!s->inherited.isEmpty())
needOtherSection = true;
@@ -1269,8 +1269,8 @@ void HtmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
out() << "Additional Inherited Members
\n"
"\n";
- s = sections.begin();
- while (s != sections.end()) {
+ s = sections.constBegin();
+ while (s != sections.constEnd()) {
if (s->members.isEmpty() && !s->inherited.isEmpty())
generateSectionInheritedList(*s, inner, marker);
++s;
@@ -1293,15 +1293,15 @@ void HtmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
}
sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay);
- s = sections.begin();
- while (s != sections.end()) {
+ s = sections.constBegin();
+ while (s != sections.constEnd()) {
//out() << "
\n";
if (!(*s).divClass.isEmpty())
out() << "\n"; // QTBUG-9504
out() << "
" << protectEnc((*s).name) << "
\n";
- NodeList::ConstIterator m = (*s).members.begin();
- while (m != (*s).members.end()) {
+ NodeList::ConstIterator m = (*s).members.constBegin();
+ while (m != (*s).members.constEnd()) {
if ((*m)->access() != Node::Private) { // ### check necessary?
if ((*m)->type() != Node::Class)
generateDetailedMember(*m, inner, marker);
@@ -1382,8 +1382,8 @@ void HtmlGenerator::generateCollisionPages()
NodeList collisions;
const NodeList& nl = ncn->childNodes();
if (!nl.isEmpty()) {
- NodeList::ConstIterator it = nl.begin();
- while (it != nl.end()) {
+ NodeList::ConstIterator it = nl.constBegin();
+ while (it != nl.constEnd()) {
if (!(*it)->isInternal())
collisions.append(*it);
++it;
@@ -1420,8 +1420,8 @@ void HtmlGenerator::generateCollisionPages()
QList
targets;
if (!ncn->linkTargets().isEmpty()) {
- QMap::ConstIterator t = ncn->linkTargets().begin();
- while (t != ncn->linkTargets().end()) {
+ QMap::ConstIterator t = ncn->linkTargets().constBegin();
+ while (t != ncn->linkTargets().constEnd()) {
int count = 0;
for (int i=0; i(collisions.at(i));
@@ -1437,8 +1437,8 @@ void HtmlGenerator::generateCollisionPages()
}
}
if (!targets.isEmpty()) {
- QList::ConstIterator t = targets.begin();
- while (t != targets.end()) {
+ QList::ConstIterator t = targets.constBegin();
+ while (t != targets.constEnd()) {
out() << "";
out() << "" << protectEnc(*t) << "
\n";
out() << "\n";
@@ -1588,8 +1588,8 @@ void HtmlGenerator::generateFakeNode(FakeNode* fake, CodeMarker* marker)
out() << "
\n";
}
- s = sections.begin();
- while (s != sections.end()) {
+ s = sections.constBegin();
+ while (s != sections.constEnd()) {
out() << "" << divNavTop << '\n';
out() << "" << protectEnc((*s).name) << "
\n";
@@ -1608,11 +1608,11 @@ void HtmlGenerator::generateFakeNode(FakeNode* fake, CodeMarker* marker)
//out() << "
\n";
sections = marker->qmlSections(qml_cn,CodeMarker::Detailed);
- s = sections.begin();
- while (s != sections.end()) {
+ s = sections.constBegin();
+ while (s != sections.constEnd()) {
out() << "" << protectEnc((*s).name) << "
\n";
- NodeList::ConstIterator m = (*s).members.begin();
- while (m != (*s).members.end()) {
+ NodeList::ConstIterator m = (*s).members.constBegin();
+ while (m != (*s).members.constEnd()) {
generateDetailedQmlMember(*m, fake, marker);
out() << "
\n";
++m;
@@ -1625,8 +1625,8 @@ void HtmlGenerator::generateFakeNode(FakeNode* fake, CodeMarker* marker)
}
sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay);
- s = sections.begin();
- while (s != sections.end()) {
+ s = sections.constBegin();
+ while (s != sections.constEnd()) {
out() << "" << divNavTop << '\n';
out() << "" << protectEnc((*s).name) << "
\n";
generateSectionList(*s, fake, marker, CodeMarker::Summary);
@@ -1668,13 +1668,13 @@ void HtmlGenerator::generateFakeNode(FakeNode* fake, CodeMarker* marker)
}
sections = marker->sections(fake, CodeMarker::Detailed, CodeMarker::Okay);
- s = sections.begin();
- while (s != sections.end()) {
+ s = sections.constBegin();
+ while (s != sections.constEnd()) {
//out() << "
\n";
out() << "" << protectEnc((*s).name) << "
\n";
- NodeList::ConstIterator m = (*s).members.begin();
- while (m != (*s).members.end()) {
+ NodeList::ConstIterator m = (*s).members.constBegin();
+ while (m != (*s).members.constEnd()) {
generateDetailedMember(*m, fake, marker);
++m;
}
@@ -2031,8 +2031,8 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
else if (sections && ((node->type() == Node::Class) ||
(node->type() == Node::Namespace) ||
(node->subType() == Node::QmlClass))) {
- QList::ConstIterator s = sections->begin();
- while (s != sections->end()) {
+ QList::ConstIterator s = sections->constBegin();
+ while (s != sections->constEnd()) {
if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) {
out() << "\n";
out() << "" << protectEnc(sections.at(i).name) << "
\n";
- NodeList::ConstIterator m = sections.at(i).members.begin();
- while (m != sections.at(i).members.end()) {
+ NodeList::ConstIterator m = sections.at(i).members.constBegin();
+ while (m != sections.at(i).members.constEnd()) {
if ((*m)->access() != Node::Private)
generateDetailedMember(*m, inner, marker);
++m;
@@ -2235,8 +2235,8 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative,
return;
NodeMap topLevel;
- NodeMap::ConstIterator c = classMap.begin();
- while (c != classMap.end()) {
+ NodeMap::ConstIterator c = classMap.constBegin();
+ while (c != classMap.constEnd()) {
const ClassNode *classe = static_cast(*c);
if (classe->baseClasses().isEmpty())
topLevel.insert(classe->name(), classe);
@@ -2254,7 +2254,7 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative,
}
else {
const ClassNode *child =
- static_cast(*stack.top().begin());
+ static_cast(*stack.top().constBegin());
out() << "- ";
generateFullName(child, relative, marker);
out() << "
\n";
@@ -2347,8 +2347,8 @@ void HtmlGenerator::generateCompactList(const Node *relative,
for (int i=0; i<26; ++i)
count[i] = 0;
- NodeMap::const_iterator iter = classMap.begin();
- while (iter != classMap.end()) {
+ NodeMap::const_iterator iter = classMap.constBegin();
+ while (iter != classMap.constEnd()) {
if (!iter.key().contains("::")) {
QChar c = iter.key()[0];
if ((c >= 'A') && (c <= 'Z')) {
@@ -2388,8 +2388,8 @@ void HtmlGenerator::generateCompactList(const Node *relative,
*/
QString first;
QString last;
- NodeMap::const_iterator iter = classMap.begin();
- while (iter != classMap.end()) {
+ NodeMap::const_iterator iter = classMap.constBegin();
+ while (iter != classMap.constEnd()) {
if (!iter.key().contains("::")) {
first = iter.key();
break;
@@ -2398,10 +2398,10 @@ void HtmlGenerator::generateCompactList(const Node *relative,
}
if (first.isEmpty())
- first = classMap.begin().key();
+ first = classMap.constBegin().key();
- iter = classMap.end();
- while (iter != classMap.begin()) {
+ iter = classMap.constEnd();
+ while (iter != classMap.constBegin()) {
--iter;
if (!iter.key().contains("::")) {
last = iter.key();
@@ -2410,7 +2410,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
}
if (last.isEmpty())
- last = classMap.begin().key();
+ last = classMap.constBegin().key();
if (classMap.size() > 1) {
while (commonPrefixLen < first.length() + 1 &&
@@ -2433,8 +2433,8 @@ void HtmlGenerator::generateCompactList(const Node *relative,
QString paragraphName[NumParagraphs+1];
QSet usedParagraphNames;
- NodeMap::ConstIterator c = classMap.begin();
- while (c != classMap.end()) {
+ NodeMap::ConstIterator c = classMap.constBegin();
+ while (c != classMap.constEnd()) {
QStringList pieces = c.key().split("::");
QString key;
int idx = commonPrefixLen;
@@ -2578,8 +2578,8 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative,
#if 1
out() << "\n";
#endif
- QMap::ConstIterator f = funcIndex.begin();
- while (f != funcIndex.end()) {
+ QMap::ConstIterator f = funcIndex.constBegin();
+ while (f != funcIndex.constEnd()) {
#if 1
out() << "- ";
#else
@@ -2593,8 +2593,8 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative,
nextLetter++;
}
- NodeMap::ConstIterator s = (*f).begin();
- while (s != (*f).end()) {
+ NodeMap::ConstIterator s = (*f).constBegin();
+ while (s != (*f).constEnd()) {
out() << ' ';
generateFullName((*s)->parent(), relative, marker, *s);
++s;
@@ -2615,8 +2615,8 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative,
void HtmlGenerator::generateLegaleseList(const Node *relative,
CodeMarker *marker)
{
- QMap::ConstIterator it = legaleseTexts.begin();
- while (it != legaleseTexts.end()) {
+ QMap::ConstIterator it = legaleseTexts.constBegin();
+ while (it != legaleseTexts.constEnd()) {
Text text = it.key();
//out() << "
\n";
generateText(text, relative, marker);
@@ -2626,7 +2626,7 @@ void HtmlGenerator::generateLegaleseList(const Node *relative,
generateFullName(it.value(), relative, marker);
out() << " \n";
++it;
- } while (it != legaleseTexts.end() && it.key() == text);
+ } while (it != legaleseTexts.constEnd() && it.key() == text);
out() << "
\n";
}
}
@@ -2799,8 +2799,8 @@ void HtmlGenerator::generateSection(const NodeList& nl,
}
int i = 0;
- NodeList::ConstIterator m = nl.begin();
- while (m != nl.end()) {
+ NodeList::ConstIterator m = nl.constBegin();
+ while (m != nl.constEnd()) {
if ((*m)->access() == Node::Private) {
++m;
continue;
@@ -2860,8 +2860,8 @@ void HtmlGenerator::generateSectionList(const Section& section,
}
int i = 0;
- NodeList::ConstIterator m = section.members.begin();
- while (m != section.members.end()) {
+ NodeList::ConstIterator m = section.members.constBegin();
+ while (m != section.members.constEnd()) {
if ((*m)->access() == Node::Private) {
++m;
continue;
@@ -2909,8 +2909,8 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section,
const Node *relative,
CodeMarker *marker)
{
- QList >::ConstIterator p = section.inherited.begin();
- while (p != section.inherited.end()) {
+ QList >::ConstIterator p = section.inherited.constBegin();
+ while (p != section.inherited.constEnd()) {
out() << "- ";
out() << (*p).second << ' ';
if ((*p).second == 1) {
@@ -3632,8 +3632,8 @@ void HtmlGenerator::findAllClasses(const InnerNode *node)
void HtmlGenerator::findAllFunctions(const InnerNode *node)
{
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
+ NodeList::ConstIterator c = node->childNodes().constBegin();
+ while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private) {
if ((*c)->isInnerNode() && (*c)->url().isEmpty()) {
findAllFunctions(static_cast(*c));
@@ -3654,8 +3654,8 @@ void HtmlGenerator::findAllFunctions(const InnerNode *node)
void HtmlGenerator::findAllLegaleseTexts(const InnerNode *node)
{
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
+ NodeList::ConstIterator c = node->childNodes().constBegin();
+ while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private) {
if (!(*c)->doc().legaleseText().isEmpty())
legaleseTexts.insertMulti((*c)->doc().legaleseText(), *c);
@@ -3668,8 +3668,8 @@ void HtmlGenerator::findAllLegaleseTexts(const InnerNode *node)
void HtmlGenerator::findAllNamespaces(const InnerNode *node)
{
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
+ NodeList::ConstIterator c = node->childNodes().constBegin();
+ while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private) {
if ((*c)->isInnerNode() && (*c)->url().isEmpty()) {
findAllNamespaces(static_cast(*c));
@@ -4033,8 +4033,8 @@ void HtmlGenerator::generateQmlSummary(const Section& section,
if (!section.members.isEmpty()) {
out() << "