aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlimportscanner
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-0/+9
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/quick/accessible/qaccessiblequickview_p.h src/quick/items/qquickmousearea.cpp src/quick/util/qquickanimatorjob.cpp tools/qmlplugindump/main.cpp Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
| * Tools: Add product name, version and description to the .pro filesFriedemann Kleint2017-01-311-0/+9
| | | | | | | | | | | | | | | | This information will then be visible in Windows explorer. Change-Id: I9d2f936584308394b4e3246d57bed44083b3cbca Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | qmlimportscanner: allow "-" as value for qmlFilesMarco Benelli2017-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | Passing "-" as an argument for -qmlFiles instructs qmlimportscanner to read the qml file from stdin. This is how qmlimportscanner is invoked by qmlplugindump. Task-number: QTBUG-58930 Change-Id: Ie43292988a31f9821887fbb704b903c03012fd3d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-251-14/+22
|\| | | | | | | | | | | | | Conflicts: tools/qmlimportscanner/main.cpp Change-Id: I01e17581f6691a03f83788773364d0cf96319514
| * qmlimportscanner: Output the relative path of a pluginFriedemann Kleint2016-12-201-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Change 3c5e438890db63ecde98c84d221f87a3af52e1bf enabling using the target path version of a parent module made it harder to determine the deployment target path from the module name. Output the relative path in addition to remove the need to do that in deployment tools. Task-number: QTBUG-57494 Task-number: QTBUG-52556 Change-Id: Ib76f40f19b530f9351205df9109f2fef6191979d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-2/+4
|\| | | | | | | Change-Id: I905dcd29377bf1b2e0ee086823b54277d18e78dd
| * qmlimportscanner: Output application name in generic error messagesFriedemann Kleint2016-11-241-2/+4
| | | | | | | | | | | | | | | | This makes it easier to spot issues in build logs. Amends change a23bcdf91971510b79c541fdff4a9467ead08751. Change-Id: I68e440c2ce79504fb5f5fa08392a91d39e631e25 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-231-1/+7
|\| | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4object_p.h Change-Id: Iff4d3aba7710a999b8befdc493cbe959e1ce02f9
| * qmlimportscanner: When passed an invalid file/directory it should cause an errorAndy Shaw2016-11-101-1/+6
| | | | | | | | | | | | | | | | Task-number: QTBUG-56617 Change-Id: I82eb9c07fd6350b2a63f80e62af4c0adf52656c7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Set Qt version on toolsFriedemann Kleint2016-11-091-0/+1
| | | | | | | | | | Change-Id: I21d77b2eba7107528fc00db0cf5d87f8347b63be Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | tools: use const (and const APIs) moreAnton Kudryavtsev2016-08-221-3/+3
| | | | | | | | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: If9018391c001eba3b4b2061d06c4caa8136811ab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tools: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-221-2/+4
|/ | | | | | | | Catch rvalues to prevent detach()'ing. Change-Id: I7be159a405c994429c0eee10805bfe96fcf4c806 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tools: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-201-9/+9
| | | | | | | | | Mark some local variables or parameters as const to prevent detach()'ing. Use qAsConst where is not possible mark as const. Change-Id: I0a777c3bd855abd3bb1ad0907152360cf4a1050e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmlimportscanner: fix MSVC buildAnton Kudryavtsev2016-08-181-32/+40
| | | | | | | | | | | | | | MSVC does not like QStringLiteral in operator[]. And the follow-up patch, which replaces 'foreach' with 'range for' triggers this MSVC bug. So this prequel patch resolves 2 issues: 1. fix MSVC build - the main issue. 2. de-duplicate QStringLiteral data (.rodata) - as drive-by issue. Change-Id: Ic6607edf324e9330d2b8dccd34561abb90f79cf1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* qmlimportscanner: use QStringLiteral more judiciouslyAnton Kudryavtsev2016-08-181-2/+2
| | | | | | | Replace it with QL1S or with QL1C in QStringBuilder expressions Change-Id: I894c546d2d010a713cc476d60b7966e77df996af Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tools: use QStringRef moreAnton Kudryavtsev2016-08-121-3/+3
| | | | | | Change-Id: I4fccbfb2b965daf3a31846d1d51d39eb74ad944d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix qmlimportscanner to find Qt Quick Controls 2 stylesJ-P Nurmi2016-05-021-12/+34
| | | | | | | | | | | The styles are installed to eg. qml/QtQuick/Controls.2/Material. That is, the version is in the parent module. See 3c5e438 for more details. Change-Id: Id5083c7934071666dd5e11511f16dea07d3104bf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Marco Benelli <marco.benelli@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-121-8/+8
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I356ec83cf687bd2833f9a7c5e820d56b1efa8979
| * QuickTest, QmlImportScanner: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-02-101-8/+8
| | | | | | | | | | | | | | ... in string comparisons. It's more efficient. Change-Id: Ia157618cf870870f24c4a2962a385962da819275 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-291-13/+18
|\| | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * qmlimportscanner: do not use local predicates.Marco Benelli2016-01-281-13/+18
| | | | | | | | | | | | | | | | Some (?) pre C++11 compilers are not able to resolve template arguments for std::find_if when the predicates are local to the function. Change-Id: I1e5c4adc3409bd32081ddedff158ab9dcc2eaa9a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-201-17/+12
|/ | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* qmlimportscanner: Improve command line help.Friedemann Kleint2015-11-161-6/+13
| | | | | | | | | Output example line containing the Qt import path ready for copy & paste. Task-number: QTBUG-48424 Change-Id: I44d0793ade4322d376ed2b72e5c3935b19ba2c7d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Skip designer-related directories while scanning imports.Marco Benelli2015-10-191-4/+31
| | | | | | | | | | | The qtcreator's qmldesigner plugin contains some directories that are not reacheable during the import scan, resulting in qmlplugindump complaing for missing dependencies. Since these components are not needed, let the scanner just ignore them. Change-Id: Icdf7c9e841cf5bcc1e737a0fc75a63b1e02f87f9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Tools: Fix single-character string literals.Friedemann Kleint2015-10-131-3/+3
| | | | | | | Use character literals where applicable. Change-Id: I55679dcc13c4c79567712c0dfaaabc2b84fee010 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Remove unused QQmlPoolFrank Meerkoetter2015-07-311-1/+0
| | | | | | | This code is no longer in use. Change-Id: If0cb009ac6622ed36cba5886d6685d3f242c3c87 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use by-ref in foreach when T is large or non-trivialSérgio Martins2015-07-181-1/+1
| | | | | Change-Id: I79271fdc3fa064e362dfaa64ff11d8a4c6b7e8c3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.hLars Knoll2015-04-241-1/+1
| | | | | | | | This is a cleaner separation and further reduces include dependencies in the definitions of our basic data structured. Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Clean up JS .import/.pragma directive scanningSimon Hausmann2015-01-081-32/+47
| | | | | | | | | | | There's a scanner in QQmlJS::Lexer::scanDirectives that can parse those, so let's get rid of extra parser that operates on a string. Instead this way we can do the scanning all in one shot, avoid detaching a copy of the source code string and (most importantly) bring the parser closer to the copy in Qt Creator, which uses the directives approach to extract imports and pragma. Change-Id: Iff6eb8d91a45d8a70f383f953115692be48259de Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
* qmlimportscanner: parse "depends" lines in qmldir filesShawn Rutledge2014-10-011-2/+23
| | | | | | | | | | | | | These lines specify additional hidden dependencies. The first use case is in QtQuick.Dialogs: DefaultFileDialog.qml uses FolderListModel, but this file is not listed in the qmldir because the decision whether to use it is made at runtime. So QtQuick.Dialogs qmldir contains this: depends Qt.labs.folderlistmodel 1.0 Task-number: QTBUG-41489 Change-Id: Ide4bca2ce2e342b95e9a87cc418d26f331372d12 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* qmlimportscanner: allow a qmlFile to come from stdinFawzi Mohamed2014-09-251-16/+26
| | | | | Change-Id: I22b0e45a8aa25d232791cdbeca15b5bc7400ae7d Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix parsing of JS imports from JS filesSimon Hausmann2014-04-241-28/+30
| | | | | | | | | | | | | | | | | | | | | | | If a .js file had an import of another .js file itself, like so: .import "otherFile.js" as Blah then the import scanner would keep the quotes and store "\"otherFile.js\"" in the JSON as opposed to "otherFile.js" This is fixed by making use of the same code for extracting the .import statements from JS files that is also used by the engine itself. Additionally this fixes the use of comments in .import lines (and other whitespace characters not producing tokens). Change-Id: I4dd4a5217308f6fc93b6b148cd8e13392f97d2a6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for scanning javascript files.Morten Johan Sørvig2014-02-251-17/+77
| | | | | | | | | | | | | | | | | | | Javascript may contain ".import" pragmas/statements, which should be treated in a similar way as qml file imports. Add findQmlImportsInJavascriptFile() which extracts and parses the .import lines. Refactor findQmlImportsInFile() to handle both .qml and .js and call out to the correct parsing function. Add "-jsFiles" for specifying javascript files on the command line similar to "-qmlFiles". Task-number: QTBUG-35349 Change-Id: I6b8e0cc254c1edcf16940bec5cfda7c2637f115e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Improve qmlimportscanner.Morten Johan Sørvig2013-11-121-90/+134
| | | | | | | | | | | | | | | | Fix several qmlimportscanner defects: - Expand qml file search to include subdirectories. This applies to search paths specified with "-rootPath" - Add "-qmlFiles" for specifying the file list directly - Parse files with UTF8 BOMs correctly - Don't set properties where the value is the empty string Change-Id: I81a538d73487b49fb635c18ef4fe479748ba0bfc Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* simplify host_build logic againOswald Buddenhagen2013-10-251-7/+1
| | | | | | | | | | qt_tool handles bootstrapping fully automatically. This reverts commit 0fc040ef70513ccaeb9e96f7ca05a3df4d6c7879, and adds some more. Change-Id: Icffcf7f487dbf660678c7ee622f94b1063fef7e3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove useless CONFIG-=app_bundleOswald Buddenhagen2013-10-251-1/+0
| | | | | | | qt_app.prf does this for us. Change-Id: Ifdbed1028a170f1a5040d9ef38c0adc89ed6da52 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix the QML import search.Morten Johan Sørvig2013-10-141-26/+22
| | | | | | | | Match the algorithm used by QML, look for the most specific version of an import first. Change-Id: Ibf1370af227c8154f657cc2d8a1c1d1ae28d2f39 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Make qmlimportscanner report plugin classnames.Morten Johan Sørvig2013-10-141-11/+23
| | | | | Change-Id: Ifbe72e6dcc569c8cb311d46e4f265da348b353ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* qmlimportscanner: Fix braces.Friedemann Kleint2013-09-281-10/+17
| | | | | Change-Id: I1361bc1f10b04d0001a1d02b45033ca2c82f8105 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* qmlimportscanner: Use iostream for output consistently.Friedemann Kleint2013-09-281-11/+7
| | | | | | | host-built tools should not use <QDebug>. Change-Id: I2c69c79c138689d22f4979e268313fb461a8053a Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* qmlimportcanner: Compile with QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII.Friedemann Kleint2013-09-282-31/+33
| | | | | | | Clean up single character string constants and string usage. Change-Id: I242110d57beeb100155757bda170ade479fcb242 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* qmlimportscanner: Print usage when no arguments are passed.Friedemann Kleint2013-09-251-1/+1
| | | | | Change-Id: I2ba5e18fff635705b1f5e8e19c104ba078c8e3a1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add qmlimportscanner.Morten Johan Sørvig2013-09-232-0/+338
qmlimportscanner scans for import statements in qml files and returns a JSON-formatted list of imports. This is done recursively in order to get all dependencies. Usage: "qmlimportscanner path/to/app/qml/" -importPath path/to/qtbase/qml Change-Id: I0e99caaf4216058c52a4706f7fdbeaf1eba0bbc1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>