summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* qdoc: properly implement \typealias commandTopi Reinio2020-04-2317-2/+155
| | | | | | | | | | | | | | | | | | \typealias was already a command recognized by QDoc, but it was simply treated as a synonym for \typedef and was not documented. Implement proper support for the command: - Add [alias] designation both in type summary and details. - Auto-generate information about the aliased type, including a link if aliasing a public, documented type. - Auto-convert aliases documented with \typedef to type aliases. - Add basic support for aliases also to DocBook and WebXML generators. - Document \typealias. Fixes: QTBUG-82712 Change-Id: Iafa8c7def0a7488d7521fbc2862290a9bb3167ff Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: tst_generatedoutput: Add option to regenerate expected dataTopi Reinio2020-04-211-3/+31
| | | | | | | | | | | Replace the use of QTEST_APPLESS_MAIN with a main() that accepts a command line option -regenerate. When set, all tests are skipped and the expected data directory is re-populated from the output generated by QDoc. Fixes: QTBUG-81210 Change-Id: If362338570fca2f7348bf25e452b02a91a96ff14 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: Fix handling of default values for function parametersTopi Reinio2020-04-219-19/+24
| | | | | | | | | | | | | | | When using an \fn command to document a function that has default values for parameter(s), The Clang parser retrieves a relevant section of the source file that contains the expression for the default value. In case of \fn, the source is a temporary translation unit that was constructed on the fly - but it may not exist anymore, and the default value is lost. Fix this by storing the contents of the temporary TU for later access. Fixes: QTBUG-83472 Change-Id: I20ad9e3322636450db1def65933837c1c767f2c4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix some deprecation warningsFriedemann Kleint2020-04-153-16/+17
| | | | | | | | | | | | findfiledialog.cpp:188:24: warning: ‘AdjustToMinimumContentsLength’ is deprecated: Use AdjustToContents or AdjustToContentsOnFirstShow [-Wdeprecated-declarations] tst_lupdate.cpp:291:63: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] tst_qtattributionsscanner.cpp:112:63: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] tst_qtdiag.cpp:70:27: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] Cherry-picked from branch: dev Change-Id: I103a28bd6ce97de311042f145d4a793be9d4b9a7 Reviewed-by: cherrypickbot
* Add lupdate test for Objective-C++ sourcesTor Arne Vestbø2020-04-024-0/+77
| | | | | | | | Change-Id: I3728a77d44798e5ab71c6f775f95821513be00fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* qdoc: Fix regression in resolved example file pathsTopi Reinio2020-03-296-0/+48
| | | | | | | | | | | | | | | | | | A recent refactoring of code related to generation of example file lists caused a regression; if the parameter passed to an \example command contained subdirectories, e.g. \example tutorials/gettingstarted only the immediate example directory ('gettingstarted' above) was recorded in generated example lists and manifest files. Ensure that the file paths are prefixed with the full example location, and add a test to cover this. Fixes: QTBUG-83130 Change-Id: I061dcf6cd4e94a2c65e5a50a39f379759d7cd06f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Ensure macros as a macro parameter are expandedTopi Reinio2020-03-264-0/+64
| | | | | | | | | | QDoc allows macros to be nested, and macro parameters can also be other macros, but in one code path the parameter was read verbatim, i.e. not expanded. This is an unnecessary restriction so remove it. Fixes: QTBUG-83085 Change-Id: I6dc7c2f7586a65bee78096fb50685262dad2ffe3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: Extend \example command to consider CMake projectsVenugopal Shivashankar2020-03-2015-1/+104
| | | | | | | | | | | | | | | | | | | | | | | QDoc looks for project file(s) in the example directories before generating docs for the example. Now that we are moving towards CMake, it's ideal that qdoc is aware of this new project file type. Refactor the code that looks for project files - add a new function to Config for this purpose, and store the project file name into ExampleNode. This allows removal of duplicated logic when generating the example-manifest.xml file. Add a unit test for Config::getExampleProjectFile(), and modify the generatedoutput test to cover output for a CMake-based example. [ChangeLog][qdoc] Added support for CMake-based example projects. Fixes: QTBUG-82908 Change-Id: If9f061c613fee94b35df277043c2f4df93da7ec0 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: Support relative paths in the master qdocconf fileTopi Reinio2020-03-201-2/+2
| | | | | | | | | | | In single-exec mode, QDoc loads a master qdocconf file containing a list of paths for each doc project that is part of the build. These paths were considered relative to the current working dir, meaning that one could not use paths relative to the master file. Fixes: QTBUG-82918 Change-Id: I44208620f59fec17f4e35d63852cfaf9f035ab24 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: Expand \noautolist to cover also C++ module pagesTopi Reinio2020-03-1412-0/+192
| | | | | | | | | | | | | Even though the \noautolist has been documented to work for C++ module pages, using it within \module documentation had no effect. Generate the list of namespaces and classes only if \noautolist does not appear on the module page. Add a test for \noautolist, for both HTML and DocBook generators. Fixes: QTBUG-82822 Change-Id: I27dcdafaa44981f18d08f2f27a148a1febba2d8a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Enforce zero warnings for QDoc's generatedoutput autotestTopi Reinio2020-03-1113-45/+54
| | | | | | | | | | | | | | Fix all QDoc warnings for the tests and set the warning limit to zero. If any warnings are introduced, QDoc will exit with non-zero value and the test will fail. The exceptions are the tests specific to the DocBook generator, where we expect to see two warnings related to shared comment nodes. The generator currently has trouble handling these. Fixes: QTBUG-82808 Change-Id: I0482516e1e34b92592d921a4a0ffb41e4b2b4770 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: Fix regression in .index file outputTopi Reinio2020-03-101-1/+1
| | | | | | | | | | | | | | Commit 5234c7fc fixed an issue with missing \inmodule commands, but it ended up adding non-aggregates into the module as well which was not the intention. This caused excess nodes being listed as a module members, causing issues for the WebXML output format as well. Partially revert 5234c7fc, fix the issue correctly, and update the test for .index files. Change-Id: I85fc19152b3de8993f92361fbe1ad2fd934c79ae Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add tests for QDoc's prepare and generate phasesTopi Reinio2020-03-093-0/+58
| | | | | | | | The prepare test includes validating the generated .index file. Fixes: QTBUG-82716 Change-Id: I673cf39965c81cf02b8c68e0319b45c909664917 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QDoc: Add unit tests for UtilitiesPaul Wicking2020-03-063-1/+103
| | | | | | Fixes: QTBUG-82687 Change-Id: I41219b8cdc45d7e779acfefbcd57ff352b56b88e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QDoc: Use correct node type string for \since in shared commentsPaul Wicking2020-03-066-0/+6
| | | | | | | | | | | | | | | | | Shared comment nodes were not handled as a special case when generating "This [class/function/method/type/etc] was introduced in" strings when QDoc encountered a \since command. These ended up with the default value, "documentation", which led to unexpected text in the documentation. * Add handling of shared comment nodes and get the node type from the first node in the collective. * Amend generated output test to cover this scenario. Fixes: QTBUG-82534 Change-Id: I444e95e0214f312649ec2720c23c98e698402abf Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Add an auto-generated note in \qmlsignal documentationTopi Reinio2020-03-061-4/+0
| | | | | | | | | | | | | | | Construct the signal handler name and generate a note for it. This eliminates the need to maintain such notes in the source. Remove the hard-coded notes from the test source (but not from the expected output data). [ChangeLog][qdoc] QDoc now generates a note for the name of the corresponding handler in \qmlsignal documentation. Task-number: QTBUG-37355 Change-Id: Ia3ab98be909a41bde619224c9a616cb8704e258a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: Refactor automatic note generation for function nodesTopi Reinio2020-03-063-0/+12
| | | | | | | | | | | | | | | | | | | | Function nodes may have a number of automatically generated notes added to the documentation; as they share the same formatting, collect them into a single virtual function in Generator, and override it in DocBookGenerator. Call the virtual function in Generator::generateBody() after generating the text for the Doc instance. As we append the notes to the body, the order in which the notes appear may change slightly (if a function comment generates multiple notes). Add \note commands in the tests in preparation for a follow-up commit that utilizes the refactored code. Task-number: QTBUG-37355 Change-Id: Id92926e53b61e03a2d2feceda70987191b708975 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Fix issues in HelpProjectWriterTopi Reinio2020-03-053-3/+159
| | | | | | | | | | | | | | | | | | | | | | | | The code that generates Qt Help Project (.qhp) xml files was suffering from multiple issues - mostly related to changes in Node inheritance that were not reflected in HelpProjectWriter implementation. - We no longer have subtypes for page nodes. Therefore, selectors like 'doc:example' were broken. Simplify the selector code but continue supporting the old notation. - Examples and basic QML/JS types were incorrectly dropped from the TOC. - Node::Union and Node::Struct were called 'Class' in the .qhp. Use the Generator::typeString() to fetch the correct type name for all types. - Require .qhp subprojects to have at least a title to avoid empty subsections in the TOC. Add a test that covers the entire .qhp generation with different types of subprojects defined. Fixes: QTBUG-82671 Fixes: QTBUG-82674 Change-Id: I8fe4a8ad5fc6d58f86e0e9128e98c0b8c4ba4a6a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QDoc: Add basic unit test for ConfigPaul Wicking2020-03-053-0/+102
| | | | | | | | Starting point for unit testing Config. Fixes: QTBUG-82672 Change-Id: If9e6300d3388173a08545609aca74c8e6a588041 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add an autotest for QDoc's single-exec generation modeTopi Reinio2020-03-044-0/+27
| | | | | | | | | This test adds no new expected files, as we build two existing projects with a master qdocconf file in single-exec mode. Fixes: QTBUG-82667 Change-Id: I89618a2670c3ab1ddfc71f1a76d9c9fce5947291 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-021-1/+1
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I7137cf8339bfe9fdcf4cb7cc695cb146aef410fb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* qdoc: Parse arguments for an \obsolete commandTopi Reinio2020-02-281-3/+1
| | | | | | | | | | | | | | | | | The command was documented as taking no arguments, and any arguments were ignored. The documentation still has many instances of \obsolete Use somethingElse() instead. Where the description was lost. Force a linebreak after the command, allowing any arguments to be processed as a normal text paragraph. [ChangeLog][qdoc] Generate output for arguments passed to the \obsolete command. Fixes: QTBUG-82558 Change-Id: If3e39382367a0c1f4cc63a2c322e986e053ecd6b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix path issues in QDoc's generatedOutput autotestTopi Reinio2020-02-266-10/+8
| | | | | | | | | Since the refactoring, even though the tests pass, QDoc was generating more warnings under the hood as include paths are invalid in multiple cases. Change-Id: Id5bdb894c925c35ce871b2170dbd5e1f0ddc2d74 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QDoc: Reorganize expected output testv5.15.0-beta1Paul Wicking2020-02-2164-47/+47
| | | | | | | | | | | | | | | | | | | | As the test has grown in size and scope, the lack of structure adds an unnecessary mental overhead when adding new tests, or when attempting to refactor the tests themselves. - Place all testdata in a directory aptly named testdata, following Qt convention. - Create sub-directories for all tests, so that their data is separated from each other. - Update qdocconf-files to match the new structure. - Update expected output data to match changes in qdocconf-files. - Ensure all tests still run; this requires modifications to paths in .qdocconf files mostly, but also in #include directives. Fixes: QTBUG-82159 Change-Id: I43b2333cacc75d1076a8aca86e89ccc52e4ec8a3 Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Store and use the current namespace scope for \fn commentsTopi Reinio2020-02-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Writing \fn commands for member functions of classes declared under a namespace was error-prone as QDoc required the fully qualified paths for the function signature, even though the documentation comment was located under the correct namespace scope. Store the scope by backtracking the Clang AST until we reach the level of the translation unit, and store each encountered namespace declaration into a list. When generating the temporary source file for an \fn command, we can then recreate the correct namespace hierarchy. This does not break the existing \fn command usage as it's perfectly valid, even if unnecessary, to provide fully qualified paths in the function signature. [ChangeLog][qdoc] QDoc is now aware of the namespace scope of an \fn command without requiring fully qualified paths. Fixes: QTBUG-82190 Change-Id: Ia446c19d130b2ef48b16b67e4dfcbdaab1f9d4f5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: Add a test for validating output of QML basic type methodsTopi Reinio2020-02-183-0/+28
| | | | | | Task-number: QTBUG-36585 Change-Id: Idbcc701394e1a1f688d3832a88ae5f8948e73c36 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-1839-35/+1252
| | | | | Change-Id: I98eaf748fdfb34f32d187718459327b8eef9c54b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QDoc: Remove unused make target for test projectPaul Wicking2020-02-141-2/+0
| | | | | | | | | | We don't call qdoc via the make targets in the tests, so remove the unused QMAKE_DOCS entry from the project file as it interferes with refactoring the test. Task-number: QTBUG-82159 Change-Id: Ie29fd5407c3541be7dfe4c70376a34e084a983b1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Correctly resolve qualified path of external base classesTopi Reinio2020-02-047-0/+213
| | | | | | | | | | | | | | | | Often, a documented class inherits from a base that lives in another documentation module. QDoc recorded only the class name of such bases, omitting any qualified path. Fix this issue in the Clang-parser. Add an autotest for verifying documentation with cross-module inheritance and links. This requires adding a mechanism for copying the generated .index file(s) into a location where QDoc searches index files in. Fixes: QTBUG-81793 Change-Id: I4019a1ca3a0e4c69bccc1a92740fd51907bfb24d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-285-13/+105
|\ | | | | | | Change-Id: I30a35e0998cd2538406ae5e11e2991f855f4ecb5
| * qdoc: Sort the members of shared comment node collectiveTopi Reinio2020-01-242-7/+7
| | | | | | | | | | | | | | | | | | Nodes sharing a comment will be listed together as a group, so sort them alphabetically. Fixes: QTBUG-81265 Change-Id: Ia8dcba92d74116bf6757bfc9aaded1c65d7271fd Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * qdoc: Fix regression in QML types inheriting property groupsTopi Reinio2020-01-244-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Property groups from base types were not listed on 'All Members' pages of a QML type. This was because we skipped all shared comment nodes for base types; property group is a special type of SCN. Remove duplication in the code that distributes the nodes; this ensures that there is no difference in output between members of a type and members inherited from its base types. Use logging category to display debug warnings instead of qDebug(). Add a test to cover this. Fixes: QTBUG-81262 Change-Id: I46c3e6afa87c510a7929088acbd1fb354f6733af Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | qdoc: Ensure that \dontdocument works as expectedTopi Reinio2020-01-248-0/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Class nodes marked with \dontdocument are not supposed to be seen in the generated documentation. They already did not generate an output page, but they still appeared as base classes in 'Inherits' information as well as class listings, resulting in broken links. Remove these nodes from all relevant lists. Handle Node::DontDocument status in the .index files, and add a test to cover \dontdocument usage. Fixes: QTBUG-81468 Change-Id: I933817ff0ebf372cfa493a5ea824b682e0b1b160 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | qdoc: Parse enum classes correctlyTopi Reinio2020-01-205-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang provides us sufficient information to detect a scoped enum (an enum class). For such enums, include the enum type name into the fully qualified name of the enum values. For enums related to \headerfile nodes, drop the '<Header>::' from the qualified name of the enum values as they are not valid. Ensure that this also applies to all node types in Node::plainFullName(), as including file names into a qualified path is always incorrect. In some cases, enum classes were also forward declared. This was a problem as QDoc skipped the full declaration after seeing the forward one. Combat this by re-processing the enum declarations that do not contain any values yet. Add relevant test case. [ChangeLog][qdoc] QDoc now generates correct documentation for enum classes. Fixes: QTBUG-66740 Change-Id: I36dcb3393500acb788e0a305fd0dfecc4b58ebc3 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | qdoc: Teach QDoc to output function and class template parametersTopi Reinio2020-01-2015-4/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a visitor functor that reconstructs template parameters from the Clang AST, and use it when either a class or a method template is detected. Store this information in the node - for now, they are used only in the class reference page subtitle (for classes), and detailed section of function documentation. Template parameters are not considered when searching/linking to entities, they are for display only. [ChangeLog][qdoc] Added capability to display class/method template parameters in the generated documentation. Fixes: QTBUG-17456 Change-Id: I300cc63b9fa20d4f6efaeaa27ea3769635a7b32c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | qdoc: Introduce locationinfo configuration variableTopi Reinio2020-01-1312-75/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simple boolean variable determines whether the full path information of entities is stored into index files, and by extension, the output of the WebXML generator. The default value is true, and QDoc's output is unchanged. Using a value of false is useful for testing QDoc; we can omit system build paths in the output as those complicated the comparison of expected and generated data. [ChangeLog][qdoc] Introduced a configuration variable to drop host-specific paths from the generated output. Fixes: QTBUG-81091 Change-Id: Ic8df5e4a52a12821e2858a185c4e658905deb847 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | qdoc: Introduce ignoresince configuration variableTopi Reinio2020-01-135-0/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt has a long history, with lots of classes and functions documented being introduced in a specific version. This \since information for decade-old features is not relevant anymore, producing noise about ancient Qt releases that have been long unsupported. In preparation for Qt 6, introduce a feature where we can set a cutoff value for \since information that can be ignored in the generated documentation. Fixes: QTBUG-81090 Change-Id: Ib35a2a4d8bc3a6cb9719223a45b02f0e63f337ea Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Make DocBook-related QDoc test passTopi Reinio2020-01-071-0/+12
| | | | | | | | | | | | | | | | | | The 5.14 branch introduced changes to a test project that the DocBook test reuses on 5.15. Fix the expected data to make test test pass on 5.15. Change-Id: I10f76dc1b4384451a8bf21676b153a4bbf09b4e1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-0730-116/+116
|\| | | | | | | Change-Id: Iedc2f057fbc2c78a0ed11661dbe9141a542f0de1
| * Change test function positions to match their declaration orderLevon Sargsyan2020-01-061-24/+23
| | | | | | | | | | Change-Id: I82bd549f93ce19b029c0e3c7220652e569ee07dc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * QDoc: Use html5 charset declarationPaul Wicking2020-01-0525-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | As we claim the html is html5 compliant (<!doctype html>), use the html5 charset declaration instead of html 4.01 style. Also, drop the trailing '/' (no need to close meta element). Update all test content to match the new output. Task-number: QTBUG-73026 Change-Id: I4cf58a342a2bfb9e76245bd3fb91525e6e59f622 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * QDoc: Drop xml prolog from html outputPaul Wicking2020-01-0525-25/+0
| | | | | | | | | | | | | | | | | | | | The html output is not well-formed xml, so let's not claim that it is. Update expected output in tests to reflect the change in output. Task-number: QTBUG-73026 Change-Id: I0e6646eb33cafad7be543869585609d6f4cb0fdb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * qdoc: Fix regression in C++ functions sharing a documentation commentTopi Reinio2020-01-056-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | After a recent refactoring, the function that distributes c++ documentation nodes failed to do anything with a function node that was sharing a comment with other nodes. Fix the issue and add a testcase for shared c++ \fn documentation comments. Fixes: QTBUG-81005 Change-Id: I6320bab232671f8cd969a37136708fc172de8409 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Implement DocBook support for qdocThibaut Cuvelier2020-01-0322-1/+1157
|/ | | | | | | | | | | | | | | | | | | | | | | | | The use of this code would be to overhaul the translation project of the documentation in French, for Developpez.com (which is now stuck at Qt 4.7 due to outdated tools: https://qt.developpez.com/doc/). This means that this code will be used and maintained, whatever the decision follows QTBUG-71493, for instance. The DocBook support is not 100% vanilla DocBook, as some tags are missing, but rather an extension (which could be officialised soon: https://github.com/docbook/docbook/issues/111). These tags are used to encode metadata about the code being commented (classes, fields, functions, etc.). More precisely, the required tags are: [enum|macro|namespace|typedef|union][|name|synopsis], enum[value|identifier|item], [specialized]template[id]. These extensions can be enabled by the docbook-extensions parameter. If you want to see the history: https://github.com/dourouc05/qttools/tree/dourouc05-qdoc-docbook Change-Id: I919976d8680b41c5ca69bdb79a0b824c29b89d05 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Add an autotest for QDoc's example manifest fileTopi Reinio2019-12-203-0/+35
| | | | | | | | Add a test that verifies the content of the examples-manifest.xml, with some metadata, and a QHP namespace defined. Change-Id: I91bc25ee10e1054c823ec1d14cccb6d9c6ca36d9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Fix regression in output for QML properties with shared commentsTopi Reinio2019-12-1610-89/+157
| | | | | | | | | | | | | | | | | | QDoc was incorrectly assuming that QML properties that share a comment must belong to a property group. Fix the issue, reduce duplication of code with functions that output properties and methods, fix the 'id' attributes that were left empty, and remove the <a name="..."> elements that are obsolete and unnecessary now that 'id' has correct content. Add a test for both properties and methods that share a comment, and fix the expected output data for above changes. Fixes: QTBUG-80768 Change-Id: Iddfca8214b6058987c76cd8f8dd6a842ce7cea89 Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add binary compatibility files for qttools 5.14 branchMilla Pohjanheimo2019-12-163-0/+62061
| | | | | | | BC files built against 5.14.0 added. Change-Id: I460c304049a7794083f6b516530c0faf0b6fa2e8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Factor out the formatting of the "since" textThibaut Cuvelier2019-12-132-3/+3
| | | | | | Change-Id: I3ec3342eb3362664c605c4120238566d87c8b176 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QDoc: Add tests to cover webXML generationPaul Wicking2019-12-1318-0/+384
| | | | | | | | | | This patch adds new tests and test data for covering webxml generation from plain qdoc, as well as from cpp and qml projects. Fixes: QTBUG-79003 Change-Id: I416e88cb4d0ee5c9a27c5096f4fd0d534a4ba50c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QDoc tests: add convenience functionLevon Sargsyan2019-12-131-0/+8
| | | | | | | | Allow tests to remove full paths from strings to circumvent hard-coded paths in output. Change-Id: I4270f201649e9e5145b1ce75d2d372605a95579d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>