summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* qdoc: Remove unnecessary call of location().push()wip/qdoc-clangMartin Smith2017-11-081-1/+0
| | | | | | | | | | | | | | | The function pushes the file name onto the location stack so that if an error occurs while processing the macro, the error message can contain the correct file location for the macro in error. But this call was pushing the location of the file containing all the macro definitions. If there is an error processing the macro, it should refer to the location where the macro was used, because that's where the error is, not in the macro definition. So the call to push() was wrong to begin with. Besides that, the push was never popped, which led to a fatal qdoc error in macOS. Change-Id: Ib2f74556f6a30a557e79d5c85cd12c8b3077b99a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Fix compilation warnings on MSVCTopi Reinio2017-10-111-2/+2
| | | | | | | | | | | | | | We pass the size_t of an std::vector to a clang function taking an int as an argument, which on MSVC resulted in warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data To fix this, cast explicitly. Change-Id: I3636f7ced600c387c678aa59012274db490d8f8d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* qdoc: skip the system include hack on MS-WinEdward Welbourne2017-09-272-1/+9
| | | | | | | | | | | | | This is a fix-up for "qdoc: Find the system include path if not provided"; MSVC complained about "definition of dllimport function not allowed" due to the hack's insertion of code to define (rather than just declare) a function in locale.h; so this commit wraps the hack in Task-number: QTBUG-62878 Change-Id: Ic3fe9280b1b4a84ca569f448351f3a751a79caa5 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: Correct a misuse of a local variableMartin Smith2017-09-181-5/+5
| | | | | | | | | | This update fixes a bug caused by reusing an index varible name declared in an outer loop in an inner loop, which made qdoc crash in one case. Change-Id: I27abb4ea3241be620c8c226732e83ef42b575da9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* qdoc: QPrivateSignal was not handled correctlyMartin Smith2017-09-181-3/+2
| | | | | | | | | | | | Now that clang-qdoc uses clang to parse the \fn commands, it must handle the QPrivateSignal flag correctly. It is not allowed in the signature in the \fn command. This update corrects a bug where the expected number or parameters was being reduced by 1 because the flag appeared in the declaration in the include file. Change-Id: I1c974100b2017b3058040937a03500a75dc69d82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qdoc: This ends use of qdoc's old C++ parserMartin Smith2017-09-0813-669/+326
| | | | | | | | | | 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: Use clang to parse \fn commandsMartin Smith2017-09-067-11/+256
| | | | | | | | qdoc now uses clang to parse \fn commands. It even handles the multiple \fn case. Change-Id: I259fcdfc1bf180d32ef1cc9886a48aa3006e18fb Reviewed-by: Martin Smith <martin.smith@qt.io>
* qdoc: Remove uses of QRegular ExpressionMartin Smith2017-09-061-55/+58
| | | | | | | | | | | This change replaces two uses of QRegularExpression with a simple ad hoc parser. qdoc is not allowed to use QRegularExpression because it is not in the bootstrap library. Task-number: QTBUG-62845 Change-Id: Icfaca2181ff1879f02d111626a85fb3da758c731 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/qdoc-clangSimon Hausmann2017-09-0514-51/+114
|\ | | | | | | Change-Id: I1ed3009c1ffa4494fcb3880db7ae4ec1bbdc4e22
| * Qt Designer: Add C++ guards to precompiled headerFriedemann Kleint2017-08-301-0/+2
| | | | | | | | | | | | Task-number: QTBUG-62872 Change-Id: I637ee1bf7c733c4ccaf45745837fda2966fe2482 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * qtattributionsscanner: Allow to use it for one single fileKai Koehne2017-08-283-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows a saner use with qbs, where we can and should actually handle the dependencies correctly. In addition, this patch adds an optional '--basedir' argument that is needed to correctly root relative paths that are printed in the documentation. Change-Id: I0abf769ad5c0a3ac15b6907f83b77d369eb78d1f GPush-Base: 5c8d5742dc7b5e00a6aed447e8f288680b58e225 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Don't create unused IndexItemTableJarek Kobus2017-08-281-3/+0
| | | | | | | | | | Change-Id: I0fa1ea9a1b6b6d1b1da481880f7a620284456487 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
| * Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-179-34/+74
| |\ | | | | | | | | | Change-Id: I05937dcc25c64b90c16818eda31b888bd6611e51
| | * Install missing qtwebengine_devtools_resources.pak file for WebEngineAlexandru Croitor2017-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-59251 Change-Id: I1e1b3c3301755aaabcccb85af1ca1b2dee52a59b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Fix crash regression when using ANDROID_DEPLOYMENT_DEPENDENCIESEskil Abrahamsen Blomfeldt2017-08-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 919d07e6809a6705941a9819ba145062a947fa39 introduced a splitRef() on a temporary string, which will cause dangling pointers as documented. This caused crashes for everyone using ANDROID_DEPLOYMENT_DEPENDENCIES. [ChangeLog][androiddeployqt] Fixed a crash when using ANDROID_DEPLOYMENT_DEPENDENCIES to specify the files to deploy. Task-number: QTBUG-61636 Change-Id: I16dc84f76667e9b8af5edf79d7c6498657176247 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * windeployqt: Check folder "onecore" for MSVC debug redistributable filesFriedemann Kleint2017-07-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to be required depending on MSVC edition and installed toolchains. Task-number: QTBUG-61549 Change-Id: Iae800e9f37f1ca301731011e72f8d3223f3585c1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * windeployqt: Deploy the geometryloaders plugins for Qt3DRenderAndy Shaw2017-07-241-1/+2
| | | | | | | | | | | | | | | Change-Id: Ibf296ae7ccb4373512298eef7cfd92b21891af76 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * winrtrunner: Give additional hint in case of missing prerequisiteOliver Wolff2017-07-201-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user has not added additional dependencies, winrt projects only depend on Windows.Universal and we have seen some cases, where its MinVersion was not met by the user's Windows version. We can give an additional hint if this error occurs and it might even push the user into the right direction if he has added his own dependencies. Task-number: QTBUG-61441 Change-Id: I54bbc424087dad2ffd626e58cc6f3a493b60f44e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * winrtrunner: print verbose error after failed deployment operationOliver Wolff2017-07-201-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just remove an early return in the case that the deployment operation was not successful. Printing out the verbose error message was already implemented. Task-number: QTBUG-61441 Change-Id: I54f22879ec84f4a984af49c9e43e4f9e88732d6e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * windeployqt: Fall back comparing names of QML modules when their class name ↵Friedemann Kleint2017-07-172-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is empty QtWebEngine and some other modules have empty class names, so they are dropped when concatenating QML imports. Task-number: QTBUG-61957 Change-Id: I06ccf8ab54b2d3ffba04f15746722f5b3596d5d9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Fix remaining GPL-EXCEPT license header in Qt UI ToolsKai Koehne2017-07-141-5/+16
| | | | | | | | | | | | | | | | | | | | | Was forgotten in 30c10900ade. Change-Id: Ib85259a7dacfd255419da411e5a2db981fe4ffbf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Qt Designer: Suppress QEvent::LayoutRequest when changing layout spanFriedemann Kleint2017-07-073-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTabWidget activates its parent layout when resizing, which prevents it from smoothly resizing when changing item spans. Suppress the QEvent::LayoutRequest when the widget handle is in a span-changing mode. Task-number: QTBUG-61439 Change-Id: I87b2c9d5e3e6796983b730907cf3bfe8c7ed2292 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | | Build fixJędrzej Nowacki2017-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | | clangcodeparser.cpp:1025:39: error: no match for ‘operator+=’ (operand types are ‘QByteArray’ and ‘QChar’). Change-Id: Ibc6fa1f11996e9ab5805b85b3165da3b1d7b2afb Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | qdoc: Better support for multi-\fn documentation blocksMartin Smith2017-08-108-92/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Remove chapter and part commandsMartin Smith2017-08-103-110/+51
| | | | | | | | | | | | | | | | | | | | | | | | These commands are not used anywhere, and they cause qdoc to generate illegal html code, so they are removed. Change-Id: I39b670a9691221854a78ea5c332c67ea758199ee Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Ignore declarations of anonymous structsMartin Smith2017-08-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qdoc doesn't need to see declarations of anonymous structs. When it does see one inside a class or struct that is named, then the html generator tries to overwrite the html file for the outer class or struct. That causes a few qdoc error messages and it overwrites the html file for the class reference page and the all-members page. This update tells clang not to visit the declaration of the anonymous struct, so the html generator doesn't see it as something to be documented. Change-Id: Ie8c732e650c39f78c1374523d72a7e0448a31ba3 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Use correct method to set the hash seed to 0Martin Smith2017-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The method used for resetting the hash seed has changed. This change replaces the old call with the new one. Change-Id: I0fb674e73047b0988258b177586c44e5ea20e6f1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Fix signed vs unsigned comparisonsMartin Smith2017-08-101-6/+6
| | | | | | | | | | | | | | | | | | | | | This fixes several cases where QChar was compared to -1. Change-Id: Ib7a0fec0f1e266ba47545296549e482592624ecc Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: create the anonymous enum typeMartin Smith2017-08-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When clangqdoc encounters an unnamed enum type in a class, qdoc reports an error that enum type "global" is not found in any header file, and then the identifiers in the enum type can't be properly documented. This change makes the clang qdoc visitor name the unnamed enum type "anonymous" and allows it to be documented like a named enum type. Change-Id: I8b6dbc9bb78adc5f5c39a2a2d73c27ccb4543ceb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Add moduleheader as config variableMartin Smith2017-08-105-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | qdoc: Add (qdoc) to qWarning messagesMartin Smith2017-08-101-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | These messages don't come from the warning() function in class Location, so each one must have (qdoc) added. Change-Id: Id49b979f8b051d8f4661fb3214989c9c959121c6 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Make qdoc handle ref qualifiers correctlyMartin Smith2017-08-106-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update makes qdoc parse and record the presence of ref qualifiers on the end of function declarations. It unfortunately increases the number of qdoc errors reported in QtBase, but that is because these functions are not documented correctly. There will be another update to qdoc to allow documenting multiple functions with a single comment, which is needed for documenting these ref qualified functions but also can be useful in other contexts. Change-Id: If2efb1a71c683a465d66608a20e238d84ea45d9a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Teach parser for \fn commands to parse array parametersMartin Smith2017-08-101-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old qdoc C++ parser is still used for parsing function signatures in \fn commands. The parser could not handle the case where a formal parameter is an array declaration. Now it parses the formal parameter, so the syntax errors have disappeared. But there is a separate problem involving the matching of the declaration to the same declaration in the header file, which is parsed by clang. However, this is a separate issue not addressed by this fix. Change-Id: I61be810b02ac50a6ee380664a41915cc85633c66 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Use documentation for implicit special functionsMartin Smith2017-08-104-9/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow implicitly declared special member functions to be explicitly documented. For example, in class QFuture, the destructor, copy constructor and assignment operatore are implicitly declared, but they are explicitly documented in qfuture.qdoc. clangqdoc no longer complains that it can't find these functions in any header file. It creates them for documentation purposes, and they are documented as expected. Where these function signatures appear on the class reference page, " = default" is appended to the end to indicate that the function is implicitly declared. Change-Id: I7bcf16c31099439f424b438eb41589435d7254b6 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Create and Visit the PCH alwaysMartin Smith2017-08-104-80/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCH for module QtPlatformHeaders was not being built because there are no .cpp files there, and clangqdoc was only building the PCH when it was asked to parse the first .cpp file. Now it builds the PCH by a direct call from the main.cpp file, after the headers have been gathered into a list, but before the .cpp files are parsed. This does reduce the qdoc error count by a few, but it does not fix the documentation for QtPlatformHeaders. From my debugging, it appears that visiting the PCH produces no qdoc nodes for the C++ classes and functions, etc in the PCH. This update also improves the selection of default include paths when inadequate include paths are provided. That is the case for module QtPlatformHeaders, where no include paths are provided. The algorithm for constructing a list of reasonable guesses is modified here. Change-Id: I0dee8dc0279894a4482df30703657558cdb098de Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | doc: Fix qdoc macro processingMartin Smith2017-08-101-91/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qdoc was not replacing qdoc macros correctly. Hopefully, this corrects that bug. It works for the cases I tested. I also changed the name of a class data member from "in" to "input_" so it is easy to search for. Change-Id: I53b8a701efa6b4113173f9d9bb7cf4ebe0a449c4 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Don't report missing parameter nameMartin Smith2017-08-101-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See QTBUG-58277. No longer report missing parameter names when processing the \fn command, because there are cases where they are not required. This is an over-simplification of the problem, but it works for now. In the future, we may want to distinguish between cases where the parameter type is std::nullptr_t, which means the actual parameter is null, and the case where some type is provided without a name, which indicates that the parameter is not used in this implementation of the function. Task-number: QTBUG-58281 Change-Id: I7d648341262040b9b9ea91f1e27e5905455f9ef2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Clean up the Parameter classMartin Smith2017-08-107-35/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way function signatures are specified is changing. A basic assumption of qdoc was that in the function signature specified with the \fn command, each formal parameter would have a name, and the name would be documentede in the text using the \a markup. This is no longer valid. There are now several cases in Qt where std::nullptr_t is used to specify a formal parameter, and no parameter name is provided. Furthermore, there are a few cases where some other type is used as the parameter type and no parameter name is given. The meaning in the first case is that the function must be called with NULL, and the meaning in the second case is that the parameter is not used in the function implementation. This clean up task must be accomplished in preparation for implementing the changes described above. The Parameter class had become a kludge. The so-called "rightType_" data member (which has not been used for quite a long time now and which was marked for removal long ago) is removed here. The change also affects the <parameter> element in the .index file, where the "right" item is removed and the "left" item is renamed to "type" . This index file change might break 3rd party applications that parse qdoc's index files, but I think there is only one, so be on the lookout for a complaint from that guy. Task-number: QTBUG-58277 Change-Id: I721bebdd5d0f2fcd65324373c3a3ec3ea1c33e26 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: A different way to fix the "signed" problemMartin Smith2017-08-101-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old qdoc parser is still used for parsing \fn commands because clang can't be used to parse code fragments. This causes a problem when the "signed" reserved word is used because clang doesn't keep it if it doesn't add anything to the type, while the old qdoc parser always appends it to the type under construction. The fix here is to let the old qdoc parser hold the "signed" reserved word aside until it knows what the next lexeme is. Then it either appends the held "signed" or discards it, depending on what the next lexeme is. e.g., if the next word is "int" discard "signed" but if the next word is "char" append the held "signed" before appending "char". Change-Id: I67953d964cd09410126d64fa3305c669111e74ce Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Enable documentation of type alias as typedefMartin Smith2017-08-105-258/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | qdoc: fix resolve inheritance bugMartin Smith2017-08-104-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clangqdoc was unable to find base class nodes, when the base class node was in a different module from the subclass. This was mostly because the fixInheritance() function, which handles base class resolution after the headers have been parsed, was being called before the headers were parsed. This was caused by the new parsing strategy for clangqdoc, which is to use the old loop where qdoc used to parse the header files only to build up a list of all the required header files and to delay parsing the header files until clang is called to build the PCH. The basic fix is to mode the call to resolveInheritance() from main.cpp into clangcodeparser.cpp right after the PCH is built. There are also a few other minor changes in this change that make the base class resolution more robust by ensuring that as much useful information as possible is retained in the index file and in the base class list for a class node. Change-Id: I51433f618cdf40b37b0687ff1686da03359de111 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Match unqualified parameter typesMartin Smith2017-08-101-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clangqdoc was unable to tie qdoc comments to their function declarations for nested classes, when the function had a formal parameter of the nested class type. The problem was that findNodeForCursor() didn't handle the type name scoping correctly. Change-Id: I64d81377193447b1af73ecd107f0431fac0d81a7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Handle class decls outside the semantic parentMartin Smith2017-08-101-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the class declaration for QMetaObject::Connection in qobjectdefs.h, which is outside the declaration for QMetaObject. clangqdoc wasn't handling this correctly. It created the class node for Connection with the wrong parent. This update ensures that the class node for Connection is given the class node of QMetaObject as its parent. If the semantic and lexical parent cursors of the current cursor are not the same, find the Aggregate node for the semantic parent cursor and use that node as the parent when the new class node is created. Change-Id: I40f73dad9879e39452f83bb7c0f514a7ef319208 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Parse Friend declarationsOlivier Goffart2017-08-101-0/+11
| | | | | | | | | | | | | | | | | | | | | (Requires clang 4.0) Change-Id: I50240f0e4b9f538c65dbaa0e8d08469676ac9012 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Find the system include path if not providedMartin Smith2017-08-101-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang needs the path to the system include files. There is an option to pass system include paths to qdoc on the command line, but currently there is no way to get the information from the build system. With this change, clangqdoc asks if the system include paths have been provided. If not, it uses the path to <locale.h> as the system include path, which it passes to clang using the -isystem option. Thanks to Edward Welbourne for this solution. Change-Id: I2716505126d7780fc616b8ffd7cd2865576bae16 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Identify special constructors and assignment opsMartin Smith2017-08-101-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change enables clangqdoc to identify copy constructors, move-copy constructors, copy-assignment operators and move-assignment operators. Identifying these special member functions allows clangqdoc to document them automatically if the documentation is missing, which also means fewer qdoc error reports. Change-Id: Ic50822c2939f0a84e707a1b3ff946bc731a0bd85 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Don't report error for things marked \internalMartin Smith2017-08-104-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows qdoc to avoid printing warnings about a qdoc comment, if the comment contains the \internal command. In these cases, the comment will not be used in the documentation, so there is no point reporting warnings about it. However, if the showinternal option is used, warnings about comments marked internal are printed anyway. Change-Id: Idcb329958681523c79e9f6a3a144ae26d44a6906 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Add '(qdoc)' to qdoc errors and warningsMartin Smith2017-08-101-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The error and warning messages output by clangqdoc need something to tag them as qdoc errors so they look different from clang errors and other messages. Change-Id: I5adbc7bae328d78b61967d98a5c7f814b21db28f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | qdoc: Add "clangdefines" to Config classMartin Smith2017-08-104-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | qdoc: Reduce total clang parse timeMartin Smith2017-08-101-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Including the module's private headers in the PCH database can reduce the qdoc run time for the module by a few minutes. Apparently, including the private headers significantly reduces the number of header files that must be re-parsed. This change adds the module's private headers to the pre-compiled header database. When it finds the module's module header, it copies that module header to the temporary directory where it will construct the PCH. Then it finds the module's private header subdirectory, constructs the path to each header in that directory, and appends it to the temporary module header. Then it passes this augmented module header to clang to construct the PCH. Change-Id: Ie67485c7070ef7487345db90a8b27c64f5caa0f2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>