summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc
Commit message (Collapse)AuthorAgeFilesLines
* qdoc outputs warnings in a form which Creator will recognizeShawn Rutledge2012-10-131-2/+3
| | | | | | | | | | | Recently Creator started recognzing the warnings from qdoc, however because warnings are not labeleled with " warning: ", there is no yellow-triangle symbol in the Issues list. This patch makes the output look the same as warnings or errors that come from gcc. Change-Id: I895a656d22ce8b59da90c58b86a444c86c8edf84 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* qdoc: qdoc now can run in 2 passesMartin Smith2012-10-135-26/+56
| | | | | | | | | | | | | | | | | | | | Two command line options have been added, -prepare and -generate. If you run qdoc with -prepare, qdoc reads and parses the source files but does not generate the documentation. It only creates the .index file for the module you are running qdoc on. If you run qdoc with -generate, qdoc reads and parses the source files as well as the .index files created by running qdoc with -prepare, and it generates the documentation but no .index file. If you run without either option, qdoc runs as before, i.e. it runs both passes as a single pass. Task number: QTBUG-27539 Change-Id: Idbfe3f0f9dff58283596b504f00dff3f70f6e371 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Allow empty character literal ''Martin Smith2012-10-131-2/+8
| | | | | | | | | | | qdoc's tokenizer was reporting an error for the empty character literal ''. Now it allows it. Apparently it makes sense in .js files. Task number: QTBUG-25775 Change-Id: If407427fad9b65a035c2c4785d53c9e3d5202e62 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Modularize documenation buildTor Arne Vestbø2012-10-102-1/+12
| | | | | | | | | | qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global includes, instead of using relative paths. Qt modules will automatically get a doc target that builds and installs into the right place (including supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module). Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Centralize place where we ensure qdoc is built before generating docsTor Arne Vestbø2012-10-101-5/+0
| | | | | Change-Id: Ie0220d3c76990f6052edcd8c738e4e2807f35c71 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* qdoc: Implements the -no-link-errors optionMartin Smith2012-10-108-50/+36
| | | | | | | | | | | | The -no-link-errors flag tells qdoc not to print any link error messages at all. This is useful for finding and fixing all non-link errors in a module. Task number: QTBUG-26870 Change-Id: Id4b0eebb6c0509c57d2f01763b6dedbfb6756a91 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* doc: remove old un-used monolithic qdocconf fileTor Arne Vestbø2012-10-081-115/+0
| | | | | Change-Id: I253fa079928e55e2c3c574e9c98780d2c72086cf Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix a bug in how paths are made canonical and relativeJan Arve Saether2012-10-081-1/+1
| | | | | Change-Id: Id9b2de9097cab4520882b48a28fccd382c5e076d Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Simplification of target ref constructionMartin Smith2012-10-086-171/+188
| | | | | | | | | | | | This change is being done to simplify qdoc, but the motivation was to fix a segfault in qdoc when running the release version of qdoc on linux. The change improves qdoc by simplifying the code whether it fixes the segfault or not. Change-Id: I2c865f7f1e2a44763aa7349d1bd739ad562f4029 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Change to debug outputMartin Smith2012-10-081-1/+2
| | | | | | | | Only print debug output if -debug is used on the command line. Change-Id: I2bdfca1a072f728427da61f05b34e6e07d933183 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Change qdoc to use QML terminologyMartin Smith2012-10-081-1/+1
| | | | | | | | | \since command's output to "This QML type was introduced..." Task number: QTBUG-24784 Change-Id: I741efb57979eb76f4675915ef1a6b983deb492d9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Adding a debug functionMartin Smith2012-10-084-0/+41
| | | | | | | | | | | | | qdoc segfaults for one user, when he runs the release version of qdoc but not the debug version. This change adds a -debug option to the qdoc command line options. If set, qdoc will print debug messages at useful milestones so we can see where it is when it goes into the weeds. Change-Id: I0e826e74399eaf50091817c68c775d02c6b615d2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Augment imagedirs listMartin Smith2012-09-295-8/+54
| | | | | | | | | | | | | | | | | | | | | | | | | Modularization of examples has resulted in putting all documentation and code for an example in each example subdirectory. In particular, each example subdirectory now contains a doc/images subdirectoy, where images are stored that are linked to from the example .qdoc files, which are in the doc/src subdirectory of the example directory. Because there are so many example subdirectories, it would be difficult to list all the doc/images directories in the imagedirs variable of the qdocconf file. Therefore, qdoc now searches all the directories listed in the exampledirs variable to find all the doc/images subdirectories there, and it adds these to the imagedirs variable for use in finding images called out in \image and \inlineimage commands. Task Nr: QTBUG-27248 Change-Id: I070ba1a558ab32e1db06429a71c083b55f9dd0ea Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QDoc: remove the experimental basedir variablePierre Rossi2012-09-2810-147/+1
| | | | | | | | | 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>
* qdoc: retrying More refactoring of qdoc data structuresMartin Smith2012-09-2616-1738/+2016
| | | | | | | | | | | This commit is the second phase of a significant overhaul of qdoc. Two new classes, QDocIndexFiles, and QDocTagFiles, are added to encapsulate the creation and use of the qdoc index files, and the creation of the qdoc tag file. Change-Id: I94651b10628e535ea7b26bd8256037cd819ccea7 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Remove duplicate words and punctuation from documentation.Mitch Curtis2012-09-261-1/+1
| | | | | Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Use QStringList::join(QChar) overload where applicable [tools]Marc Mutz2012-09-2310-12/+12
| | | | | | | | | | 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-2293-2096/+2096
| | | | | | | | 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>
* make src/tools/ compile without CamelCase headersOswald Buddenhagen2012-09-1935-78/+77
| | | | | | | | so the build works with syncqt -minimal Change-Id: Ief5e8eb9a504dd6c84cff76cc3e5257450386a0f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make qdoc read multiline macros in files with CRLF endingsJan-Arve Saether2012-09-181-1/+4
| | | | | | | | | | | | | | | | | | | | | This caused qdoc for instance to not being able to parse qglobal.h correctly. (On windows, it stopped to parse anything meaningful after the line with this macro:) #define Q_INIT_RESOURCE_EXTERN(name) \ extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); It worked on linux just because on linux a line continuation 'token' is the sequence "\\\n" (on windows it is "\\\r\n") So for files with CRLF line endings, it treated *only* the first line as a macro, potentially causing the subsequent lines to affect the state of the tokenizer. Change-Id: If7c80ee7eb317f2d324ace7ff540ced7c31185dc Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Refactoring of qdoc data structuresMartin Smith2012-09-1435-2111/+1817
| | | | | | | | | | | | | | | | | | 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>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-142-2/+2
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDoc manual: ordered command listJerome Pasion2012-09-141-3/+3
| | | | | | | | Some commands were not listed in alphabetical order. Change-Id: I299abe145ca0f9d63c9ceefb801f5c53548e7938 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Output absolute paths in qdoc messages.Frederik Gladhorn2012-09-111-2/+5
| | | | | Change-Id: I4499bb0464cca3703026e317e940612091bf55a2 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Fix missing or improper include guard in headersSergio Ahumada2012-09-091-2/+2
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: Icf7d7d4bed91443b3b21ef5d4219dbd260dffef3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdoc: Renaming include guard in qmlmarkupvisitor.h headerSergio Ahumada2012-09-081-2/+2
| | | | | | | | This header guard is duplicated with qmlvisitor.h Change-Id: I11787dd8af2834e446eabd219f93b74c0b52428d Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Added API Reference Style GuidelinesJerome Pasion2012-09-077-8/+617
| | | | | | | | | | | | -added C++ and QML language guidelines as part of QDoc Guide -included snippets -fixed links in the HTML template of the QDoc Guide -compiles when the main QDoc manual is compiled Change-Id: Iadd799712eef80e905d092396cb7a1e25a863b43 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Fix a bug in qdoc where to look for index files.Jan-Arve Saether2012-09-071-1/+3
| | | | | | | | | | This was only a problem if the qdocconf file was in the same directory as the current directory (QDir::relativeFilePath() returns an empty string in that case), so if the documentation was generated with the makefile rules, this problem did not reveal itself. Change-Id: I9c8956fdb46c4f307df7ab297dc94e8d3ef93fb4 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Find qdoc indexes in relative paths.Frederik Gladhorn2012-09-011-1/+1
| | | | | Change-Id: Ie717e85bfc3d49173d1ae4caf2a01ad6e9b8b625 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Use QString() instead of "".Frederik Gladhorn2012-09-017-58/+58
| | | | | Change-Id: I42c55344663808b8362e2c9185273a00fc1c70b0 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QDoc: Write SHA1 of .qhp to file.Casper van Donderen2012-08-313-1/+18
| | | | | | | | | QDoc should generate a SHA1 hash of the .qhp file to be able to use that file as a search index. The idea is that we can use the hash as an identifier to check if the search index was updated. Change-Id: Ifd19571bcebf7d735ef452dca6c046a14fedc0e2 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Doc: Simplify qtbase qdocconfs.Casper van Donderen2012-08-311-5/+8
| | | | | | | | | | We should be using the global qdocconf for the common variables. This change also allows you to just specify -installdir without using a templatedir. Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Let qdoc respect excludedirs for examples.Frederik Gladhorn2012-08-293-5/+4
| | | | | Change-Id: I01063b38122aea3615801ff013c8c4a1589327fc Reviewed-by: Martin Smith <martin.smith@nokia.com>
* doc: Replaced FakeNode with DocNodeMartin Smith2012-08-2119-545/+539
| | | | | | | | | | | | | | | | | | 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>
* Doc: Fix spelling errorsSergio Ahumada2012-08-172-3/+3
| | | | | Change-Id: Ibae8d10183f6b15a16b1499daa2df8802dbb014e Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Fix a bug in qdocs handling of excludedirsJan-Arve Saether2012-08-176-13/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was there because the way qdoc tries to exclude the directories given in the "excludedirs" variable: It did a simple string comparision on the candidate path (to include) with every string in the "excludedirs" variable. However, this did not work for all cases, since the paths are not canonicalized. For instance, the problem I faced was that the following qdocconf fragment: (config file located in doc/qtwidgets.qdocconf) sourcedirs += .. excludedirs += snippets Since qdoc would recursively parse all subfolders of sourcedirs, it would at one point visit the snippets folder, but it would have the relative path "../doc/snippets", which did not match with "snippets", causing snippets to not be excluded. In addition, it seems that qdoc tries hard not to use absolute paths (maybe because of more human-friendly error messages). I therefore chose to canonicalize the relative paths. As a side-effect this also give a better output from qdoc, as ../doc/foo.qdoc:42: Missing link will become foo.qdoc:42: Missing link Change-Id: If9c25fa569abd03542bd12675acd44d8f4e0282c Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Don't always add example .qdoc files to source listMartin Smith2012-08-071-3/+5
| | | | | | | | | When qdoc finds a .qdoc file in an exampledirs directory, it only adds it to the source list if it isn't already in the source list. This may be overkill, but it's safe. Change-Id: I2c5714c968f06e90f9b29b3a5481f80469e19ced Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* qdoc: Removed "../" from paths to imagesMartin Smith2012-08-062-12/+16
| | | | | | | | | | | qdoc was mistakenly assuming that the output was going into subdirectories. The base dir variable was not being tested. Task nr: QTBUG-26638 Change-Id: I9b331926f8954b58102f75fad3f233eaebb2bb4d Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* qdoc: No longer prints namespace qualifier twiceMartin Smith2012-08-062-8/+5
| | | | | | | | | | | | enum values in the Qt namespace were being printed as. e.g.: Qt::Qt::AlignLeft. This was due to the presence of a collision node that was not handled properly. Task nr: QTBUG-26628 Change-Id: I54adaba72410b2838f0922f181846bb7e76b61d4 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* qdoc: Ignore property functions of obsolete propertiesMartin Smith2012-08-022-1/+7
| | | | | | | | | | | 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>
* Fix a typo in the qdoc manual (QChra -> QChar)Laszlo Papp2012-08-021-1/+1
| | | | | Change-Id: I331765f42f8dd46bf312223754ade3c5d156e6dc Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QDoc: Set HTML Doctype to XHTML 1.0 Transitional.Casper van Donderen2012-08-021-1/+1
| | | | | | | | Previously QDoc HTML output was marked as XHTML 1.0 Strict, but did not pass validation. As XHTML 1.0 Transitional the W3C validation passes. Change-Id: Iced8c02b2602a82b94ee394e580bfb92023a517b Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QDoc: Set the default output encoding for HTML to UTF-8.Casper van Donderen2012-08-021-1/+1
| | | | | Change-Id: Ic6d8efae967514e143f224aed4c761a4c01eb434 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QDoc: Add extra tags when no HTML.endheader is specified.Casper van Donderen2012-08-021-1/+4
| | | | | | | | | The default Qt template inserts </head><body> with some arguments in the header of the HTML document. When you don't specify the HTML.endheader qdocconf variable those tags will not be generated and the QTextBrowser-based view in Qt Assistant will not be able to render the documentation. Change-Id: Ieee231f300e1dc71d6b6343771d2682b3de96d73 Reviewed-by: Pierre Rossi <pierre.rossi@nokia.com>
* qdoc: Added support for modularized example docMartin Smith2012-08-013-2/+28
| | | | | | | | | | | qdoc now searches for .qdoc files in the directories listed in the exampledirs variable. These files are added to the list of sources to be parsed. Task nr: QTBUG-26708 Change-Id: I6dfd7cd7b41e0bdf847f88b6d61ac0272902d4e1 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Removed useless qdoc warningsMartin Smith2012-08-011-4/+0
| | | | | | | | | | | qdoc was printing warning messages when a QML type was not given a minor version number in its \inqmlmodule command. The minor version number is not used for anything, so the warning messages are no longer printed. Change-Id: I5586b4d860fcc8e392de3d388c3327ed0029e266 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Added safety checks to findUnambiguousTarget()Martin Smith2012-07-301-1/+4
| | | | | | | | | | This is a blind attempt to fix QTBUG-26615. I can't reproduce the crash on OSX. Task nr: QTBUG-26615 Change-Id: Ifc6b68b7f302b9cd7d02129be8ae56841a35e5de Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Updated qdoc manual and qdoc guideMartin Smith2012-07-276-26/+143
| | | | | | | | | | | These documents now include the \qmltype and \instantiates commands, and the \qmlclass command is deprecated. Task nr: QTBUG-26648 Change-Id: I62da273be51609e651e33b9088e1667e4c6c1e76 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* qdoc: Changed \qmlclass to \qmltype, added \instantiatesMartin Smith2012-07-267-19/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>