diff options
author | Martin Smith <martin.smith@qt.io> | 2018-01-09 16:00:45 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-01-12 11:00:19 +0000 |
commit | 2eefc8e650ab191b2e5f99843c67959d6d7643b8 (patch) | |
tree | 4c38d3dec555601cd8596d30941abd25452dbaac /src/qdoc/clangcodeparser.cpp | |
parent | 0c10a2186e2413936cbd3c685c7d61427ec76559 (diff) | |
download | qttools-2eefc8e650ab191b2e5f99843c67959d6d7643b8.tar.gz |
qdoc: Correct handling of functions declared in Q_OBJECT
These functions were being eliminated from the documentation in
the clang visitor, but this doesn't when the functions actually
have documentation. This update moves the test for whether they
should be documented or not to the Generator class.
This update also avoids reporting a qdoc warning for a typedef
defined in Q_GADGET.
Change-Id: Icca7297ec2123c684203d225d2bda96e50dacd8c
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/clangcodeparser.cpp')
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index 1698b23d7..52957dfa9 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -392,10 +392,6 @@ private: return true; if (symbolName == QLatin1String("QPrivateSignal")) return true; - if (parent_->name() != "QObject" && parent_->name() != "QMetaType" - && (symbolName == QLatin1String("metaObject") || symbolName == QLatin1String("tr") - || symbolName == QLatin1String("trUtf8"))) - return true; return false; } @@ -1205,6 +1201,7 @@ void ClangCodeParser::precompileHeaders() args_.push_back(p.constData()); flags_ = (CXTranslationUnit_Flags) (CXTranslationUnit_Incomplete | CXTranslationUnit_SkipFunctionBodies | CXTranslationUnit_KeepGoing); + // Change 2nd parameter to 1 to make clang report errors. index_ = clang_createIndex(1, 0); buildPCH(); clang_disposeIndex(index_); @@ -1370,6 +1367,7 @@ Node* ClangCodeParser::parseFnArg(const Location& location, const QString& fnArg CXTranslationUnit_Flags flags = (CXTranslationUnit_Flags) (CXTranslationUnit_Incomplete | CXTranslationUnit_SkipFunctionBodies | CXTranslationUnit_KeepGoing); + // Change 2nd parameter to 1 to make clang report errors. CXIndex index = clang_createIndex(1, 0); std::vector<const char *> args(std::begin(defaultArgs_), std::end(defaultArgs_)); |