summaryrefslogtreecommitdiffstats
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* Output absolute paths in qdoc messages.Frederik Gladhorn2012-09-111-2/+5
| | | | | Change-Id: I4499bb0464cca3703026e317e940612091bf55a2 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Use QStringList::join(QChar) overload where applicable [QtDBus]Marc Mutz2012-09-101-1/+1
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I807b0e88ac71a0cb367fb4170cca8f2cb0ad43f3 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Use the same hash for 8 bit strings as in QByteArrayLars Knoll2012-09-091-12/+1
| | | | | | | | | Moc still used a different and quite a bit more complicated algorithm to hash 8bit strings then QByteArray. Change-Id: I86efb08d5ab7de1863fc168dcfc73399e72e1331 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removing duplicate includesSergio Ahumada2012-09-091-1/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@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>
* Generate includes for Qt containers used as auto-metatypes.Stephen Kelly2012-09-031-0/+42
| | | | | | | | | | | | Otherwise the containers might be forward declared in the moc file, and when the moc file is compiled in a standalone translation unit, the full definition of it would not be available. This results in odd compile errors, so instead generate the includes if required. Change-Id: Ie01c5a5d45314daad0b00dec03b3e1e18cdbae64 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix moc generating invalid code for slots with reference types as argument.Volker Krause2012-09-021-2/+2
| | | | | | | | | | | We can't have T& declared/registered as a metatype (wont compile), but using it as type for a slot argument is possible. With the recent introduction of metatype auto-registration we have to make sure that moc doesn't attempt to auto-register those. Simple types are handled correctly already, this fixes containers and smart pointers. Change-Id: Id96857c57d6ebf158a67e9d527c89dc195473b1b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.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>
* Fix static plugins for classes in namespaces.Friedemann Kleint2012-08-301-1/+2
| | | | | | | | | | | Breakage introduced by 819d0203e6fd9d27dc4c22e8c3cb8b437998f62a . Extend QT_MOC_EXPORT to take the unqualified class name as well for the function names. Change-Id: I736097b564caa37c522d723780663d03341f9032 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Lukas Geyer <lgeyer@gmx.at>
* Let qdoc respect excludedirs for examples.Frederik Gladhorn2012-08-293-5/+4
| | | | | Change-Id: I01063b38122aea3615801ff013c8c4a1589327fc Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Use qualified name for QT_MOC_EXPORT_PLUGIN()Lukas Geyer2012-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using non-qualified name for QT_MOC_EXPORT_PLUGIN() breaks template instatiation for QPointer<T>::operator=(T*) in qt_plugin_instance() when the class is embedded a namespace with the same name. namespace Test { class Test : public QObject { Q_OBJECT Q_PLUGIN_METADATA(IID "Test") public: Test(QObject *parent = 0) : QObject(parent) {} }; } // namespace Test In function 'QObject* qt_plugin_instance()': error: expected type-specifier before 'Test' error: no match for 'operator=' in '_instance = (int*)operator new(4u)' note: candidates are: In file included from qtbase\include\QtCore/qpointer.h:1:0, from qtbase\include\QtCore/QtCore:68, from test.cpp:1: qtbase/src/corelib/kernel/qpointer.h:87:25: note: QPointer<T>& QPointer<T>::operator=(T*) [with T = QObject] qtbase/src/corelib/kernel/qpointer.h:87:25: note: no known conversion for argument 1 from 'int*' to 'QObject*' qtbase/src/corelib/kernel/qpointer.h:79:7: note: QPointer<QObject>& QPointer<QObject>::operator=(const QPointer<QObject>&) qtbase/src/corelib/kernel/qpointer.h:79:7: note: no known conversion for argument 1 from 'int*' to 'const QPointer<QObject>&' error: expected ';' before 'Test' Change-Id: Idd3e57ab1c888352ad2a8e8f6efca75d858089df Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add automatic metatype registration for invokable methods.Stephen Kelly2012-08-282-1/+52
| | | | | | | | | | | This works similarly to the automatic registration for Q_PROPERTY types, but in this case it mostly affects the need for users to call qRegisterMetaType<T>() before using queued connections with methods using non-built-in metatypes, or before using invokeMethod manually. Change-Id: Ib17d0606b77b0130624b6a88b57c36d26e97d12d Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add automatic metatype registration for Q_PROPERTY types.Stephen Kelly2012-08-283-5/+93
| | | | | | | | | | | | | | | | In Qt 4, the user needs to call qRegisterMetaType if the property could otherwise be read before the type is registered with the metatype system. This patch makes that unnecessary and automatic by registering it when the first read indicates that it is not yet registered instead or when QMetaProperty::userType is called before it is registered. The types which are automatically registered exclude the built-in types, which do not need to be registered, and include metatypes which are automatically declared, such as pointers to QObject derived types and containers of existing metatypes. Change-Id: I0a06d8efdcb64121618e2378366d0142fa0771f5 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* moc: parse classes that use Q_DECL_FINAL|final|sealedMarc Mutz2012-08-261-1/+11
| | | | | | | | | | | | | | | | | | | | This only works with the C++11 contextual keyword directly, the MSVC equivalent 'sealed', or the Qt define for it. While this isn't a problem for syncqt, being an internal tool, moc should eventually be able to parse user code using local C++11-final-wrapping macros. For this, I guess moc would have to be taught to expand macros in code and not just test #if clauses, potentially driven by something like #pragma qt-moc expand-this #define MY_FINAL_CLASS final but that's something for someone more intimately familiar with moc's source than I am. Change-Id: Id6aec961a881e8d5a9b76a7fc8e1c02c71913f64 Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* Remove QProxyModel from qtbase.Stephen Kelly2012-08-201-1/+0
| | | | | | | A copy is placed in uihelpers for anyone who might be using it. Change-Id: I175f7bc5dcbf25a910d28bfd8985579866392938 Reviewed-by: Lars Knoll <lars.knoll@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>
* rcc: use new qEnvironmentVariableIsEmpty()Marc Mutz2012-08-141-1/+1
| | | | | Change-Id: I48dd9b7b8dd51e1c662273eb37ac2e1f4c1c4d15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add possibility to add OpenSSL, DBUS, MySQL path under WindowsAndreas Holzammer2012-08-072-0/+4
| | | | | | | | | | | Under Windows it's quite possible that OpenSSL, DBUS or MySQL is not installed into a central place. If -I and -L is passed at configure time, it is added to all targets, and if that path contained a conflicting header things would go wrong. Change-Id: Ic3338c49aa6eaa91b3abf5341e709ef604bf7aab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* Fix crash in uicAndreas Holzammer2012-08-011-2/+6
| | | | | | | | | | | Compiling Qt5 uic with Microsoft Visual Studio 2008 with SP1 will lead into a assertion in the copy constructor of qstring. This is apparently a compiler Bug. Change-Id: Ia3353434d00b2e87800b937d891eabef86293751 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* build host tools in release mode againJoerg Bornemann2012-07-312-8/+2
| | | | | | | | CONFIG does not contain build_all anymore, thus we need to check QT_CONFIG in bootstrap.pr{i,o}. Change-Id: Ia505fa101adc49f185908ca575d3211caed612db Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Search the include paths for json files containing plugin infoLars Knoll2012-07-314-8/+22
| | | | | | | | This fixes shadow builds with autogenerated .json files as e.g. used by Qt Creator. Change-Id: Ibb783b05d97d996100da4b0dca859fa3f310dc83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* qclass_lib_map.h: Fix include of the QDeclarativeView widget.Friedemann Kleint2012-07-311-1/+1
| | | | | | | Task-number: QTBUG-25196 Change-Id: If25c4df29297435b159706257d9f37a9ef2f3d7a Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Move the text codec list to qcoreglobaldata.Lars Knoll2012-07-311-1/+1
| | | | | | | | | | | This removes some global statics in QTextCodec and makes the code better to maintain in the longer term. Remove QT_NO_THREAD defines around mutexes as this isn't required in Qt 5 anymore. Change-Id: I15ede75f53b16f134f4053f3188c4b47e86fcd8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* QDoc: Introduce a setting to include index nodes in QHP.Casper van Donderen2012-07-252-1/+3
| | | | | Change-Id: I5d35961241300f509b8a9d8e3cf980fabc10cfab Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Fixed incorrect href attribute values in qdocMartin Smith2012-07-2511-105/+99
| | | | | | | | | | | | 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: 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: Fix make commands for QDoc manual.Casper van Donderen2012-07-192-10/+8
| | | | | Change-Id: I55c3eae43928e87a0aa470127f9877741391deee Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Generate a fatal error as appropriate.Stephen Kelly2012-07-161-1/+3
| | | | | | | | | | | | | | Otherwise, subdirectories under directories which are added to a resource file generate garbage in the binary. The easiest way to see this is cd tests/auto/corelib/kernel/qvariant mkdir stream/qt4.9/somedir make && ./tst_qvariant loadQt4Stream Change-Id: I32630ecb6d515db1d135f0ffc5cf14fd8caa0a4f Reviewed-by: hjk <qthjk@ovi.com>