aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Yield error if qtquickcompiler is used in non-QML projects"Jörg Bornemann2019-08-021-10/+0
| | | | | | | | | This reverts commit c5578b16d6454e708c8ce12661a85d41eeaaa758, because it prevents enabling the qtquickcompiler feature globally. Fixes: QTBUG-77277 Change-Id: Ic80835c462570a67ae3105bb3d1b6452800d2c94 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Yield error if qtquickcompiler is used in non-QML projectsJoerg Bornemann2019-07-031-0/+10
| | | | | | | | | | | | | Consider a non-QML project that puts .js files in a Qt resource file. The qtquickcompiler feature will pull those files out of the resource and generate QML-specific code, which will lead to build errors. Yield an error message on qmake-time. Fixes: QTBUG-73669 Change-Id: I6bec22f758d884ce4e1c50fca48f452c5f86ce74 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlplugindump: dump enums also for composite typesUlf Hermann2019-07-011-1/+5
| | | | | | | Change-Id: I2745d3df4fca77483313c70e5433339c444c7fd4 Fixes: QTBUG-76627 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Unregister unit cache hook when destroying the plugin singletonMitch Curtis2019-06-251-1/+6
| | | | | | | | | At the point the plugin is actually unloaded the hook turns into a dangling pointer. Fixes: QTBUG-71387 Change-Id: Ib8ccee3f9a86d4700fbea7e87c666cd8f30f71e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* qmlscene: Fix setting of the default surface formatJoni Poikelin2019-06-251-21/+23
| | | | | | Fixes: QTBUG-76603 Change-Id: I2977117dcaf45345c14599e0b38cb4a242ee449b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Skip QtQuickCompiler resource extraction when using lupdateSimon Hausmann2019-04-291-1/+1
| | | | | | | | | Otherwise lupdate won't see a .qrc file that contains the .qml/.js files. Change-Id: I8b5fd79299adcde338d68fb6ca39ab03c9300286 Fixes: QTBUG-75501 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.12.3' into 5.12Qt Forward Merge Bot2019-04-171-2/+4
|\ | | | | | | Change-Id: Ie2e6a4af1953cb5d7965b95090d369e7433ceb85
| * Fix qmlscene command parsingv5.12.3Thomas Hartmann2019-04-081-2/+4
| | | | | | | | | | | | | | | | If "QMLSCENE_CORE_PROFILE" is set the command line parsing does not work anymore. Change-Id: I75ffa733562708a412d1ae341b24d1f3bb35c034 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Update the QML Runtime iconShawn Rutledge2019-04-178-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new one has been drawn; use it on all platforms, not just on macOS. It is now also used as the default window icon, to be more identifiable when minimized, etc. Of course it can be overridden by plugins that can be loaded from qml. [ChangeLog][QtQml][qml] The QML Runtime tool now has an updated application icon and a default window icon. QtQuick applications can still use QWindow::setIcon() to override the window icon. Task-number: QTBUG-70826 Task-number: QTBUG-74662 Change-Id: I8671d0c99f7f4283dbe2dc4c605abb560f7bf1a1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Add support for selectors to qmlsceneThomas Hartmann2019-04-091-0/+7
|/ | | | | | | | This allows to use qmlscene together with file selectors. Task-number: QDS-589 Change-Id: Icf613c938bfc2c56b33a36ab2da32c3c54b498a2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* add core profile environment variableTim Jenssen2019-04-011-1/+2
| | | | | | | | | | Enables 3druntime scenes at macOS without calling it with extra process arguments. Task-number: QDS-553 Change-Id: I04e59f4f9061eb2a567c65406c5a8195b1896836 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Fix surface format bug for macOSTomi Korpipaa2019-03-291-8/+13
| | | | | | | Task-number: QT3DS-3238 Change-Id: Ie3a675ef32251481abaa460bb89bc1c4381573ea Reviewed-by: Pasi Keränen <pasi.keranen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Enable lookups for imported scripts and worker scriptsSimon Hausmann2019-03-251-1/+0
| | | | | | | | | | | | | This is straight-forward to enable, with the minor adjustment that we need to handle the case where a global lookup is done without a calling qml context (worker script). We don't know at compile time whether a script will be imported directly or used as a worker script, so we have to generate the global qml lookup instruction regardless and handle it at run-time. Change-Id: Ia033afa214d919d906c676498dd3eceb1c5639d8 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Enable lookups in QML files when compiling ahead of timeSimon Hausmann2019-03-221-1/+0
| | | | | | | | This should have been enabled in the series earlier when for QTBUG-69898. Change-Id: Ide7507d5dcf439463c22b631d49d654624737d1f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix memory "leaks" in qmlcachegenSimon Hausmann2019-03-221-4/+0
| | | | | | | | | | | | | The CompilationUnit class owns the unit data. An exception was made in bootstrap builds, where it was up to the caller to free the memory. This lead to cases in qmlcachegen where we didn't free the memory. This is best fixed by unifying the behavior. This fixes the build when using an ASAN enabled build, as the runtime aborts after calling qmlcachegen due to "leaks". Change-Id: I8b55b4e302a9569a1d4e09eeb488c479368b50f0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove dead compile time QML context/scope property and id object codeSimon Hausmann2019-03-201-6/+3
| | | | | | | | | | | After enabling lookups in QML files, we can remove all the code that tries to deal with (type) compile time detection of access to id objects and properties of the scope/context object. This also allows removing quite a bit of run-time code paths and even byte code instructions. Task-number: QTBUG-69898 Change-Id: I7b26d7983393594a3ef56466d3e633f1822b76f4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix up global name determination when compiling ahead of timeSimon Hausmann2019-03-151-11/+2
| | | | | | | | The list of names is still suboptimal, but at least it's shared now. Task-number: QTBUG-69898 Change-Id: I16c9839c4a1f097053b28caea894b67757972826 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix re-dumping of composite typesKai Koehne2019-03-061-2/+13
| | | | | | | | | | | | Just like with 'normal' types, we don't want to include composite types that were actually part of depending imports. So we need to remove them from the list. This fixes an issue with QtQuick.Controls style plugins, were so far types from QtQuick.Controls 2 imports were re-dumped. Change-Id: Ib099ae9cfba35218cab852d4d260369c2a652727 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlplugindump: Make compositeTypes non-staticKai Koehne2019-03-041-12/+11
| | | | | Change-Id: Ia4f35781ed96a347464b5e423bd7446f5a7f6752 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Skip processing qtquickcompiler.prf when parsed by Qt CreatorChristian Kandeler2019-02-271-0/+1
| | | | | | Task-number: QTCREATORBUG-17521 Change-Id: I9f16c3a030ad49a4fa8d9b5baa2eb79f411fab12 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 5.12 into 5.12.1Kari Oikarinen2019-01-082-4/+4
|\ | | | | | | Change-Id: Ic746fbce93430867e2eda4bc7155d34e20a4aa2b
| * qmlscene: Make it explicit that QCA::installTranslator is staticKai Koehne2018-12-141-3/+3
| | | | | | | | | | Change-Id: I1b123981a9dae359c27c96d4b7ae276af1c5e90f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * Add qmllint in android builds as wellJani Heikkinen2018-12-111-1/+1
| | | | | | | | | | | | Fixes: QTBUG-70669 Change-Id: Ie19494bdb785acdf368e14a4cdd7a141967d3248 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | CMake: Don't handle empty resource filesAndy Shaw2018-12-171-10/+12
|/ | | | | | | | [ChangeLog][Qml] Empty resource files will not be passed to Qt Quick Compiler to be handled when using CMake. Change-Id: I1513d29b70d8a4b08a2947f4a97fbd525c5ace8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix Qt Quick Compiler with CMake on WindowsSimon Hausmann2018-11-271-0/+1
| | | | | | | | | | | | | | | | | | We perform a qmake substitution pass on QtQuickCompilerCompiler.cmake.in, which contains code to determine the location of the qmlcachegen tool. The expression set(compiler_path \"$${CMAKE_BIN_DIR}qmlcachegen$$CMAKE_BIN_SUFFIX\") requires that $$CMAKE_BIN_SUFFIX is set correctly, so that it expands to .exe on Windows and we can locate the binary correctly. This is identical to what's done in create_cmake.prf. [ChangeLog][Qml] Fix Qt Quick Compiler with CMake on Windows Task-number: QTBUG-71829 Change-Id: I81a7452b7dc7f01c9114900b9c103122fec07cf6 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* qmlscene: Fix potential invalid memory access to QTranslatorKai Koehne2018-11-231-13/+3
| | | | | | | | Qt assumes that installed QTranslator object should remain valid for the whole lifetime of Qt, so let's create it on the heap. Change-Id: Ia99826a933eefd9952efc6556505c7f52920b483 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* qmlpreview: Use a better file system watcherUlf Hermann2018-11-145-30/+231
| | | | | | | | | | | We need to keep watching files even if they are removed and re-added as editors frequently do when manipulating text files. QFileSystemWatcher cannot do this by itself, and our simplistic timeout-based attempt didn't work work properly either. Fixes: QTBUG-71768 Change-Id: I21e914138179ad8adf07f0196fec8ddcda2cbfca Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* qmlpreview: Fix typoUlf Hermann2018-11-141-1/+1
| | | | | Change-Id: I5b8a674e77f770e4987e03ccf02b5a27c4987e24 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Correctly read files with a \0 in themLars Knoll2018-11-051-1/+2
| | | | | | | | At least one test case uses this, so let's make sure we read them correctly. Change-Id: I9f4ea7785b5a400cd6f0b210a6a98975bbbaf7ce Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clone ContextType::Global as ContextType::ScriptImportedByQMLJüri Valdmann2018-11-011-1/+1
| | | | | | | | | | Add new enum value QV4::Compiler::ContextType::ScriptImportedByQML, which behaves exactly the same as ContextType::Global. A follow-up patch will change the behavior slightly. Task-number: QTBUG-69408 Change-Id: I20d27804fd1433f2229704546bcd78a0ac108c01 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12.0Liang Qi2018-10-301-25/+0
|\ | | | | | | | | | | | | | | | | Conflicts: src/imports/settings/qqmlsettings.cpp src/quick/items/qquickwindow.cpp tools/qmlplugindump/main.cpp Change-Id: I3e5dae4de25b2da961a572b3a4bd151181d211c9
| * qmlplugindump: Remove sigsegv handlerKai Koehne2018-10-111-25/+0
| | | | | | | | | | | | | | | | | | | | It's not safe to use printf and memory allocations in a signal handler. Task-number: QTBUG-70460 Change-Id: I2a4caf302e17992471575bd89faa505a8db4a7e3 Reviewed-by: Marco Benelli <marco.benelli@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qmlplugindump: Properly handle extension typesKai Koehne2018-10-091-78/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extension classes do augment the primary C++ class with additional properties that should be part of the QML type. Anyhow, they should not be visible in the API. The old logic tried to emulate this by making the extension class the actual C++ type, and 'inheriting' from the normal class by setting it in the prototype. Anyhow, this failed for e.g. Qt3D, where there are numerous types sharing the same extension class. Instead, this patch fixes the issue a) hiding the extension class metainformation itself, and b) printing properties of the extension class as part of the main type. In the QMetaObject collection phase, we now traverse the class hierarchy using QQmlType::baseMetaObject instead of QQmlType::metaObject. In the generation phase, we explicitly resolve the extended type, and dump additional properties and "DefaultProperty" information into the main type description. Note that the ExtendedType sets the DefaultProperty independent of the version. Changing this would require either revisioning the defaultProperty, or (again) splitting up the types, which however brings other problems. Task-number: QTBUG-70294 Change-Id: I324469152398a605fae9e5a35b619845444ac4e8 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | qmlplugindump: Fix calling of qmlimportscanner on WindowsKai Koehne2018-10-091-2/+4
| | | | | | | | | | Change-Id: I16618f0858b3fa878b4255147291c011efdacfc8 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | Fix long file name generated for certain qmlcache.qrcJarkko Koivikko2018-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling qtvirtualkeyboard with MSVC, it may choke on the long file name generated for certain *_qmlcache.qrc files. Specifically, these files are originally generated by qmake, therefore reside in the build directory. For example, this happens when compiling qtvirtualkeyboard out-of-tree using shadow build (e.g. in Qt Creator): qrc____build_qtvirtualkeyboard_Desktop_Qt_5_12_0_MSVC2017_x86_64_Debug_src_virtualkeyboard_.rcc_release_qmake_virtualkeyboard_layouts_qmlcache.cpp c1xx: fatal error C1083: Cannot open source file: '.rcc\release\qrc____build_qtvirtualkeyboard_Desktop_Qt_5_12_0_MSVC2017_x86_64_Debug_src_virtualkeyboard_.rcc_release_qmake_virtualkeyboard_layouts_qmlcache.cpp': No such file or directory This change changes the base directory to $$OUT_PWD for paths which point outside the source directory. Change-Id: I9733af98d916a60ca1ab02cd49ab67024f1db086 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | qmlplugindump: Mark qsigSegvHandler with Q_NORETURNKai Koehne2018-09-241-1/+1
| | | | | | | | | | Change-Id: I4b25bbe4f777f524762e6f3f15df9fc358a46da6 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | qmlplugindump: Add spaces to stderr outputKai Koehne2018-09-241-3/+3
| | | | | | | | | | Change-Id: Ib24b06a3c5dcdf99306fd4ecdf79e1846e492c9b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | qmlplugindump: Remove path for -dependencies argumentKai Koehne2018-09-061-1/+5
| | | | | | | | | | | | | | | | | | | | Do not print the full path passed to -dependencies in the file header. This avoids local paths to show up in the plugin.qmltypes file, and therefore in the Qt checkout. Task-number: QTBUG-70264 Change-Id: I7870d7d4e30e57684c62f4e353a6bf6d72dc5faf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Make QtDeclarative work for the no-thread configMorten Johan Sørvig2018-09-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Force use of the basic render loop, adapt qqmlthread and qqmltypeloader to work on a single thread. Disable components and features that require worker threads: qmldb_server, worker script, shapes, folderlistmodel, threaded render loop, software renderer. Done-with: Lorn Potter <lorn.potter@gmail.com> Change-Id: I77d965947f684f8b7d19284b5decd893395316cb Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | WebAssembly for QtDeclarativeMorten Johan Sørvig2018-09-051-1/+1
| | | | | | | | | | | | | | | | This is the squashed diff from wip/webassembly to 5.12. Done-with: Lorn Potter <lorn.potter@gmail.com> Change-Id: Ieef34accefef38018a66d3c39bfacb825af4bea6 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | qmlplugindump: Automatically use most up to date QtQuick versionKai Koehne2018-08-301-2/+2
| | | | | | | | | | | | | | | | QtQuick / QML minor version is nowadays the same as the Qt minor version. Change-Id: I4d7ef0b101320ee2179746c95093b62e063adba2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for compiling ES modules ahead of timeSimon Hausmann2018-08-175-77/+86
| | | | | | | | | | | | | | | | | | | | | | | | This is also pretty straight-forward by adding .mjs as supported extension in the qmake and cmake support. This also tweaks qv4engine.cpp to share the same module compilation function across all code paths. Change-Id: Ia0e23c78a794f2330ecf8f991ee6ea948f4ac89d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add initial basic support for ES6 modulesSimon Hausmann2018-08-091-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The entry point from the parsing perspective into modules is not QV4::Script but QV4::ExecutionEngine::compileModule. For convenience, the ESModule AST node gets a body, which is the statement list connected between the ModuleItemList items that are not import/export declarations. The QV4::Module allocates a call context where the exported variables are stored as named locals. This will also become the module namespace object. The imports in turn is an array of value pointers that point into the locals array of the context of the imported modules. The default module loading in ExecutionEngine assumes the accessibility of module urls via QFile (so local file system or resource). This is what qmljs also uses and QJSEngine as well via public API in the future. The test runner compiles the modules manually and injects them, because they need to be compiled together with the test harness code. The QML type loader will the mechanism for injection in the future for module imports from .qml files. Change-Id: I93be9cfe54c651fdbd08c5e1d22d58f47284e54f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Clean up internal QML unit creation APISimon Hausmann2018-07-311-12/+12
| | | | | | | | | | | | | | | | | | Since the callers always end up assigning the returned unit pointer back to the compilation unit's data member, we might as well do that inside the function and return void instead. Change-Id: I7a7f3e7a0c89ffe2f9474149fcf61736609b363d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix import of precompiled .js filesSimon Hausmann2018-07-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | Loading those must not fail the file relocation test, so set the source file names to empty, as we also do for .qml files. Also added tests for all the scenarios: no embedded file paths for AOT files but absolute paths for run-time created cache files. Change-Id: I3fc92e89cfd0da512afeac22bd0da3e915ec46ea Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Encapsulate the unit data in CompilationUnitSimon Hausmann2018-07-311-3/+3
| | | | | | | | | | | | | | | | This allows updating the constants table when the unit data is set / changes and removes the tie to the engine. Change-Id: Ice553650390589e30e18421c4e55422a55d0df89 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Use QTranslator::install(QLocale, ...) everywhereKai Koehne2018-07-182-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTranslator::install(QLocale, ...) indirectly uses QLocale::uiLanguages(), which is the correct way to ask the system for ui languages. This was already attempted once in commit 427646b8d7, but reverted later on in commit 05d8ffb4df, because it requires shipping .qm files for the native language. Anyhow, we're shipping empty Qt translations for English since a while, and also have been fixing our examples to do so. [ChangeLog][Important Behavior Changes] The automatic translation loading in qml, qmlscene and QQmlApplicationEngine now tries to load translations for all languages in QLocale::uiLanguages(). This might require shipping an empty translation for the source language. Task-number: QTBUG-7329 Task-number: QTBUG-41977 Task-number: QTBUG-69196 Change-Id: Ifcf45b453ee9d05c018f379cc01e192d1b0a3f56 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-161-21/+28
|\| | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickloader.cpp tests/auto/quick/qquickanimations/tst_qquickanimations.cpp Change-Id: I0cb9f637d24ccd0ecfb50c455cc210119f744b02
| * qmlimportscanner: add some literal strings definitionsMarco Benelli2018-07-121-9/+12
| | | | | | | | | | Change-Id: Ie65e7541b5a189867b27471b83e52dc2e4416183 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Use anonymous namespace instead of static declarationsMarco Benelli2018-07-121-11/+15
| | | | | | | | | | Change-Id: Iced889303616fdae0074149a3f10572425275085 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>