summaryrefslogtreecommitdiff
path: root/src/qdoc/cppcodeparser.h
Commit message (Collapse)AuthorAgeFilesLines
* qdoc: This ends use of qdoc's old C++ parserMartin Smith2017-09-081-22/+1
| | | | | | | | | | This change replaces the last uses of qdoc's old, ad hoc C++ parser. Clang is now used for parsing all C++ code. \macro, \qmlxxx, and \jsxxx commands are parsed by simple pattern matching functions using QString::split(). Change-Id: If6f95b0487d1dd3206373bc55ec8e6b8b9c55b1e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* qdoc: Better support for multi-\fn documentation blocksMartin Smith2017-08-101-0/+1
| | | | | | | | | | | | | | | | | This change is a partial fix for the multi-\fn documentation concept. It outputs the documentation once but listing all the function signatures from the \fn commands found in the qdoc comment. Multiple \since commands are not implemented; the \until command is not implemented, and providing text applicable to a specific \fn signature is not implemented. This change requires clang, which means it requires a sequence of other updates as well, so you can't test it unless you have all that stuff. Task-number: QTBUG-60420 Change-Id: Ib316b6f97fa427ef730c4badfc785101bff55dce Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Enable documentation of type alias as typedefMartin Smith2017-08-101-0/+1
| | | | | | | | | | clangqdoc now handles the type alias declaraction and provides the \typealias command for documenting it. It is documented as a typedef. Task-number: QTBUG-58158 Change-Id: Iee0c8dea66026a89b3625b40b92b056cada893c1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Use clang as a parser in qdocOlivier Goffart2017-08-101-34/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
* Updated license headers and license testsAntti Kokko2016-06-101-17/+12
| | | | | | | | | | | | | 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>
* qdoc: Allow example files to be excludedTopi Reinio2016-05-121-0/+2
| | | | | | | | | | | | | | | | | | | | | Documentation configuration variables 'excludedirs' and 'excludefiles' had no effect on what source and image files were listed as belonging to an example. This commit fixes that, and refactors excludedirs/files handling: Remove duplicated code blocks, amd simplify the code reading the variables: - Drop checks whether an excluded directory exists - Drop conversion of native separators for excluded paths Both are unnecessary; QDoc expects '/'-separated paths for many other variables, and if an excluded dir does not exist, it won't exclude anything. Change-Id: Ie25511e20d33888653c23bb84975368317eb4306 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* qdoc: Correct source line numbers in index fileMartin Smith2016-04-051-0/+3
| | | | | | | | | | Many function clauses in the .index files show the wrong source file line number for the function declaration. This update ensures that the source file line number is correct. Change-Id: I8494b649be1d1a74e5b057391566503f3d6f1424 Task-number: QTBUG-52290 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* qdoc: Avoid more unnecessary qdoc warningsMartin Smith2016-02-261-1/+1
| | | | | | | | | | | Now avoids qdoc warnings for undocumented copy-assignment operators and move-assignment operators. This update also improves the text output by surrounding it with <p> and </p>. There was also a bit of refactoring. Change-Id: I922c7083d17b9b911d81f818f51fe7623a78eb22 Task-number: QTBUG-50630 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* qdoc: Avoid unnecessary qdoc warningsMartin Smith2016-02-261-1/+1
| | | | | | | | | | | Generates default docs when special class member functions are declared but not documented, thereby avoiding the "No documentation for..." error. The member functions now handled are the destructor, the copy constructor, the move-copy constructor, and the default constructor. Change-Id: I9ddd7841b1dfec907ab3c2ccd7636dc898df1fce Task-number: QTBUG-50630 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* qdoc: Second try on Q_PROPERTY with default and final.Karsten Heimrich2016-02-151-1/+1
| | | | | | | | | | This is just because someone decided to use a C++ keyword as property, normaly this should fail, and it will for others like e.g. explicit, friend etc... Change-Id: Ie7f5b295c849d41291adeb3ad89f56800b2b10dd Reviewed-by: Martin Smith <martin.smith@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* move qdoc back to qttoolsOswald Buddenhagen2015-10-231-0/+255
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>