| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDoc automatically generates hyperlinks for words that qualify for
auto-linking. This may become a problem whenever there is a qualified
word as a section or a page title, and that word appear in the
documentation frequently. For example, 'macOS' is mentioned often
and each occurrence is linked, which is unnecessary and sometimes
confusing.
Provide a way to exclude specified words from being auto-linked.
Create a new helper function, DocParser::isAutoLinkString(), to
determine whether a string qualifies, and replace duplicated
code with calls to that function.
Fixes: QTBUG-79135
Change-Id: Ie53fe7ca0692f7b8e10a5f2208df5cd2ee2aab1d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is the result of formatting all of QDoc's source with
clang-format. The clang-format style is from the qt5 super repo's
_clang-format definition.
The purpose is unify the style across the code, to avoid spending too
much time on style related issues in reviews and cleanup patches. Future
changes to QDoc can benefit from using git-clang-format in combination
with the git commit hook provided in qtrepotools.git as mentioned in
this email to the dev list:
https://lists.qt-project.org/pipermail/development/2019-October/037682.html
Change-Id: I8af6a051c8334b5f35862a4dcd3becce8ac500c2
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the use of QVector in most of QDoc.
Also, remove one redundant C-style cast to int for result from method
call that returns an int. As this happened in a macro, the result is
removing a whole bunch of nagging from code inspection.
Fixes: QTBUG-80669
Change-Id: Ib1aed95e01eaddd1e1213a145e815a0c4753ac67
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves the setting of configuration options from QDocGlobals
to Config. This allows for the removal of the entire QDocGlobals class.
Some methods (getters/setters) are part of the move, others were used
exclusively by Config:: and are therefore dropped entirely.
Also, move the ownership of QDocCommandLineParser from main() to
Config - this makes Config the authoritative source of all settings,
whether from the command line or .qdocconf variables, and makes it
possible to reset() the full state of the Config.
Finally, remove the QDocGlobals auto-test, as it is no longer needed.
Change-Id: I8e39931c828c763cb0462cbbdf3fe1a39b2ad70b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, this problem was masked as the Config object was local
to the processQdocconf() function in main.cpp - but now we keep
that object and process multiple .qdocconf files in single-exec
mode.
When in single-exec mode, the previously read variables remained
in the config, resulting in all kinds of unintended consequences
- such as processing source directories from other documentation
projects.
Fixes: QTBUG-78776
Change-Id: Ic23d1cb0eacb112cc60a63cd43b4d51ff57f0583
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A regression was introduced when refactoring QDoc's config system:
the processQdocconf() function in main.cpp no longer constructs a
new Config object; instead, it sets some config values using
Config::setStringList(). However, unlike its name would imply,
this function did not (re)set a config variable, it added to it.
As a result, when in single-exec mode, the first call (prepare phase)
to processQdocconf() worked as expected, as the default boolean
variables were set as QStringList("false"), which is correctly
evaluated to false. During the second call (generate phase),
calling Config::setStringList() again resulted in 'false' boolean
variable to be stored as QStringList("false", "false"), which
evaluates to true.
These boolean variables include REDIRECTOUTPUTTODEVNULL, which
unsurprisingly caused problems as it was always set for single-
exec builds.
To fix this, make Config::setStringList() behave as its name
implies, add insertStringList() function to add to an existing
variable, and fix the code that tried to combine two string
lists to use this new function.
Fixes: QTBUG-77897
Change-Id: I62282f31c35e47e4791919688adb4ff49fd2e2df
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
| |
These weren't used anywhere, and QDoc seems to be fine without them.
Change-Id: If1ec08773d757a17ff48560592b7041753755aef
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change removes QDocCommandLineParser's dependency on Generator and
Location. The calls to their static methods are moved to a new helper
function in main.cpp, postProcess().
Thus, QDocCommandLineParser no longer sets values in Generator or
Location.
QDir was included via Generator, and is therefore added as an include
in QDocCommandLineParser.
This change further clears up QDocCommandLineParser's external
dependencies, to make it easier to test the class separately.
Task-number: QTBUG-71165
Task-number: QTBUG-71176
Change-Id: I2a024d57d50f84f9271672b6a753e677b748f1b6
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that QDoc conforms to Qt style, whitespace edition.
For the most part, the change involves moving the pointer operators.
Also remove whitespace following an opening parenthesis, or
immediately preceding a closing one. In some cases, adjust the
following line accordingly in methods that span multiple lines.
Change-Id: I56ae125a2acf09c669c0a73dc814d05f13575f39
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Housekeeping. Includes are organized after recommended best practice and
organized in the following order:
- include self (i.e. include own header)
- include local files
- include Qt, e.g. <QtCore/qstring.h>
- include Qt private
- include externals, e.g. stdio.h
in alphabetic order within each block, aside from accommodating #if-ery,
in which includes follow the block they belong to.
Also, updated copyright notice to year of latest edit in each file.
Change-Id: I1e6b215f172fd5373d57016f7678b88b9e73231e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
| |
Minor housekeeping for the sake of style only.
Change-Id: I6cd7807783bff5e89b2071934cbb587d1e92af4a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this change is misguided:
- for the qt doc build, the correct way is to adjust qt_docs.prf to feed
the right data
- projects which are actually outside qt have no business in using these
variables (and the data they refer to)
This reverts commit 61062f6769670b1a33c3f4406d51892c221a26fd.
Change-Id: I54dbfc04802bf50aa250810ce2e8475fef751669
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If qgetenv() doesn't return a valid environment variable, try querying
from qmake (assuming the variable name starts with 'Q').
This is useful for projects outside Qt, as it allows using e.g.
QT_INSTALL_DOCS and QT_INSTALL_HEADERS. The former can be used for
accessing the Qt documentation template, and the latter is useful for
projects that need to pass Qt's include paths to Clang (which QDoc
uses for parsing C++ documentation). The build system doesn't
provide these paths when trying to build docs for a module that
doesn't build on the host platform; for example, building Active Qt
documentation on Linux.
Change-Id: I758a5067d3dfdf13cadf979476323faea519ee40
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-363
Change-Id: If076c9a77a5a11c05035f6fc30e6d68e60a35045
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: Ieef1b05234ee67bef28f2dc9abaa65f10840d21b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'navigation' sub-variables 'cppclassespage' and 'qmltypespage'
already have associated variables that allow defining a user-visible
title, shown in the navigation.
This commit does the same for 'homepage' and 'landingpage'. This
makes it possible to avoid situations where the homepage title
clashes with another (e.g. section) title:
navigation.homepage = index.html
navigation.hometitle = "Qt $QT_VER"
Add documentation for the navigation variables.
Change-Id: Ie4ff5f906b2ee6be01db65562025df7da2a9dff8
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qdoc/cppcodeparser.h
src/qdoc/location.cpp
src/qdoc/qmlcodeparser.h
Change-Id: I2e579ca5d83cd1c4b42acc9a07066d800cbc02cb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
moduleheader is a new config variable you can add to the
qdocconf file when the name of the module header file for
your module is different from the project name. When the
name of the module header file is different from the
project name, if you don't tell qdoc what the name of the
module header file is by setting moduleheader in the
qdocconf file, then clangqdoc will not find the module
header file to build the precomiled header with, which
will result in clang not finding a lot of stuff.
Change-Id: I0da1a0b0be05cb9e6e95e0123583ddeedaf6741d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The qdoc 'defines' config variable lists values
that contain '*' to represent wildcards, but clang
doesn't accept them. This change adds a new config
variable called 'clangdefines' which explicitly
lists all the defines that match the wildcards.
It also lists several Qt defines for C++11 stuff,
because when clangqdoc comes into use, all the
supported compilers for Qt will support C++11
constructs.
There might be a few defines listed in clangdefines
that are unnecessary and maybe a few that we really
should not include, but we can adjust the list as
needed.
Also included in this change: Tell clang never to fail
(i.e. keep parsing no matter how many errors are found),
and tell clang not to print parsing errors, because they
obscure the qdoc errors in the output. clangqdoc should
assume that the source files are correct, but some of the
include files, especially system level stuff, will not be
present. clangqdoc doesn't care about these missing files,
because they aren't part of the documentation.
Change-Id: I84e1cae24d961a82d16ee705333d6f36955d35de
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The file qt_find_clang.prf is inspired by qtcreator's clang_installation.pri.
The code from the while loop in ClangVisitor::parseProperty contains code
moved from CppCodeParser::matchProperty. The code in the for loop of
ClangCodeParser::parseSourceFile (from the "Doc parses the comment"), is mostly
moved from CppCodeParser::matchDocsAndStuff.
In CppCodeParser, most of the code is removed since clang is used for parsing.
We just need to leave enough to parse the declaration in the comments which
still use the old parser (\fn, ...)
Known issues:
- When the parameter name is a comment, it is lost.
(e.g. QObject::eventFilter(QObject * /* watched */, QEvent * /* event */)
- I can't compute default parameters when they are expanded from a macro.
(e.g. QObject::tr)
- Instances of #ifndef Q_QDOC need to be reviewed
Change-Id: I92d4ca4fc52810d9d3de433147a9953eea3a1802
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This variable is primarily meant for testing the documentation builds
in the CI system; if the warning count exceeds the set limit, QDoc
uses the total number of warnings as exit code.
The warning limit is enforced when either warninglimit.enabled = true,
or QDOC_ENABLE_WARNINGLIMIT environment variable is set.
This also provides a method to override the CI failing a documentation
build; the author can increase the warning limit to let the build
pass, hopefully with a good excuse in the code review.
Change-Id: If455a9636f2c63b41798523dd4acb3183a00229c
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the introduction of the WebXML output format, QDoc can no longer
assume that the configuration is specific to HTML. In particular,
Config variables:
- Output directory and subdirectory can now be set for each format.
- 'quotinginformation' can now be prefixed with '<format>.' qualifier.
Because the same parsed tree of atoms is used for all generators,
we need to include both the quoting information and the related
code snippets in the list of atoms; generators then decide what to
include in the output.
Index files:
- Look for index files under the output subdirectory for each specified
format.
This allows per-format configuration and passing multiple formats in
'outputformats' configuration variable.
Clean up and refactor the code related to processing doc config
variables.
Task-number: PYSIDE-363
Change-Id: I66e9c71311689a777fcb445d3b1a8ef070dff93d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/assistant/qcollectiongenerator/main.cpp
src/qtestlib/wince/cetcpsync/main.cpp
src/qtestlib/wince/cetcpsync/qtcesterconnection.cpp
src/qtestlib/wince/cetcpsync/qtcesterconnection.h
src/qtestlib/wince/cetcpsync/remoteconnection.cpp
src/qtestlib/wince/cetcpsync/remoteconnection.h
src/qtestlib/wince/cetcpsyncserver/commands.cpp
src/qtestlib/wince/cetcpsyncserver/commands.h
src/qtestlib/wince/cetcpsyncserver/connectionmanager.cpp
src/qtestlib/wince/cetcpsyncserver/connectionmanager.h
src/qtestlib/wince/cetcpsyncserver/main.cpp
src/qtestlib/wince/cetcpsyncserver/transfer_global.h
src/qtestlib/wince/cetest/activesyncconnection.cpp
src/qtestlib/wince/cetest/activesyncconnection.h
src/qtestlib/wince/cetest/cetcpsyncconnection.cpp
src/qtestlib/wince/cetest/cetcpsyncconnection.h
src/qtestlib/wince/cetest/deployment.cpp
src/qtestlib/wince/cetest/deployment.h
src/qtestlib/wince/cetest/main.cpp
src/qtestlib/wince/cetest/remoteconnection.cpp
src/qtestlib/wince/cetest/remoteconnection.h
src/qtestlib/wince/remotelib/commands.cpp
src/qtestlib/wince/remotelib/commands.h
Change-Id: Ia1b311710f7e8009ca1697faae3ae5e37e80ecc3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From Qt 5.7 -> tools & applications are licensed under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)
License header tests also updated to match current headers.
Change-Id: Ia6bdacaa3c5bbc9d31334e1a0cabfe502a484dc4
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
While the hardcoded strings "C++ Classes" and "QML Types" may satisfy
Qt's needs it may not be true for custom derived projects. Thus with
adding navigation.cppclassestitle and navigation.qmltypestitle one can
re-define the titles. If the titles explicitly set to empty strings the
navigation entry is skipped.
Change-Id: I8690b0cf5adfee6ad17601c63ed1947e6bfe8d59
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
This commit allows the use of simple wildcards ('*' and '?') for
excluding a set of files. A typical use case is to exclude all
private header files with '*_p.h'.
Task-number: QTBUG-50600
Change-Id: Ib50e9e85731d7506ea7299016f609e48ab3d277f
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
|
|
we can do that now, as the bootstrap lib is now a properly exported
module, and qmldevtools is now bootstrapped as well.
this removes the abomination of a copy of the qml parser in qtbase.
unfortunately qtbase/2422251ee5025a067b14b989153764ab36e43f10 is
reverted, as qtdeclarative is still missing the respective change.
this introduces no regression in discoverability or usability, as a full
doc build already needed qttools - for qhelpgenerator.
Change-Id: Ic9c4c9732ddf5998637b9e42e27939ba50b31479
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
|