summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2017-11-08 10:34:46 +0100
committerMartin Smith <martin.smith@qt.io>2017-11-08 10:01:31 +0000
commit995c91cd814d47e5ac3e20aca1d70d6e66f39cf2 (patch)
treee9c8ce4f3635d15dd5e720296fc00028fd641e61
parente78a487010d3b81b21b05f100772df37a414107f (diff)
downloadqttools-wip/qdoc-clang.tar.gz
qdoc: Remove unnecessary call of location().push()wip/qdoc-clang
The function pushes the file name onto the location stack so that if an error occurs while processing the macro, the error message can contain the correct file location for the macro in error. But this call was pushing the location of the file containing all the macro definitions. If there is an error processing the macro, it should refer to the location where the macro was used, because that's where the error is, not in the macro definition. So the call to push() was wrong to begin with. Besides that, the push was never popped, which led to a fatal qdoc error in macOS. Change-Id: Ib2f74556f6a30a557e79d5c85cd12c8b3077b99a Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/qdoc/doc.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/qdoc/doc.cpp b/src/qdoc/doc.cpp
index 12b7a4f5f..adc8db72f 100644
--- a/src/qdoc/doc.cpp
+++ b/src/qdoc/doc.cpp
@@ -1414,7 +1414,6 @@ void DocParser::parse(const QString& source,
"syntax definitions"));
}
else {
- location().push(macro.defaultDefLocation.filePath());
QString expanded = expandMacroToString(cmdStr,
macro.defaultDef,
macro.numParams);