diff options
author | Paul Wicking <paul.wicking@qt.io> | 2019-08-01 14:51:06 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2019-08-09 06:30:10 +0200 |
commit | 16c44bef1be4d95b0688e1e1400d04d879f77078 (patch) | |
tree | 69918028b3adad24bd6eb98af391db6c26df2c3b /src/qdoc/clangcodeparser.cpp | |
parent | 8308651784dc591e1d07126bdff6e7a606ec618b (diff) | |
download | qttools-16c44bef1be4d95b0688e1e1400d04d879f77078.tar.gz |
QDoc: Extract helper functions from Generator to Utilities
This change adds a new Utilities namespace to QDoc. This namespace
holds QDoc-internal utility methods. The first few methods are
debugging methods extracted from Generator::. Generator is then changed
to make use of the same methods from Utilities.
As a concequence of this, Utilities is also introduced to
ClangCodeParser and main.
This enables further refactoring of several classes, including the
QDocCommandLineParser class. The purpose is to clarify dependencies and
reduce entanglement, so that QDoc's classes become easier to test.
Task-number: QTBUG-71176
Change-Id: I5838fc2d933f78db682cb6e4755d31bb48175fcb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/qdoc/clangcodeparser.cpp')
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index c9bebd446..bbe3f9ba7 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -48,6 +48,7 @@ #include "generator.h" #include "loggingcategory.h" #include "qdocdatabase.h" +#include "utilities.h" #include <QtCore/qdebug.h> #include <QtCore/qelapsedtimer.h> @@ -1536,7 +1537,7 @@ Node *ClangCodeParser::parseFnArg(const Location &location, const QString &fnArg CXTranslationUnit_SkipFunctionBodies | CXTranslationUnit_KeepGoing); // Change 2nd parameter to 1 to make clang report errors. - CXIndex index = clang_createIndex(1, Generator::debugging() ? 1 : 0); + CXIndex index = clang_createIndex(1, Utilities::debugging() ? 1 : 0); std::vector<const char *> args(std::begin(defaultArgs_), std::end(defaultArgs_)); // Add the defines from the qdocconf file. |