summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/tokenizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* qdoc: qdoc was too slowMartin Smith2014-10-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hard-coded search order is now removed. The search order is now constructed from the depends variable in the qdocconf file. The basic idea is that qdoc is run once. It gets a list of all the qdocconf files for the modules in Qt5. First, qdoc runs in -prepare mode for each qdocconf file in the list. It generates the index file for each module, but these index files are never used. At the end of the -prepare phase for each module, qdoc keeps the tree structure for the module in a collection of trees. Second, qdoc runs in -generate mode for each qdocconf file in the list. But now it uses the existing tree for that module, so it doesn't have to read the sources files again, and it doesn't have to read any index files. Now it generates the docs for each module. The runtime for qdoc has been reduced by 90% when running qdoc for all of Qt5 on a not so new iMac. Before this update, qdoc took about 10 minutes to generate docs for Qt5. Now it takes a little over 1 minute. The new way to run qdoc is described in the Qt bug report referenced here. Note that running qdoc this new (old) way also generates fewer qdoc errors than when running qdoc the old way. This indicates that the index files qdoc uses when running the old way are incomplete. Note also that the old way of running qdoc is not affected by this update. The old way is still required for running qdoc in the current qmake/make system. That process must be changed to be able to use the faster qdoc. The details are provided in the Qt bug report. Change-Id: Ibec41d6fbaa9fc8cd070a05d04357bd02c4478f0 Task-number: QTBUG-41705 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.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>
* 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: Enable support for rvalue references in function signaturesTopi Reinio2013-08-301-1/+5
| | | | | | | | | | | | | | | qdoc interprets the double-ampersand in function parameters using rvalue references (e.g. 'Type &&other') incorrectly as a logical AND operator, resulting in a syntax error. This change works around the issue by treating '&' the same as '*', and defining Q_COMPILER_RVALUE_REFS for qdoc. Task-number: QTBUG-32675 Change-Id: I499611f16f22c33ff5b878da0cd59d67ddf53d72 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Make qtbase compile with QT_NO_TEXTCODECTasuku Suzuki2013-06-171-0/+12
| | | | | Change-Id: I1614dc08c0dd1950020e415f37c97160431b2336 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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: 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>
* 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>
* 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: Fixed pure doc parserMartin Smith2012-05-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [qdoc]Thiago Macieira2012-05-031-2/+2
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I2049c1919c15142ffb1dc406d183c6669ac3b1d6 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix warnings about truncations in constants.Friedemann Kleint2012-04-031-2/+2
| | | | | Change-Id: I46872c5b2866454112092c1ec5efbfe15db5af33 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move qdoc into qtbase and bootstrap itLars Knoll2012-03-081-0/+771
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>