summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/cppcodeparser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* qdoc: Change remaining uses of qmlClass to qmlTypeMartin Smith2015-02-031-33/+33
| | | | | | | | | | | | After changing the class name QmlClassNode to QmlTypeNode, there remained several local variables that still used the name qmlClass. These are now changed to qmlType. There were also some uses of qmlType that were QString variables. These have been changed to qmlTypeName. Change-Id: I18fb05d4d8aeb1e36acabc4574c62c55a44f339a Task-number: QTBUG-43715 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Change uses of module and qmlModuleMartin Smith2015-02-031-7/+7
| | | | | | | | | | | | | | | | | The uses of moduleName and qmlModuleName are changed to physicalModuleName and logicalModuleName respectively. A few other names are also changed in the same way. These changes are being done both to support documentation of javascript but also to emphasize that moduleName is really the name of the physical library module the entity is part of, and qmlModuleName is really the name of a collection of logical entities that is versionable and that may contain entities located in different physical modules. Change-Id: If49392aabf5950dc7b97c84f8134e9369e76dd1b Task-number: QTBUG-43715 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Change name of node typeMartin Smith2015-01-221-5/+5
| | | | | | | | | | | | QmlClassNode is renamed to QmlTypeNode. This is done in preparation for implementing qdoc support for documenting javascript code. Next, QmlTypeNode will be renamed to JsTypeNode, and a new QmlTypeNode will be declared that will inherit JsTypeNode. Change-Id: Ia5d0c367d06c26cb43f887927bbcb096afcb7301 Task-number: QTBUG-43715 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Removing a few unneeded "? true : false"Alessandro Portale2014-10-091-1/+1
| | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* qdoc: Add new checkForCollision()Martin Smith2014-08-221-0/+18
| | | | | | | | | | | | But don't use it yet. qdoc will check for name collisions within a module, once we decide what collisions to look for and what to do about them. This change puts a rewritten checkForCollision() function back in, but doesn't use it yet. Change-Id: I41f9275c3ca29f228268ccf7cb2d99bbe0ce557c Task-number: QTBUG-40506 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: Remove all collision node stuff from qdocMartin Smith2014-08-221-46/+0
| | | | | | | | | | | | Now that the qdoc link command has ability to tell qdoc which module contains a link target or whether to link to a QML or CPP entity, collision pages should no longer be necessary. In fact, qdoc hasn't been generating any collisions for some time. This task removes all the collision node code from qdoc. Task-number: QTBUG-40506 Change-Id: I34d1980ca1c0fe4bb5ad27dd4b00e61fa7e6e335 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: Distinguish between QML property and attached propertyTopi Reinio2014-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A recent change in qtdeclarative (60ed6a43) added an attached property 'Window' to Item type, with property names identical to the ones already available in Window. This caused QDoc to report warnings for duplicate documentation for QML properties, because there was no distiction between a QML property and an attached property. This change fixes the issue by: - Allowing identical names for \qmlproperty and \qmlattachedproperty - Using distinct URLs/UUIDs/anchor references for them - Marking attached properties with '[attached]' qualifier in 'All Members' page. This doesn't solve the issue of disambiguating between a similarly named QML property and attached property when linking from an external location. However, these can be solved with the help of the \target command. Task-number: QTBUG-40674 Change-Id: Icc74de237366e9897334689fe354ab83e4af0356 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* qdoc: Give documenter more control of linkingMartin Smith2014-06-011-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This update is preparation for implementing the actual task described in the bug. To implement it required converting the QML type node and the QML basic type node to be first order tree nodes instead of subtypes of the documentation node. This cleans up a lot of messy logic in some places. It was also necessary to split the getLink() function in the html output generator into two functions, one still called getLink(), which handles the \l command, and one called qetAutoLink() which is called for generating auto links. This should make qdoc run faster. The basic infrastructure was also added for parsing the string in the square brackets for the \l command. There will be a further update to complete this task. Note that some autolinks might not be generated due to this change. I haven't seen any yet, but I believe there will be some. This can be fixed later, if it is a problem. Task-number: QTBUG-39221 Change-Id: I8135229984398408205ba901b9ef95ceac74683c Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: Simplify config code for reading file pathsTopi Reinio2014-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | This change greatly simplifies the code used for reading paths from config files: near-identical functions Config::getCanonicalPathList() and Config::getPathList() are combined into one, and the use of Config::getCleanPathList() is replaced with the above. Effectively, all paths read from the config files are now converted into canonical ones. It also adds support for absolute paths in config files. Task-number: QTBUG-36193 Change-Id: I2dc1ee6a67a400e056404ec1c09c6e81f643aa77 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* doc: Remove "current child" codeMartin Smith2014-03-311-1/+0
| | | | | | | | | | | | | | | | The current child concept was added to the Name Collision Node to heuristically provide better linking when a link operation reached a collision node. It is doubtful that this improved linking much, but now that qdoc uses multiple trees, it is much less likely that collision nodes will occur. In fact, there are none in in the current Qt5. Therefore, the current child code is hereby removed from qdoc. Task-number: QTBUG-37067 Change-Id: I33aea5d550afb7ceaf941d49112e02c21d44f6dc Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Teach qdoc to use multiple trees (part 3)Martin Smith2014-03-311-11/+14
| | | | | | | | | | | | | | | | | | With this update, qdoc is now ready for testing with multiple trees. In making this change to using multiple trees, it has become clear that qdoc does not really need trees the way it currently uses them. Each C++ class or namespace, or QML type is naturally a tree tree structure, but above that level, what we currently call a tree in qdoc should really be called a collection of maps. This change has moved qdoc in that direction. It remains to replace the Tree class with a class that encapsulates a set of maps, one for each major node type. That can be implemented later. Task-number: QTBUG-35377 Change-Id: I39068a0cb26c01f14ec0e4621742d727efb913bf Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Teach qdoc to use multiple trees (part 2)Martin Smith2014-03-311-72/+66
| | | | | | | | | | | | | | | | | | | qdoc now knows how to search the forrest of node trees in an optimal order. But there remain some problems with specific searches that cross module boundaries. These include group membership and C++ and QML module membership, as well ass C++ base class resolution. Part 3 will be concerned with fixing these remaining bugs. With this update, qdoc now takes less time to generate the docs for Qt 5. Testing indicates that qdoc run time has dropped from about 14 minutes to about 7.5 minutes on an iMac. Task-number: QTBUG-35377 Change-Id: I6bded6ef54124b4f6e5914cad4548f0b600209b0 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Teach qdoc to use multiple treesMartin Smith2014-03-311-39/+6
| | | | | | | | | | | | | | | | | | | | | | | qdoc now builds a separate Node Tree for each index file it parsed. The main Node Tree now contains only the Nodes of things being documented in the current module. This should make qdoc run a little faster. qdoc now uses these separate trees to make intra-module and inter-module linking more robust by searching the trees in an order that depends on the type of link it is searching for. The tree for the current module is always searched first. Then qdoc searches the trees for either the C++ modules or the QML modules, depending on whether it is looking for a C++ link or a QML link. In preparation for this update, qdoc was also simplified a lot. Many functions became obsolete and were removed. Others were combined. Task-number: QTBUG-35377 Change-Id: Iea4e49869ff6a6ff0f4d53090728770d40d892f3 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: Fix Q_PROPERTY parsingTopi Reinio2013-12-311-6/+16
| | | | | | | | | | | | | | | | When parsing Q_PROPERTY declarations, qdoc tries to always read an associated value for each matched keyword. This fails for property declarations including a CONSTANT or FINAL, as they have no associated values. This change fixes the above problem and makes the parsing more robust by checking the return value of matchProperty() and skipping to closing parenthesis in case of failure. Task-number: QTBUG-35722 Change-Id: Ia483b8e74aeef19b2e761b21473cd4f765cdca19 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-1/+1
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Documentation for property groups is backMartin Smith2013-09-181-8/+5
| | | | | | | | | | | | | | This bug was marked fixed and closed, but I'm not sure it was ever completely fixed. The qdoc commands for QML property groups were not being processed, so although the property group and its sub-properties appeared on the page, the documentation text for the property group and its properties was never written to the HTML file. This has been corrected with this update. Task-number: QTBUG-32341 Change-Id: I5b33ab512a53456379c52236496fb7bc74850842 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* doc: Ensure page name does not changeMartin Smith2013-07-231-32/+32
| | | | | | | | | | | | This fix ensures that the page name is set only once. Also included are a few internal documentation changes that bring qdoc's internal terminology up to date. Task-number: QTBUG-31578 Change-Id: Ib52a5a9024533d5a695cee0055bf2bc4d9bc2af9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Implement better handling of QML property groupsMartin Smith2013-07-111-135/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The \qmlpropertygroup command is added, and qdoc is taught to generate better output for it. The format is, e.g.: \qmlpropertygroup QtQuick2::Item::anchors \qmlproperty AnchorLine QtQuick2::Item::anchors.top \qmlproperty AnchorLine QtQuick2::Item::anchors.bottom \qmlproperty AnchorLine QtQuick2::Item::anchors.left \qmlproperty AnchorLine QtQuick2::Item::anchors.right \qmlproperty AnchorLine QtQuick2::Item::anchors.horizontalCenter \qmlproperty AnchorLine QtQuick2::Item::anchors.verticalCenter \qmlproperty AnchorLine QtQuick2::Item::anchors.baseline \qmlproperty Item QtQuick2::Item::anchors.fill \qmlproperty Item QtQuick2::Item::anchors.centerIn \qmlproperty real QtQuick2::Item::anchors.margins \qmlproperty real QtQuick2::Item::anchors.topMargin \qmlproperty real QtQuick2::Item::anchors.bottomMargin \qmlproperty real QtQuick2::Item::anchors.leftMargin \qmlproperty real QtQuick2::Item::anchors.rightMargin \qmlproperty real QtQuick2::Item::anchors.horizontalCenterOffset \qmlproperty real QtQuick2::Item::anchors.verticalCenterOffset \qmlproperty real QtQuick2::Item::anchors.baselineOffset \qmlproperty bool QtQuick2::Item::anchors.alignWhenCentered Task-number: QTBUG-32341 Change-Id: I4b06a3a061b23680e663e8d4e82ac9863ffd4ecb Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-121-34/+15
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenubar.mm Change-Id: I4a699fc8a7f30b2af9de8e496c3d5f027b7495bb
| * qdoc: qdoc was confused by namespace and module with same nameMartin Smith2013-06-111-34/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | When qdoc searched for QtConncurrent::blockingFilter(), it found the module node for QtConcurrent instead of the namespace. This was because qdoc wasn't given specific enough instructions on how to perform the search. Now it searches for the namespace first, then the C++ class, then the module. Task-number: QTBUG-31535 Change-Id: I4f8aec503903508789738f2a77c76f47a3e80a93 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-231-1/+17
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * qdoc: Documentation for QMetaObject::Connection now appearsMartin Smith2013-05-081-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qdoc's faux C++ parser did not recognize class declarations of the form: class Name1::Name2 { ... }; ...where class Name2 is nested in class Name1. Now it does, but this fix doesn't handle deeper nestings. doc needs a proper C++ parser. Task-number: QTBUG-28664 Change-Id: I5adf88cc1b2ce03f5565250734416bf9592914b5 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Check 'node' for NULL before derefencing it, not afterMontel Laurent2013-04-021-2/+2
|/ | | | | | Change-Id: Iab4b28997d9d13645375284083e4e603e02cec5c Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: inherited members do not show up for QML componentsMartin Smith2013-02-131-5/+4
| | | | | | | | | | | | | | | | | | | | | | | This was a regression bug owing to a big qdoc cleanup for Qt5. But the way QML inheritance had been handled was not a good design, so it has been changed here. When a .qml file is parsed by qdoc, the base type of the QML component is detected, and its name is stored in qdoc's tree node for the component. After qdoc has parsed all the QML files, it traverses the tree, and for each QML component that has a base type name but no base type node pointer yet, it searches the tree for the base type node and stores the pointer to the node in the node for the components. Then when the output generator generates the doc page for the component, it has access to all the inherited members in the base type. Task-number: QTBUG-29569 Change-Id: Ib4958d05f55fa48a572f8ca51ffd57712f29bbc7 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Missing links to qRegisterMetaType()Martin Smith2013-02-081-31/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | A serious problem in the design of qdoc is its C++ parser. It is an ad hoc recursive descent parser, which has not kept pace with Qt's use of the more esoteric aspects of C++. Part of the problem is that qdoc does not send files through the preprocessor before processing them. The bottom line is qdoc needs the C++ parser used in Qt Creator. But that is a long-term solution. In the short term, we have to introduce minor hacks like this one to keep qdoc going until the parser can be replaced. The problem in this case is that qdoc doesn't handle the QT_PREPEND_NAMESPACE macro in function declarations. The solution is to let qdoc ignore the macro and just use the macro's parameter, which is what qdoc wants anyway. Task-number: QTBUG-28953 Change-Id: I5b9efcc10fa8fb500a44854ee995c2e50e9e16b5 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix module name formatSze Howe Koh2013-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* qdoc: Listing group members across modulesMartin Smith2012-11-271-3/+1
| | | | | | | | | | | | | | This is a first attempt at fixing the problem, but it probably is not the entire solution. The problem requires adding attributes to the index files and then reusing them when the index files are read. The same problem will be affecting the module lists themselves, but that is not fixed in this update. Task-number: QTBUG-28036 Change-Id: I8593d5b9446e51a5204b6c71f8c4f2b63f445972 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Added module attribute to most index elementsMartin Smith2012-11-061-2/+2
| | | | | | | | | | | | | | The index file generated by qdoc when it is run in -prepare mode has been modified so that most elements have a module attribute. The value of the module attribute either came from an \inmodule command, or it is the value of the project variable specified in the qdocconf file that was read by qdoc. Task number: QTBUG-27626 Change-Id: I44198bbbc1738fafc110c6b905eb1d67bc745323 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QDoc: remove the experimental basedir variablePierre Rossi2012-09-281-2/+0
| | | | | | | | | It was introduced in the early days of the docs' modularization and appears not to be used anywhere anymore. Change-Id: I5b0c60d92828624af2129153fce96ad01aec861c Reviewed-by: Martin Smith <martin.smith@digia.com>
* Use QStringList::join(QChar) overload where applicable [tools]Marc Mutz2012-09-231-2/+2
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: Ia087beb886bbaec1a0976cd924440d8904044879 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* qdoc: Refactoring of qdoc data structuresMartin Smith2012-09-141-258/+78
| | | | | | | | | | | | | | | | | | This commit is the beginning of a significant overhaul of qdoc. A new class, QDocDatabase, is added, which will eventually encapsulate all the data structures used by qdoc. In this commit, the Tree class is made private and only accessible from QDocDatabase. Several maps structures are also moved into QDocDatabase from other classes. Much dead code and unused parameters were removed. Further simplification will follow. Change-Id: I237411c50f3ced0d2fc8d3b0fbfdf4e55880f8e9 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* doc: Replaced FakeNode with DocNodeMartin Smith2012-08-211-52/+53
| | | | | | | | | | | | | | | | | | The name FakeNode was a bad choice. It was used to represent something that wasn't derived from a C++ declaration in a .h file. Any generic page or QML item or any special kind of qdoc construct was stored in a FakeNode. The name was unfortunate because the constructs stored in FakeNodes were just as real as C++ constructs. So FakeNode has been renamed to DocNode, which just refers to a documentation node. The node type Fake has been replaced with node type Document. Change-Id: Ida9de8288b7b8915bf9273fd890ca84aaf05e182 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Ignore property functions of obsolete propertiesMartin Smith2012-08-021-1/+1
| | | | | | | | | | | Property setter and getter functions are no longer included in the output when the property itself has been marked \obsolete. Task nr: QTBUG-26425 Change-Id: Iac315445d1916467b12be03989bd4513a03a2397 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Changed \qmlclass to \qmltype, added \instantiatesMartin Smith2012-07-261-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | The \qmlclass qdoc command is now deprecated. Use \qmltype instead. \qmlclass had two arguments, the QML type name and, if the QML type was elemental, the name of the C++ class that the QML element instantiates. The \qmltype command has only one argument, the QML type name. If the QML type is elemental, then the \qmltype command should be followed by a \instantiates context command in the same qdoc comment. e.g.: \qmltype Item \instantiates QDeclarativeItem When the developer does not include the \instantiates command for an elemental QML type, qdoc will no longer be able to detect that the C++ class name is missing, and qdoc will no longer be able to detect when the name specified for a \qmlproperty of the elemental QML type has the wrong name. Task nr: QTBUG-26648 Change-Id: Ia60872a35113a6f615bfc751ce1e9db6279dfb8e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Revert "QDoc: Allow '0' to be used as 2nd arg for \qmlclass."Casper van Donderen2012-07-261-21/+11
| | | | | | | | | | This reverts commit 50dfd15dcc49d12c5335a37999aef041d7fdfaae. The change is not necessary anymore, since a new solution using \instantiates in in the works, having two ways to do exactly the same thing is not necessary. Change-Id: I6e139d760372fc6177023c470850418b2385fccd Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Restricted qdoc errors for \reimp commandMartin Smith2012-07-201-26/+28
| | | | | | | | | | | qdoc no longer considers the \reimp command when the parent C++ class has been marked \internal, because the reimplimented functions aren't supposed to be in the documentation at all, when the parent class is internal. Change-Id: I3d811ca737934f95e9078ce7b1e957890f6aaf38 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QDoc: Allow '0' to be used as 2nd arg for \qmlclass.Casper van Donderen2012-06-281-11/+21
| | | | | | | | | There can be occurences of \qmlclass where there is no C++ class (for a pure QML Type for example). QDoc will ignore searching for a C++ class when '0' is specified as second argument to the \qmlclass command. Change-Id: I09c8c7ad302daffb0723a49967951ca623e646e4 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Report multiple topic commands as an errorMartin Smith2012-06-281-0/+13
| | | | | | | | | | | | Some documenters are using two topic commands in a single qdoc comment. This is only allowed for \qmlproperty so that multiple QML properties can be documented with a single comment. qdoc now reports an error for all other combinations of multiple topic commands. Task Nr: QTBUG-26345 Change-Id: I1f9a6d2502ccffa76c2d41f961be3750014a0a56 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Better error messages for QML command errorsMartin Smith2012-06-121-40/+45
| | | | | | | | | | | | Some error messages were not clear for these qdoc commands: \qmlclass, \qmlmodule, \inqmlmodule, and \qmlproperty. They have been made clearer now. Also, qdoc now parses input files in the same order all the time now. The order is alphabetic now. This might not be the optimal order. Change-Id: Id53a5ec8105009c71f4bbd41973a54aed7821099 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Make qdoc compile with QT_STRICT_ITERATORSThiago Macieira2012-05-291-13/+13
| | | | | Change-Id: I2923315678d1aef516b35a8c83fe734367723a28 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Fixed pure doc parserMartin Smith2012-05-251-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | This parser was meant to parse any file for qdoc comments only, ignoring everything else that is not inside a qdoc comment. But it wasn't doing that. It was parsing all code, regardless of the language, using the C++ parser. Now it has been corrected to look at qdoc comments and skip over everything else. Note thast this means qdoc will expect a qdoc topic command in each and every qdoc comment in the file. The posiution of the qdoc comment with respect to the code it is meant to document is not taken into account in the pure doc parser. This is in contrast to the QML and C++ parsers which do take comment location into account in some cases. Change-Id: I0804a4149baa942b463e0b6990c71e4039ac1a50 Reviewed-by: Keith Isdale <keith.isdale@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Report multiple QML property docssMartin Smith2012-05-181-20/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Documentation authors sometimes make the mistake of documenting a QML property more than once. Here, we refer to cases where a C++ class is documented in a .cpp file as a QML type. In this context one QML property might be documented in two qdoc comments, because the author of the second comment does not search the file for an existing qdoc comment for the property before adding the second one. When DITA XML is generated for this case, the QML type element will contain two <qmlproperty> elements with identical id attributes, which is invalid XML. id attributes must be unique within an XML document. qdoc now reports an error for this case, indicating that the QMLN property has been documented multiple times. This problem can't occur when documenting QML in a .qml file because in .qml files, each comment must appear directly above the thing it applies to. Change-Id: I3a22650a58371fbda2ac7a5429fc036f41750423 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Fix some QString usage issues (Krazy warnings).Friedemann Kleint2012-05-161-3/+3
| | | | | | | | - Avoid single-character constants. - Use QString() instead of "". Change-Id: If04eff389e7b6d4a18201365b711708fdf545d00 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Fix warnings about unused variables.Friedemann Kleint2012-05-161-4/+4
| | | | | Change-Id: I2052da55022334362efb5765335f00692f4c65fa Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Fixed a regression bug caused by fixing error messagesMartin Smith2012-05-111-5/+6
| | | | | | | | | | | | | The C++ code marker is the default code marker. The default code marker was being called for .qdoc files. But when the tree nodes were each assigned a location object based on the location in the source file where the node was built, the default code marker was no longer used. Instead, the plain code marker was used. This was wrong. qdoc now knows to use the C++ code marker for all .qdoc files. Change-Id: I15a58168db74cc5aa82a1fbccc5b7ece219ec297 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QDoc: Return correct path when quoting example files.Casper van Donderen2012-05-111-0/+2
| | | | | | | | | When the exampledirs qdocconf variable is . the first 2 characters of the file to quote from were being cut off, since there was a string comparison between the size of the strings with and without './' Change-Id: Iede54b5f77ec8a7530c608908f08e7eb4351f0f1 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Fixed a qdoc error problemMartin Smith2012-05-101-47/+50
| | | | | | | | | | When a page exists in more than one file, qdoc was reporting this sometimes without reference to the locations of the files. This has now been fixed. Change-Id: I0697acc170b94a74b15fb384556dd76f764f7792 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>