aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Add abstraction for temporarily setting StaticData when savingUlf Hermann2019-05-171-22/+14
| | | | | | | | | The StaticData flag needs to be saved to disk, but removed again afterwards so that we can free() the malloc'd data. This also allows us to avoid copying all the data into a byte array before saving. Change-Id: I96513f8d98acf0ea0b4514d96376b487e8444917 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-162-14/+19
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move compileModule() into qv4codegen.cppUlf Hermann2019-05-081-1/+2
| | | | | | | | | This is a better fit for the method. In turn, remove all the V4_BOOTSTRAP conditions from qv4engine_p.h and make sure we don't include or compile it in bootstrap mode. Change-Id: I5933b0724e561313ca20c420b83e4d70e63bddf5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-021-1/+1
|\ | | | | | | Change-Id: I5d2c3da38df35922b2147c3c0bc55c6c3bae2fe5
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-011-1/+1
| |\ | | | | | | | | | Change-Id: Ic008bf9223a9ac293c925044355ff218f7ed7f78
| | * 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>
* | | qml runtime tool: support alternate conf; add resizeToItem confShawn Rutledge2019-04-256-20/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qmlscene --resize-to-root feature has always been missing from the qml runtime tool; however it was already possible to add it by writing a custom configuration file. Now we support loading different configurations from resources as well as from the filesystem, and the first new configuration being added here is resizeToItem.qml which provides behavior equivalent to qmlscene --resize-to-root. When the argument given to --config ends with .qml, by convention it's to be loaded from the filesystem; whereas configurations from resources are specified without the .qml extension (to make the command line shorter). [ChangeLog][QtQml][qml] The QML Runtime tool now has default behavior matching qmlscene when the root QML object is an Item: it will be wrapped in a Window which will resize the Item when the Window is resized. But you can alternatively use the --config resizeToItem option, resulting in the same behavior as qmlscene --resizeToRoot: resizing the root Item programmatically causes the wrapping Window to be resized. Behavior can still be customized in other ways using the --config option with an external QML configuration file. Task-number: QTBUG-53557 Change-Id: Icdcbbd12258105c33b64634049d735e022dfbd06 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qml runtime tool: --quiet disables categorized logging tooShawn Rutledge2019-04-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQml][qml] The QML Runtime tool --quiet option now disables categorized logging in addition to qDebug, qInfo, qWarning and qFatal, except for some early QPA-level categorized logging that occurs during application construction. You can still override specific categories by setting QT_LOGGING_CONF or QT_LOGGING_RULES. Change-Id: Icf986a7fa9980d07beed308df8f69fcc4da9d771 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qml runtime tool: group globals and declare static; improve paddingShawn Rutledge2019-04-251-43/+29
| | | | | | | | | | | | | | | | | | | | | This fixes a few code model warnings. Change-Id: I0739e19ad5601caa4177f0fd843b1a8d38c936a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Use QCommandLineParser in the qml runtime toolShawn Rutledge2019-04-241-114/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some advantages: - support double-hyphen options as well as the existing single-hyphen options - support translation of the usage text [ChangeLog][QtQml][qml] The QML Runtime tool now accepts command-line arguments in double-dash GNU style as well as the old single-dash style. Task-number: QTBUG-53557 Change-Id: I9929c63841272894640abe254efaea9773eee633 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Move creation and management of singletons to QQmlEnginePrivateRichard Weickelt2019-04-241-3/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Singleton object instances were previously managed by QQmlType::SingletonInstanceInfo and kept in a shared storage. This caused concurrency problems when instantiating singleton instances from different QML engines in different threads. This patch moves the singleton house-keeping infrastructure to QQmlEnginePrivate and makes SingletonInstanceInfo immutable. Singleton objects are stored in a QHash with QQmlType as the key because the qml type id might be 0 for composite singletons. The public API of QQmlType is extended to provide more information about singleton types so that access to SingletonInstanceInfo is not needed. All internal accesses of singleton objects must now take the same code path via QQmlEnginePrivate::singletonInstance<T>() which simplifies overall usage of singletons and scatters less implementation details throughout the code base. Task-number: QTBUG-75007 Change-Id: I13c5fd21cac2eb7291f2cbcf2c2b504f0f51a07c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-199-6/+18
|\| | | | | | | Change-Id: I9ef4be23bfe35aa48d4c65d4159e72c527943845
| * 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>
* | | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3Qt Forward Merge Bot2019-04-151-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/masm/assembler/LinkBuffer.h src/qmltest/doc/src/qtquicktest-index.qdoc tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: I7d83ad95cf489dda794dd7a0a33bad3ef3b05609
| * | 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>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-021-9/+15
|\| | | | | | | Change-Id: I1dd04210f10895c509b5c637fc5e2dcf66e3bb91
| * 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>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-271-1/+0
|\| | | | | | | Change-Id: I2f0b4f8543a448c9acffe0932e0fd67c0b7412f4
| * 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>
* | wasm: skip tools, also with threads enabledMorten Johan Sørvig2019-03-251-1/+1
| | | | | | | | | | | | | | Linking static binaries is (still) very slow. Change-Id: I8abc41553bd22e6ab2e87632c924d53c3429f3c9 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-251-5/+0
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qmltest/quicktest.cpp tests/auto/qml/qmlcachegen/qmlcachegen.pro Change-Id: I70e96e8817d59647f876b8b77b30cdeede8f0662
| * 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>
* | qmlimportscanner: Fix commentsKai Koehne2019-03-211-11/+10
| | | | | | | | | | Change-Id: I435662abafbe7b76fed7b012bfed2f99aa7158a3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-211-6/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4bytecodehandler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4instr_moth.cpp src/qml/compiler/qv4instr_moth_p.h src/qml/jit/qv4baselinejit.cpp src/qml/jit/qv4baselinejit_p.h src/qml/jsruntime/qv4function.cpp src/qml/jsruntime/qv4vme_moth.cpp Change-Id: I8fb4d6f19677bcec0a4593b250f2eda5ae85e3d2
| * 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>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-181-11/+2
|\| | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp Change-Id: I66b7db42bf208855889094ace0267326595ce03c
| * 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>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-132-12/+23
|\| | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/animations/qsequentialanimationgroupjob.cpp Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
| * 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>
* | QtDeclarative: replace deprecated functionsChristian Ehrlicher2019-02-133-3/+3
| | | | | | | | | | | | | | | | | | | | Replace the deprecated functions with it successors: - QFontMetrics::width() -> horizontalAdvance() - QLayout::setMargin() -> setContentsMargins() Change-Id: I2a2557cdb2eaec40e2c9955a0082372c582ec6b8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Tools: Fix deprecation warnings about QProcess::finished(int)Friedemann Kleint2019-02-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use QProcess::finished(int, QProcess::ExitStatus) with QOverload, fixing: qmlpreviewapplication.cpp:151:86: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] connect(m_process.data(), static_cast<void(QProcess::*)(int)>(&QProcess::finished), qmlprofilerapplication.cpp:475:83: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] connect(m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished), Change-Id: I0eb09e398b2a3b307fdd67a3fe505b1bdd1078f8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-291-10/+12
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/masm/yarr/YarrJIT.cpp src/qml/compiler/qv4instr_moth.cpp src/quick/handlers/qquicksinglepointhandler_p.h src/quick/handlers/qquicktaphandler.cpp src/quick/items/context2d/qquickcontext2d.cpp Done-With: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I109453131f9f0a05316ae37c7d6ed1edc8c0f9d4
| * Merge 5.12 into 5.12.1Kari Oikarinen2019-01-082-4/+4
| |\ | | | | | | | | | Change-Id: Ic746fbce93430867e2eda4bc7155d34e20a4aa2b
| * | 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>
* | | qml runtime: Don't assume there is a window, verify itShawn Rutledge2019-01-151-4/+5
| | | | | | | | | | | | | | | Change-Id: I83ea0f679170dfab6f99edb17950e27ca2aedfb1 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | | Clean up LoadWatcher in the Qml RuntimeShawn Rutledge2019-01-151-37/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Name the variables in a self-documenting way. While we're at it, do initialization at declaration when possible, reorder the public sections before the private ones, fix comment spacing, and use function-pointer connect syntax where possible. Change-Id: I3fddc8f6d27afa197d425fb7ae3baee02acedceb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | qmlcachegen: Eliminate foreachUlf Hermann2019-01-042-3/+3
| | | | | | | | | | | | | | | Change-Id: Ic13e5af7ddb92cf5988988ebe1c2b7470a5f8c1e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add option to retain sources when generating QML cacheUlf Hermann2019-01-043-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default any .qrc files are filtered and QML and JS sources dropped when generating the cache. The new QTQUICK_COMPILER_RETAINED_RESOURCES option allows the specification of .qrc files to be kept as they are. The source fils specified in them will be available to the application. Change-Id: If45bcd95c29fe4b91f5817573964ff55b1db8a00 Fixes: QTBUG-72430 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-231-3/+3
|\ \ \ | | |/ | |/| | | | Change-Id: I9c3d282c11a556e616c5e1ba1b51e88b741327f6
| * | 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>
* | | qmlprofiler: Use std::cerr directly rather than through QTextStreamUlf Hermann2018-12-171-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application output already is in the right text encoding. There is no point in re-encoding it. The re-encoding is actually expensive enough to delay the target application in some cases, and that distorts the profiling results. Change-Id: I3a6c47801cba072f6cfff8d0d2c3d10725750d00 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-121-1/+1
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp Change-Id: Ic1dace832ad4b29023d24808b8617b5dcc915eb5
| * | 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>
* | Fix warnings about unused Qt containersSergio Martins2018-11-302-3/+2
| | | | | | | | | | | | | | | | | | | | | | Fixes -Wclazy-unused-non-trivial warnings, in preparation for using gcc/clang's warn_unused attribute in all containers. Maintainers please check if some unused variable isn't hidding an actual bug. Change-Id: I83c5a11aa2328db3dce4c6c402295d86ef297c83 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>