summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/node.h
Commit message (Collapse)AuthorAgeFilesLines
* qdoc: Fixed the since list for modularized QtMartin Smith2012-11-021-2/+2
| | | | | | | | | This required adding a "since" attribute to the index file. Task number: QTBUG-27695 Change-Id: I97ca96b837ce404ea85ca8086718be4e7a9e21a8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.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-44/+44
| | | | | | | | | | | | | | | | | | 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>
* Use QString() instead of "".Frederik Gladhorn2012-09-011-5/+5
| | | | | Change-Id: I42c55344663808b8362e2c9185273a00fc1c70b0 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* doc: Replaced FakeNode with DocNodeMartin Smith2012-08-211-16/+16
| | | | | | | | | | | | | | | | | | 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: Changed \qmlclass to \qmltype, added \instantiatesMartin Smith2012-07-261-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* qdoc: Fixed incorrect href attribute values in qdocMartin Smith2012-07-251-3/+2
| | | | | | | | | | | | There were two fileBase() functions, but only one was correct. The wrong one was being called in some cases. Now there is only one fileBase() function, which is always called. Task nr: QTBUG-26591 Change-Id: I2c40e2152a8c7ad1bb9db256ecf1367148f0e7f6 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Removed several #if 0 blocks.Martin Smith2012-07-061-9/+0
| | | | | | | Removed a lot of dead code. Change-Id: I237521efab7dd046d3a47ab92a6a0e083c59ab55 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Better error messages for QML command errorsMartin Smith2012-06-121-8/+9
| | | | | | | | | | | | 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>
* qdoc: Report multiple QML property docssMartin Smith2012-05-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Include QML type name in method quidMartin Smith2012-05-161-1/+1
| | | | | | | | | | | | A case was found where a method inherited from a QML type marked abstract had the same name as a method in the inheriting class, and these two methods received the same quid. This was fixed by including the QML type name in the guid for QML methods. Change-Id: I110eb254b3c6be014cb67fdc5b57b5aa2f575220 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Fixed three qdoc error problemsMartin Smith2012-05-091-0/+6
| | | | | | | | | | | | | | | | | | 1. For QML properties documented in a .qml file, qdoc no longer prints the error message that it can't detect whether the property is read-only. 2. For QML properties documented in .cpp files, qdoc now includes the file path and line number, when it prints the error that it can't detect whether the property is read-only. 3. qdoc also includes the completely qualified property name in the error messages described in 2. Change-Id: If88381783fd0f29271f579ae170a0a6f4b1a7344 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Fixed qdoc error messagesMartin Smith2012-05-091-2/+2
| | | | | | | | | | | qdoc prints many error messages without including the source file path and the line number for where the error occurs. This makes it difficult to find the place to fix the error. This update corrects some of those error messages. Further updates will fix the others. Change-Id: I9c0eed96482c61643a2d83c5135368413e63ae52 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Fixed minor version number in DITA XMLMartin Smith2012-05-041-5/+14
| | | | | | | | | The DITA XML didn't contain the correct QML Module version mumber in the imports statement. Change-Id: I22b75facc1396c5adea88be49c86fff11f19f27b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QDoc: Generate unique ids for qmlMethods.Casper van Donderen2012-05-041-2/+0
| | | | | | | Also delete unused function. Change-Id: I8c3590d17c823bc27dcb9d9e73b7b812e078d33b Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Further changes to the QML specializationMartin Smith2012-05-011-2/+3
| | | | | | | | | Re-adding <qmlInherits>, <qmlInheritedBy>, <qmlInstantiates>, and <qmlSince>. Also adding <qmlAttached>. Change-Id: Iebd70a37b083bc404ce621d0bb9d3090dbc1109e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Further changes to the QML specializationMartin Smith2012-04-281-13/+7
| | | | | | | | | | The <qmlPropertyGroup> tag now has an id attribute of the form "id-qml-propertygroup-xxx" where the xxx is the property name. //This should be unique within the document. Change-Id: I20b30266dbe92b85b60400de30ebf9b1f1e292ea Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Fixed to report read-only QML properties correctlyMartin Smith2012-04-111-41/+39
| | | | | | | | | | | | Now the default for a QML property is writable. If qdoc can't detect the actual read-only status, writable is assumed. There were some cases where qdoc could not determine the actual read-only/writable status for a QML property. In these cases, qdoc reported read-only because the default was read-only, which was not optimal. Change-Id: I55aeb2bedcde92a414f4d48a8d995e5e9dbca5da Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Allow documenting a C++ class as a QML type.Martin Smith2012-04-021-35/+33
| | | | | | | | | | | | | | | | | | | Now qdoc can handle the case where a C++ class is documented as a QML type of the same name, or as both a C++ class and a QML type of the same name. And collisions pages are created for both the HTML and the DITA XML output. A collision page is created when two items have the same name. The collision pages will be augmented later to include the list of pages where ambiguous links to one of the items listed on the collision page are actually located, so the writer can go back to those links and add the appropriate qualifier. Change-Id: I5a9632b2d2209e0784392047056bed8962005624 Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Notifier signals don't need separate documentation.Casper van Donderen2012-03-201-0/+1
| | | | | | | | | | | | | Similar to getters and setters, notifier signals don't need separate documentation. Reimplementation of http://codereview.qt-project.org/#change,19374 in qtbase. Change-Id: If77fc554a3d8c1b520940d23e17cb7f76a71660f Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Structure the DITA map with a root node.Martin Smith2012-03-151-0/+5
| | | | | | | | | | | The root topicref is now always index.dita, unless there is no index.dita. But there is always a root topicref that has the project name as its navtitle, even if there is no index.dita file to map it to. Task-number: Mzilla bug - 7229 Change-Id: I0c9fdf1a2e3ba847fe8975a0745667189a77a755 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc3: qdoc now handles overloaded methods for QMLMartin Smith2012-03-131-2/+7
| | | | | | | | | | | | When a C++ class is documented as a QML type, it can have overloaded QML methods. These are now handled correctly by qdoc. The method list for QML types is now output with the full method signature. For signals and handlers too. Task-number: QTBUG-24670 Change-Id: If529d4136f5b480373b6ac25d2dceef15e6ea3db Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Move qdoc into qtbase and bootstrap itLars Knoll2012-03-081-0/+958
We need qdoc in qtbase to be able to properly modularize our documentation and build it when building the different Qt modules. qdoc does contain a copy of the qml parser from qmldevtools, but this is the lesser evil compared to how we are currently forced to genereate our docs (and the fact that no developer can run qdoc and check the docs for their module). Change-Id: I9f748459382a11cf5d5153d1ee611d7a5d3f4ac1 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>