summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2018-03-07 14:37:52 +0100
committerMartin Smith <martin.smith@qt.io>2018-03-22 15:46:54 +0000
commit7e14432d7cdd42729094c7f1e6901ba3b3b350ca (patch)
tree95d325939ab6d22453a6315deeb7e9aa8c6ec7b4
parent7c815274fa95594130d8f66dd5b6931bf3044eca (diff)
downloadqttools-7e14432d7cdd42729094c7f1e6901ba3b3b350ca.tar.gz
qdoc: Don't pass -isystem to clang without setting QDOC_PASS_ISYSTEM
This update surrounds the adding of -system parameters to includePaths with qdoc will not pass any isystem includes to clang. This update also simplifies some if statements in the help project writer by using some existing convenience functions in place of comparisons to enum values. Change-Id: I35d89501dcb51a98af6a6c3278f0f071ceb78259 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/qdoc/helpprojectwriter.cpp18
-rw-r--r--src/qdoc/main.cpp2
2 files changed, 10 insertions, 10 deletions
diff --git a/src/qdoc/helpprojectwriter.cpp b/src/qdoc/helpprojectwriter.cpp
index e9c6fcc73..3ab92b641 100644
--- a/src/qdoc/helpprojectwriter.cpp
+++ b/src/qdoc/helpprojectwriter.cpp
@@ -236,7 +236,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
if (!node->url().isEmpty() && !(project.includeIndexNodes && !node->url().startsWith("http")))
return false;
- if (node->access() == Node::Private || node->status() == Node::Internal)
+ if (node->isPrivate() || node->isInternal())
return false;
if (node->name().isEmpty())
@@ -269,15 +269,14 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
}
}
// Accept only the node types in the selectors hash.
- else if (node->type() != Node::Document)
+ else if (!node->isDocumentNode())
project.subprojects[i].nodes[objName] = node;
else {
// Accept only doc nodes with subtypes contained in the selector's
// mask.
const DocumentNode *docNode = static_cast<const DocumentNode *>(node);
if (subproject.selectors[node->type()].contains(docNode->docSubtype()) &&
- docNode->docSubtype() != Node::ExternalPage &&
- !docNode->fullTitle().isEmpty()) {
+ !docNode->isExternalPage() && !docNode->fullTitle().isEmpty()) {
project.subprojects[i].nodes[objName] = node;
}
@@ -416,8 +415,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
// attributes.
case Node::Document: {
const DocumentNode *docNode = static_cast<const DocumentNode*>(node);
- if (docNode->docSubtype() != Node::ExternalPage &&
- docNode->docSubtype() != Node::Image &&
+ if (!docNode->isExternalPage() && docNode->docSubtype() != Node::Image &&
!docNode->fullTitle().isEmpty()) {
if (docNode->docSubtype() != Node::File) {
@@ -479,10 +477,10 @@ void HelpProjectWriter::generateSections(HelpProject &project,
if (childNode->isIndexNode())
continue;
- if (childNode->access() == Node::Private)
+ if (childNode->isPrivate())
continue;
- if (childNode->type() == Node::Document) {
+ if (childNode->isDocumentNode()) {
childSet << childNode;
}
else if (childNode->isQmlPropertyGroup() || childNode->isJsPropertyGroup()) {
@@ -497,7 +495,7 @@ void HelpProjectWriter::generateSections(HelpProject &project,
*/
const Aggregate* inner = static_cast<const Aggregate*>(childNode);
foreach (const Node* n, inner->childNodes()) {
- if (n->access() == Node::Private)
+ if (n->isPrivate())
continue;
childSet << n;
}
@@ -509,7 +507,7 @@ void HelpProjectWriter::generateSections(HelpProject &project,
project.memberStatus[childNode->relates()].insert(childNode->status());
}
- if (childNode->type() == Node::Function) {
+ if (childNode->isFunction()) {
const FunctionNode *funcNode = static_cast<const FunctionNode *>(childNode);
if (funcNode->isOverload())
continue;
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp
index a328b7af1..79cde7950 100644
--- a/src/qdoc/main.cpp
+++ b/src/qdoc/main.cpp
@@ -704,9 +704,11 @@ void QDocCommandLineParser::process(const QCoreApplication &app)
const auto paths = values(includePathOption);
for (const auto &i : paths)
includesPaths << "-I" << currentDir.absoluteFilePath(i);
+#ifdef QDOC_PASS_ISYSTEM
const auto paths2 = values(includePathSystemOption);
for (const auto &i : paths2)
includesPaths << "-isystem" << currentDir.absoluteFilePath(i);
+#endif
const auto paths3 = values(frameworkOption);
for (const auto &i : paths3)
includesPaths << "-F" << currentDir.absoluteFilePath(i);