diff options
author | Paul Wicking <paul.wicking@qt.io> | 2019-07-27 13:15:53 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2019-08-14 17:39:26 +0200 |
commit | e6d4579277ae8f526026b1df5d52fee4c744141f (patch) | |
tree | 40c11b017412aa07552fcc32f331eb574e1ae7dd /src/qdoc/main.cpp | |
parent | d259c70d47d0dbf2fb49b6fdb52b1283e8a69a41 (diff) | |
download | qttools-e6d4579277ae8f526026b1df5d52fee4c744141f.tar.gz |
QDoc: Clarify dependency between QDocCommandLineParser and Config
This change removes QDocCommandLineParser's dependency on the Config
class, and moves the responsibility of setting configuration values to
Config. This is done by turning QDocCommandLineParser into a struct,
and making the QCommandLineOptions in it public. In Config, the new
setOptions() method takes a QDocCommandLineParser from which it reads
the values it needs.
This moves QDocCommandLineParser one step closer to being easy to
test.
Task-number: QTBUG-71176
Change-Id: I2ee6e8cb6f5ff0f5d70a298ac99e3521a6f98ad9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/qdoc/main.cpp')
-rw-r--r-- | src/qdoc/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp index efeb1f30a..e134ff152 100644 --- a/src/qdoc/main.cpp +++ b/src/qdoc/main.cpp @@ -575,7 +575,8 @@ int main(int argc, char **argv) // Set the globals declared at the top of this file: QDocCommandLineParser parser; - parser.process(app.arguments(), qdocGlobals, &config); + parser.process(app.arguments(), qdocGlobals); + config.setOptions(parser); // Get the list of files to act on: QStringList qdocFiles = parser.positionalArguments(); |