diff options
author | Paul Wicking <paul.wicking@qt.io> | 2019-07-26 06:54:17 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2019-07-26 19:19:56 +0200 |
commit | 735e99d0e11c494592e3f878dc9740d6835bc3c7 (patch) | |
tree | 954bdb64b298115415cd1ab97027a1a32bb8adf5 /src/qdoc/clangcodeparser.cpp | |
parent | a449cb8c4a7fd46c33e4977a91c5097676ad5c39 (diff) | |
download | qttools-735e99d0e11c494592e3f878dc9740d6835bc3c7.tar.gz |
QDoc: make the Config a parameter instead of a global
This shall make it easier to test QDoc, by making mocking possible.
This change moves the instantiation of Config:: to reside inside main(),
so that it can be passed as a parameter where it is needed.
This object is then passed to QDocCommandLineParser::process(), so that it
can be changed via the object itself rather than via statics/globals. This
improves the testability of the QDocCommandLineParser class, as the Config
object can easily be mocked.
This change also replaces a couple of foreach() uses in main.cpp with
range-based for.
Task-number: QTBUG-71165
Task-number: QTBUG-71176
Change-Id: I7b98dfc36895cd88fe54dcc9ce31b75aab820b3b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qdoc/clangcodeparser.cpp')
0 files changed, 0 insertions, 0 deletions