summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2015-08-05 09:40:46 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-08-06 07:03:35 +0000
commit5677176d76a76d5166c917b40e5de4e401b8312b (patch)
tree248d420c82998889da6dffa4ae0a5388dc36ed00 /src/tools/qdoc
parent5c1b9bbdf14a9537bd66aedbfd1c72bde0c899e0 (diff)
qdoc: Don't use QStringLiteral in string comparisons
Using QStringLiteral to compare strings performs poorly compared to QLatin1String. These cases were previously fixed by commit 1a5c0b26, but some were reintroduced with new commits to QDoc. Change-Id: I272376052e876d88817606deb0a6dda92867dcbf Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/tools/qdoc')
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index ecccd48a6c..911b91991f 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -691,9 +691,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
else if ((idx = atom->string().indexOf(QStringLiteral("bymodule"))) != -1) {
QString moduleName = atom->string().mid(idx + 8).trimmed();
Node::Genus genus = Node::CPP;
- if (atom->string().startsWith(QStringLiteral("qml")))
+ if (atom->string().startsWith(QLatin1String("qml")))
genus = Node::QML;
- else if (atom->string().startsWith(QStringLiteral("js")))
+ else if (atom->string().startsWith(QLatin1String("js")))
genus = Node::JS;
QDocDatabase* qdb = QDocDatabase::qdocDB();
const CollectionNode* cn = qdb->getCollectionNode(moduleName, genus);
@@ -1667,7 +1667,7 @@ void HtmlGenerator::generateDocumentNode(DocumentNode* dn, CodeMarker* marker)
Generate the TOC for the new doc format.
Don't generate a TOC for the home page.
*/
- if ((dn->name() != QStringLiteral("index.html")))
+ if ((dn->name() != QLatin1String("index.html")))
generateTableOfContents(dn,marker,0);
generateKeywordAnchors(dn);
@@ -4557,11 +4557,11 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
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")))
+ || s == QLatin1String("qt")
+ || s == QLatin1String("the")
+ || s == QLatin1String("and")
+ || s.startsWith(QLatin1String("example"))
+ || s.startsWith(QLatin1String("chapter")))
tag_it = tags.erase(tag_it);
else if (s != *tag_it) {
modified << s;