diff options
author | Paul Wicking <paul.wicking@qt.io> | 2020-04-22 14:57:45 +0200 |
---|---|---|
committer | cherrypickbot <cherrypickbot@codereview.qt-project.org> | 2020-05-07 05:13:16 +0000 |
commit | 87a862817ccdabb3f7c0e34a2b27c94663e3a1f8 (patch) | |
tree | 4228779863c41e7ed9a8a4fb5ffac3678ef05736 | |
parent | 6e65714cac98c2d355c06c10d355e82cfb07aa4b (diff) |
QDoc: Cleanup in htmlgenerator (refactoring)
Remove duplicate public keyword from header.
Prefer ranged for loop.
Task-number: QTBUG-71176
Change-Id: Ic223dd36bf510272d94cda80338dd39e835b9f15
Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
(cherry picked from commit 386c392ac0e0692946ba00c3f61ef3d191188d6c)
Reviewed-by: Cherry-pick Bot
-rw-r--r-- | src/qdoc/htmlgenerator.cpp | 8 | ||||
-rw-r--r-- | src/qdoc/htmlgenerator.h | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp index 3fc95b954..ed130aaf8 100644 --- a/src/qdoc/htmlgenerator.cpp +++ b/src/qdoc/htmlgenerator.cpp @@ -3925,8 +3925,8 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString QString fullName = project + QLatin1Char('/') + en->title(); QSet<QString> tags; - for (int idx = 0; idx < manifestMetaContent.size(); ++idx) { - const auto names = manifestMetaContent[idx].names; + for (const auto &index : manifestMetaContent) { + const auto &names = index.names; for (const QString &name : names) { bool match = false; int wildcard = name.indexOf(QChar('*')); @@ -3941,8 +3941,8 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString match = fullName.startsWith(name.left(wildcard)); } if (match) { - tags += manifestMetaContent[idx].tags; - const auto attributes = manifestMetaContent[idx].attributes; + tags += index.tags; + const auto attributes = index.attributes; for (const QString &attr : attributes) { QLatin1Char div(':'); QStringList attrList = attr.split(div); diff --git a/src/qdoc/htmlgenerator.h b/src/qdoc/htmlgenerator.h index 753802c72..8a3e43863 100644 --- a/src/qdoc/htmlgenerator.h +++ b/src/qdoc/htmlgenerator.h @@ -50,7 +50,6 @@ class HtmlGenerator : public XmlGenerator Q_DECLARE_TR_FUNCTIONS(QDoc::HtmlGenerator) public: -public: HtmlGenerator(); ~HtmlGenerator() override; |