aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlplugindump/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* qmlplugindump: avoid generating conflicting types.Marco Benelli2016-01-201-0/+7
| | | | | | | | | | | | | | qmlplugindump used to import QtQuick, therefore skipping all QtQuick types when dumping. Now that it imports only Qt, it is no longer the case, and all QtQuick types would be dumped in the module's qmltypes file. It can be avoided by specifyng 'QtQuick' as dependency in qmldir file or in a json file passed as -dependencies option. It seems however that people are not used to that, so in order to restore the old behavior, the QtQuick dependency is automatically added when the dependency list is empty. Change-Id: I5fb2e57893607a877d284767b3fd09159b45ff42 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* QmlPluginDump: use QFileInfo::exist(f) instead ofAnton Kudryavtsev2016-01-191-2/+2
| | | | | | | ... QFileInfo(f).exists(). It's faster. Change-Id: Id9dd30f5532ed73c487caffcaad3860a6475e832 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* qmlplugindump: Don't try to import Qt.test.qtestrootAlbert Astals Cid2015-12-151-0/+8
| | | | | | | | | | | Qt.test.qtestroot is only provided by quick_test_main so if we find any plugin that tries to inherit from TestCase.qml qmlplugindump will fail trying to import this unexistant import Change-Id: Idee881fa641267a17594dd3c92e929ca3473f3df Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QmlJs: separate dumping of Qt built-ins and QtQml.Marco Benelli2015-11-271-3/+37
| | | | | | | | | | builtins.qmltypes used to contain also definitions that belong to QtQml. This patch makes qmlplugindump dump only Qt built-ins when called with the '-builtin' option, and makes dumping of QtQml work correctly. Change-Id: I123b9cae6f2557cf281f857df51fae095cbc25cc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Proper handling of composite types with different versions.Marco Benelli2015-11-031-9/+17
| | | | | Change-Id: I967da2eb1867f218d47faf8a589d1773e6f57fc7 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>
* Make QML composite types inherit attached propertiesJ-P Nurmi2015-10-091-10/+11
| | | | | | | | Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe Task-number: QTBUG-43581 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* qmlplugindump: Drop '.exe' suffix in commentKai Koehne2015-09-231-1/+1
| | | | | | | | This generates just noise in the diffs. Change-Id: I09d1dbc6d8255a9cf5055abf96eb06ca78a80a94 Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Simon Hausmann2015-09-021-0/+8
|\ | | | | | | Change-Id: Ibc7a47f7ce6d15dff79fdc59f8ded297d1b8d50d
| * Warn if a composite type is not ready and continue.Marco Benelli2015-09-011-0/+8
| | | | | | | | | | Change-Id: Ib28f484188466831e4c64aee0e36a27dd4842b06 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* | Add 28 QList::reserve() callsSérgio Martins2015-06-081-1/+3
|/ | | | | Change-Id: Id4820ac458f48b10f2bf457144767efdef9e2c07 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* qmlplugindump: add dependenciesMarco Benelli2015-04-211-20/+221
| | | | | | Change-Id: I53b2a394ba1f6c8a7a88f7456fba8646cdf35bf4 Task-number: QTBUG-41079 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>
* Fix build on MinGWKonstantin Ritt2014-12-281-1/+3
| | | | | | | | - alloca() needs malloc.h - crtdbg.h couldn't be found on MinGW Change-Id: Ibbf91a58d39ef1e2572baae3c409393acf7aa5df Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* qmlplugindump: Use _CrtSetReportMode() for MSVC only.Friedemann Kleint2014-09-191-2/+2
| | | | | | | | | | | | | | | | | | | Fix warnings when using MinGW: main.cpp: In function 'int main(int, char**)': main.cpp:734:55: warning: statement has no effect [-Wunused-value] _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); ^ main.cpp:735:53: warning: statement has no effect [-Wunused-value] _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG); ^ main.cpp:736:54: warning: statement has no effect [-Wunused-value] _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); where _CrtSetReportMode() is an empty macro. Change-Id: I644bc207b5a3df62d6390811f53b2c0948979d58 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@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>
* qmlplugindumper: do not pop up a window if an assert is triggeredFawzi Mohamed2014-08-011-0/+11
| | | | | | | | | | On windows the debug version of qmlplugindumper used to show a panel on assert failure. Failure should be silent. Done-with: Thomas Hartmann <thomas.hartmann@digia.com> Task-number: QTCREATORBUG-12644 Change-Id: Ib5036754b37cdd5e3820e0cfd60b3ef7df3f1fb6 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Delete objects created by qmlplugindumpDaiwei Li2014-06-301-0/+1
| | | | | | | This helps plugin objects to shut down cleanly Change-Id: I167f63220a35a7428f50715a4cb9072320ef1c87 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* qmlplugindump: correctly merge composite typesFawzi Mohamed2014-04-181-48/+77
| | | | | | | | | | | When hiding part of the hierarchy during the merging of composite types properties/methods/signals that are hidden should not be dumped twice. Task-number: QTBUG-38354 Change-Id: I328cf25dd5a70e1c0fce017e8ae572e8a9e56245 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* qmlplugindump: set isCreatable true in composite typesFawzi Mohamed2014-04-091-3/+2
| | | | | | | | | | | the qmlengine defines isCreatable as "is creatable through the C++ interface", for the qmltypes and qml code model it makes sense to define isCreatable as "can appear as component in QML" Change-Id: Ib26cf25dd5a70e1c03ce017e8ae572e8a9e562c1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* qmlplugindump: adding isCompositeFawzi Mohamed2014-02-261-0/+1
| | | | | | Change-Id: Ia742c26402156b09bc91590cef6a10755a8df754 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* qmlplugindump: adding writeBooleanBinding to write booleansFawzi Mohamed2014-02-251-5/+5
| | | | | | Change-Id: I13077ad0d6522d91af0dab7d7bc30346b188ee4b Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Force QML engine debug output to stderr in qmlplugindumpUlf Hermann2014-02-051-0/+18
| | | | | | | | | | | In this case the debug output is actually meant to be read by the user. Logging it to some system facility, as on BlackBerry doesn't help. To fix that a message handler that redirects all debug output to stderr is installed. Task-number: QTBUG-36378 Change-Id: I16dbca8bc4d07e0aabc2b41ce93b56bd679fa166 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Qmlplugindump error messages are not written consistentlyDaniel Pesch2014-01-231-16/+16
| | | | | | | | | | | | For errors in command line parameters qmplugindump uses cerr but errors during plugin loading are logged using qWarning(). It would be better to log always to cerr in case of problem because some platforms (BB10) have logging from Qt redirected. Task-number: QTBUG-36378 Change-Id: I04506c2f12b87190966e66c482f4ac5aed44af05 Signed-off-by: Daniel Pesch <dpesch@blackberry.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* qmplugindump is not able to dump all registered componentsDaniel Pesch2014-01-211-0/+16
| | | | | | | | | | | | This patch implements a new function QQmlMetaType::qmlAllTypes() used by qmlplugindump that returns list of all registered components. Previous implementation used QQmlMetaType::qmlATypes() call that returned only components with defined QML name. Task-number: QTBUG-36199 Change-Id: I85acba61cfa511973a004934cf0650f38cc46ed9 Signed-off-by: Daniel Pesch <dpesch@blackberry.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* qmlplugindump: New component properties isCreatable and isSingletonDaniel Pesch2014-01-201-13/+33
| | | | | | | | | | | | | Qmlplugindump tool does not generate information about singleton status and creatability from QML for a component. This patch adds two new boolean properties that contain this information. It is used by Momentics IDE for providing better code validation and could be used by QtCreator in future in similar way. Task-number: QTBUG-36139 Change-Id: If85374a1854aaa0727670b27df735d481cab5337 Signed-off-by: Daniel Pesch <dpesch@blackberry.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* qmlplugindump: adding verbose output for the instantiation operationsFawzi Mohamed2013-09-191-2/+18
| | | | | Change-Id: Ic18d85de92f05c01b6ce00b071ef9b94d878434f Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* qmlplugindump: Update the description for the generated fileCaroline Chao2013-09-181-2/+3
| | | | | | | | | | The full command was written in the generated file including the full path to the qmlplugindump tool. Now only the tool name without its full path will be printed with the adjacent arguments. Change-Id: I03aa7350d1cd6b96ce00341796f8944669989793 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* qmlplugindump: Add --defaultplatform argumentCaroline Chao2013-09-181-2/+15
| | | | | | | | | | QT_QPA_PLATFORM is set to minimal by default unless --defaultplatform is set when running the qmlplugindump tool. This is for example useful for the QtQuick.Dialogs module. Change-Id: I1194526ee0641d11802c4db20bd3043aebd1e261 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* qmlplugindump: QMetaMethod signals have public accessCaroline Chao2013-09-181-1/+1
| | | | | | | | | Since 56bbf3c2d5b31142e5a1b872a0118479edcf874b (qtbase) So public signals must be dumped. Change-Id: Ic7047660fbac40f78c7a205e760c059256c71d6f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* qmlplugindump: fix prototypes identification for composite typesCaroline Chao2013-09-171-11/+11
| | | | | | | | | The prototype name for the composite type is the first "default" prototype found in the reachable types. If none is found then the default value is QObject. Change-Id: I40b4fefaab40e4c9f83d24c89bd026579be63e7b Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* qmlplugindump: Add support for composite typesCaroline Chao2013-09-131-54/+139
| | | | | | | Task-number: QTBUG-33106 Change-Id: I80fc817eb59256e860f3fdd591104930688ef84c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Remove qSort usages from declarativeGiuseppe D'Angelo2013-09-131-1/+2
| | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I8fa7d0186cc8f0ba562695974829e37f1eb87f2f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add --noinstantiate to qmlplugindumpAlan Alpert2013-05-291-38/+44
| | | | | | | | | | This flag allows you to run qmlplugindump on plugins which cannot safely create objects, such as plugins with unusual requirements or missing essential dependencies. Change-Id: Ifcc542b8dec5358fc8a76d78a2a272c9cbf5d78a Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* qmlplugindump: add an explicit -relocatable switchFawzi Mohamed2013-04-241-2/+7
| | | | | | | this will enable us to switch the default to nonrelocatable Change-Id: Ic4bff6466ee2fb6d4d1dd89829034ad239422a7e Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Doc: Fix module name formatSze Howe Koh2013-04-231-1/+1
| | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtGui -> Qt GUI QtMultimedia -> Qt Multimedia QtScript -> Qt Script QtSensors -> Qt Sensors QtSvg -> Qt SVG QtWebkit -> Qt WebKit Also fix a broken link to "Qt WebKit QML Types" Change-Id: Ica6081024d3957a3ca2ef3d870f623506c69d877 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qmlplugindump: always output exportMetaObjectRevisionsFawzi Mohamed2013-04-151-6/+2
| | | | | | | | | | Some people were confused about exportMetaObjectRevisions, and the "all 0" as default was not expected. Make it explicit so we might change the default in the future. Change-Id: I1f208ba54e2b9aa1a5d46fb9971572467b69ab56 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* qmlplugindump: don't crash if a composite type was a registeredShawn Rutledge2013-02-181-4/+6
| | | | | | | | This doesn't actually result in putting any information about the composite type into the output, though. Change-Id: I160702578f0acd22eff98e8afa288b3c9fb20076 Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QmlPluginDump: Prevent crash if run without WMKai Koehne2012-11-301-0/+3
| | | | | | | | Make sure that the minimal platform plugin is used by default. Change-Id: I2362649dafaf823b00ab37519b516aef9ac3166b Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* qmlplugindump: Update help outputKai Koehne2012-09-181-1/+1
| | | | | | | | Qt.labs.particles 4.7 doesn't work since ages. Instead use Qt.labs.folderlistmodel 2.0. Change-Id: Ie11133adad88ac6120ab05aef9713f8e768f8bc8 Reviewed-by: Christian Kamm <kamm@incasoftware.de>
* qmlplugindump: Fix handling of implicit signalsKai Koehne2012-09-101-1/+1
| | | | | | | Change I70affc450 added inverted logic. Change-Id: I6cb25d3881a0487545a3eeac289a34fedcc21d8f Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* doc: fix some more typosSergio Ahumada2012-09-101-1/+1
| | | | | Change-Id: I7fa055049b9e5900d597754c6004febb153de12b Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* qmlplugindump: Fix dumping of typesKai Koehne2012-09-071-1/+1
| | | | | | | Dumping broke with commit 70a2c049. Change-Id: Ifbae3dbc3e2d255c1e7f8848c579c04d0bf4b48e Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* qmlplugindump: Take care of 'void' typesKai Koehne2012-09-071-2/+2
| | | | | | | QMetaMethod::typeName() does now return "void" instead of an empty string (change 22d621dd). Change-Id: I70affc450a7dd36b121cbcf580c0ca6fd5944f0b Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* Refactor singleton type registration codeChris Adams2012-08-281-58/+16
| | | | | | | | | | | Previously each singleton type was registered as an implicit separate import. This commit changes the code so that these types are treated just like any other type in the registration sense. It also ensures that singleton types are instantiated per-engine. Change-Id: I5c81c4ca5bf65210f7125d74a62a282a21838068 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Add type name to singleton (module api) implementations.Glenn Watson2012-08-081-19/+22
| | | | | | | | | | | | | This change renames the previous module api implementation to singleton types. When a singleton type is registered, a type name must be provided that is used when accessing the API from QML. This makes the implementation more consistent with the rest of QML. Task-number: QTBUG-26549 Change-Id: Iab0bb1ccf516bd3ae20aee562a64d22976e0aecd Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* qmlplugindump: Add comment to file that it was auto-generatedThomas McGuire2012-07-041-2/+4
| | | | | | | | | This prevents people who do not know about this tool from accidentally changing these files by hand. Change-Id: I8ff889b953f7c637f914f8b5b8b07a36f3cdf58f Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Change uses of {to,from}Ascii to {to,from}Latin1Thiago Macieira2012-05-041-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: I03084595ddc425a988374b8352fd23e9504ffba6 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>