aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* qml: obey QT_NO_REGULAREXPRESSION definePasi Petäjäjärvi2014-11-111-1/+4
| | | | | | | | Not all platforms do have QRegularExpression as it is based on pcre. Change-Id: I3247f8b2213f78a6e537f6781d97b0c6382482ad Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qmlscene: Simplify context sharing logic.Pierre Rossi2014-11-071-9/+3
| | | | | | | We can use the new application attribute for this now. Change-Id: Ia0a6d13d36316ec9becfb5d3251b8461ac73a2d0 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Don't use qDebug and qWarning for formatted outputThiago Macieira2014-10-311-37/+38
| | | | | | | | | | | | | | | | | | | | They are not meant to be used like that. If you want formatted output to the console, use stdio.h functions or std::cout. Otherwise, you get something like: $ qmlscene -h [233103.196] (126848)(usage|?qmlscene?|__libc_start_main|?qmlscene?): Usage: qmlscene [options] <filename> [233103.197] (126848)(usage|?qmlscene?|__libc_start_main|?qmlscene?): [233103.197] (126848)(usage|?qmlscene?|__libc_start_main|?qmlscene?): Options: [233103.198] (126848)(usage|?qmlscene?|__libc_start_main|?qmlscene?): --maximized ............................... Run maximized [...] I've replaced all qDebug with puts/printf and most qWarning with fprintf to stderr. In my opinion, some of the qWarnings aren't errors, so I replaced those with puts/printf too. Change-Id: I3e493950bc4a588059fec6c7441b010c2780dffd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Revert: use the new form of QTranslator::load() for more flexibilityShawn Rutledge2014-10-282-10/+10
| | | | | | | | | | | | | | | | | | | This reverts commit 427646b8d7c52e5b84240e07ffd391217ce3bfa8. It seems that it should have been more correct, but we are still not shipping English translations, and static QString find_translation() in qtranslator.cpp will return any language which is in QLocale::uiLanguages() for which the translation file is found. That is a long list on OSX. Reverting the patch means find_translation() is not called in such cases. This change can be re-done whenever we are more sure that the attempt to find a translation will succeed in finding a sensible one, or fall back to not translating, rather than choosing a language that the user didn't intend. Task-number: QTBUG-41977 Change-Id: I425946cc71cec96b4f38629eb2b7e80220c5236d Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* use the new form of QTranslator::load() for more flexibilityShawn Rutledge2014-10-012-10/+10
| | | | | | | | | | | | | | As the docs explain, the variant of QTranslator::load() taking a const QLocale& is better because it "uses QLocale::uiLanguages() and not simply the locale name, which refers to the formatting of dates and numbers and not necessarily the UI language." And, using a default-constructed QLocale permits QLocale::setDefault() to override the system locale, so for example an application's main.cpp can do that before constructing a QQmlApplicationEngine. Task-number: QTBUG-7329 Change-Id: Ia29a4c894087c92b071c0fe484728866f2660fe6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.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>
* 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>
* qmlscene: load master translation file before more specific onesShawn Rutledge2014-09-041-7/+3
| | | | | | | | | | It was giving up too early because qmlscene_??.qm doesn't exist. The file qt_??.qm links to all existing Qt-provided translation files, so it is enough by itself unless there are application-specific translations besides. Change-Id: Iebedf54ddb4eef4f4d7da8a7fade1850a366aee8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2537-700/+404
| | | | | | | | | - 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>
* Write memory events into tracefiles generated by qmlprofilerUlf Hermann2014-08-125-0/+35
| | | | | Change-Id: Ic01505194f29967ed1aad16fe36e14dc5532ae25 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch '5.3' into devGunnar Sletta2014-08-071-0/+12
|\ | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcontext2d.cpp src/quick/items/context2d/qquickcontext2dtexture.cpp Change-Id: I1a9b911b3a92333a5dddbaf43275f71bad2006f0
| * 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>
* | Introducing qmllint tool.Sérgio Martins2014-08-053-1/+122
| | | | | | | | | | | | | | | | | | | | | | | | A command line program that returns 0 if a .qml file is syntactically correct. Ideal to integrate into continuous integration systems. [ChangeLog][QtQml] Added QML linter tool. Change-Id: Id420159298e9d2390acd870fee9cf1c3d08e2dec Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Use the renamed qt_gl_global_share_contextJocelyn Turcotte2014-08-051-1/+1
| | | | | | | | | | Change-Id: I438c33a1dc83fd0cd1ec08bb4e4a1257a3216ca2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Rename main.cpp to qmljs.cpp.Erik Verbruggen2014-07-232-1/+1
| | | | | | | | | | | | | | | | Finding the one "right" main.cpp (when there are 90 of them) is hard. So give at least this important one a good name. Change-Id: I121f8cbd67bfa9e8ba9ccac384eed45eb46f0b75 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix Managed::as<>() methodLars Knoll2014-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The as<> casting method was not doing the right thing in 100% of the cases. It only checked if the object in question was exactly of the type being asked for. It however didn't check if the object was derived from the type. This commit fixes this by adding a parent chain to the vtables, that is then being used to check this safely at runtime. Change-Id: I9e0b13adbda668aee8c7451e2bb71cd6d4e316d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Change the object allocation schemeSimon Hausmann2014-07-221-2/+2
| | | | | | | | | | | | | | | | | | Instead of allocating the data directly, centralize the object and its ::Data allocation in one place in the memory manager. This is in preparation for additional pointer indirection later. Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Convert remaining FunctionObject's to new constructor schemeLars Knoll2014-07-221-10/+17
| | | | | | | | | | Change-Id: I440d5b128d0ee28566ebfa82c2505a4bd97bba6b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of StringRefLars Knoll2014-07-221-3/+3
| | | | | | | | | | | | | | | | Remove the Ref classes, as they won't be required anymore once Managed and Managed::Data are separated. Change-Id: Ic6bec2d5b4ecf2595ce129dbb45bbf6a385138a5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Convert ExecutionContext to new storage schemeLars Knoll2014-07-221-3/+3
| | | | | | | | | | Change-Id: I9fcc13da5360f37cef3149b114ed9263b9b74281 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of different macros for vtable specializationsLars Knoll2014-07-221-2/+2
| | | | | | | | | | | | | | Detect existence of a a vtable entry at compile time. Change-Id: Ieed5d34b063184bc4435b22c6685ac0e3fabf493 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Avoid calling destroy() on most objectsLars Knoll2014-07-221-2/+2
| | | | | | | | | | | | | | | | | | The method is now optional, and we can simply avoid calling it if all members an object has are themselves garbage collected. Change-Id: If560fce051908bcc10409ead1a7d8a5bd5fa71d2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Tools and examples: consistently use organization name QtProjectShawn Rutledge2014-07-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This affects the location of the QSettings files or registry entries. Other parts of Qt are using this organization name so it's good to have all the settings in the same place. [ChangeLog][QtQuick] tools and examples consistently use the QtProject organization name Change-Id: I1fae4eaed0248411fe95dda9572d38006648b162 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Javascript heap profilerUlf Hermann2014-06-061-1/+2
| | | | | | | | | | | | | | | | | | This profiler tracks every memory allocation and deallocation, by the MemoryManager as well as the V4 VM, and exposes them as a stream of events to the profiler service. Change-Id: I85297d498f0a7eb55df5d7829c4b7307de980519 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Properly support all events in trace files and clean up a bit.Ulf Hermann2014-06-065-69/+236
| | | | | | | | | | | | | | | | | | In particular, use both message and range type to identify events so that we can get rid of the messy type aliasing. Task-number: QTBUG-36953 Change-Id: I691a7501aa285f78f7ce5b7017ef50628f44fcf7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-06-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | The merge conflict is about the removal of "d1" from the register set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b was reverted to what it was before, per Laszlo's advice. Conflicts: src/qml/jit/qv4isel_masm.cpp Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
| * Disable qmlscene and qmlplugindump when doing static buildsSimon Hausmann2014-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | Both of these tools rely on the ability to load plugins in order to function. QmlScene in particular can theoretically be used with just "QtQml" imports and QObjects, but that's not very useful for the _scene_ type of applications qmlscene is intended for ;-). And in a static build it can't load QtQuick. Task-number: QTBUG-39003 Change-Id: I0d4328dc4eb5c4e3153668e65a12f8eb3757f660 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-2/+2
|\| | | | | | | Change-Id: I24827851643247b938b3a1b7182864293e5c3fe7
| * Fix some typos in usage string.Jeff Tranter2014-05-091-2/+2
| | | | | | | | | | | | | | | | Fix some spelling errors in the command usage string. Change-Id: Iee94987d0a3dff78e39f588b4c21415ed40a514c Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-1012-118/+160
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
| * qmlplugindump: Fix platform plugin specification.Friedemann Kleint2014-05-051-1/+3
| | | | | | | | | | | | | | | | Fix warning: Project WARNING: CONFIG+=qpa_minimal_plugin is deprecated. Use QTPLUGIN.platforms=qminimal instead. Change-Id: I81f92f86bd699854253b4e3fb7d0ae6eeab4aafc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
| * 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>
| * Use global context sharing from QtGui instead of QSGContextJocelyn Turcotte2014-04-041-2/+2
| | | | | | | | | | | | | | | | | | This removes QSGContext::sharedOpenGLContext and replace its uses with QOpenGLContextPrivate::globalShareContext, which is also going to be used by QOpenGLWidget and QQuickWidget. Change-Id: I1e296c3e6832f717caaf31ba7d7b27c06249219b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Enable GL context sharing for QtQuick windows by defaultSimon Hausmann2014-03-292-1/+16
| | | | | | | | | | | | | | | | | | | | | | This is required for running QWebEngine inside qmlscene. It can be disabled with --disable-context-sharing and it remains off in QtQuick. Instead apps have to use QWebEngine API to enable this, where this patch here is merely convenience. Change-Id: I123893a7c8c644c49c66fe2b42d2b7b2e03622d9 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Cleanup: Remove last traces of QQmlScriptSimon Hausmann2014-03-191-1/+2
| | | | | | | | | | | | | | | | | | | | What remains is the code for removing .pragma from script source code (and replacing it with white-space to preserve line/column numbers). The previous code even returned the value of the pragmas, but for the remaining caller sites that value isn't used, so we can just return void. Change-Id: I16db15da236970660b817d6c4493005365a7a1af Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Save painting events in Qt5 style with thread ID from qmlprofilerUlf Hermann2014-03-185-22/+24
| | | | | | | | | | | | | | | | This is necessary to support https://codereview.qt-project.org/80391 and to make the trace files consistent with Qt Creator's. Change-Id: I45490c33ae9bd8fbbb6bace08bdc2f44c76bf966 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Fix crash in qml/qmlscene when using dummy-data with importsErik Larsson2014-03-132-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the tools qml and qmlscene with dummy-data it will crash or behave wrong, due to the dummy-data component will get the state not ready, if the dummy-data qml-files does an import of another folder or a js-file. By changing the way of loading dummy-data, by letting QQmlComponent handle the file opening instead of using the setData() method, qmlscene and qml will be able to handle this type of dummy-data. The tool qml also needed to load the dummy data before loading the regular components, otherwise the dummy-data would not be ready for the other components to use. Task-number: QTBUG-32721 Change-Id: Ia1cc2b2626187e23c7d7313be788202d91b12471 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Build/install the qmleasing tool to bindirJ-P Nurmi2014-03-271-1/+2
|/ | | | | Change-Id: Icc65ecf8ec7e2ef19d4181788706a23b186ead14 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Remove several uses of module includesAndrew Knight2014-03-104-3/+8
| | | | | | | | | | Module includes are discouraged because they may increase compilation time. While debugging a broken core module include header, a number of module include infractions were discovered in qtdeclarative. Replace them with their more specific counterparts. Change-Id: I614e9a6aa2177f396e5289f3cdb3c35faa0202c9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Remove old compiler and VMESimon Hausmann2014-03-071-24/+0
| | | | | | | | | | | | This removes the bulk of the code. A few smaller cleanups remain, to be done in smaller changes as they move code around. Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData, which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not do anything and the class is gone now :) Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5 Reviewed-by: Lars Knoll <lars.knoll@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>
* 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>
* qmlplugindump: adding writeBooleanBinding to write booleansFawzi Mohamed2014-02-253-17/+11
| | | | | | Change-Id: I13077ad0d6522d91af0dab7d7bc30346b188ee4b Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Clean up our internal namespacesLars Knoll2014-02-231-3/+3
| | | | | | | | QQmlJS::MASM -> QV4::JIT QQmlJS::V4IR -> QV4::IR Change-Id: I707e8990459114a699c200fe3c22cec3c8df1afc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* iOS build fix for qmlplugindumpSimon Hausmann2014-02-161-1/+1
| | | | | | | | | Do the docker startup thing only for Mac OS X, i.e. using the macx scope in the .pro file, not mac. Change-Id: I06266ace2ae0f8a3685b26983a7b2cd5815e3e99 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>