diff options
author | Paul Wicking <paul.wicking@qt.io> | 2019-08-09 06:25:01 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2019-09-26 09:53:46 +0000 |
commit | 0407495a027b8e662c773eafb50ab66fd4638962 (patch) | |
tree | e6a1814255a1a2476524feef876946254c5ec84c /src/qdoc/main.cpp | |
parent | 537a49e19c720c13bbd9df03b66ac406be8e95c5 (diff) | |
download | qttools-0407495a027b8e662c773eafb50ab66fd4638962.tar.gz |
QDoc: Move setting of configuration strings from main to Config
This change moves the setting of configuration values from main's
processQdocconfFile() to an overload of Config::setOptions(). This is
done as a first step in a move to set configuration values in the
Config class, without going via the QDocGlobal class. Thus, we can
eliminate large parts, if not all, use of the QDocGlobals class.
As a nice side-effect, this also saves redundantly repeating the same
transcribing of data from globals to config, once or twice as many
times as there are qdocFiles.
Change-Id: Iaa11008b9c67781f7ff004a8be4675a02610f58f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/qdoc/main.cpp')
-rw-r--r-- | src/qdoc/main.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp index b8bee56d5..364cfb63f 100644 --- a/src/qdoc/main.cpp +++ b/src/qdoc/main.cpp @@ -205,15 +205,6 @@ static void loadIndexFiles(Config &config, const QSet<QString> &formats) */ static void processQdocconfFile(const QString &fileName, Config &config) { - config.setStringList(CONFIG_SYNTAXHIGHLIGHTING, QStringList(qdocGlobals.highlighting() ? "true" : "false")); - config.setStringList(CONFIG_SHOWINTERNAL, QStringList(qdocGlobals.showInternal() ? "true" : "false")); - config.setStringList(CONFIG_SINGLEEXEC, QStringList(qdocGlobals.singleExec() ? "true" : "false")); - config.setStringList(CONFIG_WRITEQAPAGES, QStringList(qdocGlobals.writeQaPages() ? "true" : "false")); - config.setStringList(CONFIG_REDIRECTDOCUMENTATIONTODEVNULL, QStringList(qdocGlobals.redirectDocumentationToDevNull() ? "true" : "false")); - config.setStringList(CONFIG_NOLINKERRORS, QStringList(qdocGlobals.noLinkErrors() ? "true" : "false")); - config.setStringList(CONFIG_AUTOLINKERRORS, QStringList(qdocGlobals.autolinkErrors() ? "true" : "false")); - config.setStringList(CONFIG_OBSOLETELINKS, QStringList(qdocGlobals.obsoleteLinks() ? "true" : "false")); - qdocGlobals.setPreviousCurrentDir(QDir::currentPath()); /* @@ -582,6 +573,7 @@ int main(int argc, char **argv) qdocGlobals.setOptions(parser); config.setOptions(parser); postProcess(parser); + config.setOptions(qdocGlobals); // Get the list of files to act on: QStringList qdocFiles = parser.positionalArguments(); |