aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/dev' into HEADLars Knoll2017-10-22202-1016/+1649
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4isel_moth_p.h src/qml/compiler/qv4ssa.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm_p.h src/qml/jit/qv4regalloc.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexp.cpp src/qml/jsruntime/qv4regexp_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp tests/auto/qml/qml.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp Change-Id: I1577e195c736f3414089036b957a01cb91a3ca23
| * Replace Q_NULLPTR with nullptrKevin Funk2017-09-2743-138/+138
| | | | | | | | | | Change-Id: I0c01862dbb475494c84e39c695cb563df8cbcfa8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Replace Q_DECL_FINAL with finalKevin Funk2017-09-255-13/+13
| | | | | | | | | | Change-Id: I4268b15226b9b597a4a2486a094701db17aa1440 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Disambiguate QQuickStateActionEvent::overrideKevin Funk2017-09-255-9/+9
| | | | | | | | | | | | | | | | | | | | Don't use override as function name, may create confusion with the official override specifier since C++11 Rename method to QQuickStateActionEvent::mayOverride Change-Id: I1f34ec1127cc3e7c529b7e0aa3272fbfed553fa1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-25110-538/+538
| | | | | | | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-2268-379/+992
| |\ | | | | | | | | | Change-Id: I3878bbf2ac7b62651215938c98ead7171be49c74
| | * Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2017-09-2054-279/+525
| | |\ | | | | | | | | | | | | refs/staging/5.10
| | | * Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-09-2054-279/+525
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
| | | | * Fix qmlClearTypeRegistrations() not dropping all registrationsSimon Hausmann2017-09-192-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 48c09a85ce397979c7e706e3694c879ffe456e09 we added the undeletableTypes container to hold a reference on C++ registered types to keep the indices returned by the public qmlRegisterType() API stable. Since qmlClearTypeRegistrations() is API that also resets those indices, we must also clear the undeletableTypes container to avoid leaking memory. Change-Id: I2038c00913f894d58aca3714d64d497493585326 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Fix compilation with -no-openglMichal Klocek2017-09-182-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I91aab9d78ff4dced55cb118ea8f88994bd1d2c20 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Fall back to the ObjectWrapper for model advanceIteratorAndy Shaw2017-09-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When falling back to the QObjectWrapper it will add in the extra parts added when the roles were added to the object created by the model to hold the data being returned. This was causing the last entry to be duplicated and causing extra work too. Task-number: QTBUG-54285 Task-number: QTBUG-62156 Change-Id: I2907477277df8d16db4491a4999f004433e4205c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Fix use-after-free when removing elements from a ListModelErik Verbruggen2017-09-143-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detaching delegate instances from model items is done after the destruction of said model items. The problem is that after the model item is destroyed, it will emit a change/destroyed signal. As the delegate is still referencing the item, this will result in a use-after-free. To provent that, the items are kept around until after everyone (notably the delegate model) has been notified of the removal. [ChangeLog][Qt][Qml] Fix possible use-after-free when removing items from a ListModel through JavaScript. Task-number: QTBUG-59256 Change-Id: Iee182e2cf0b50d3dda2181fed95e38f1a60f22a9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * QQuickTextEdit: call implicitWidth() even if requireImplicitWidth is trueTim Jenssen2017-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before once requireImplicitWidth was set to true by requesting the implicit width, the implicit (and width) was never updated again, even if the text was updated/changed. Adding also a test Task-number: QTBUG-63153 Change-Id: Ie3bac4baeb14c2e69acc43d11a351ac91d5400da Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
| | | | * Add NOTIFY signal for QQuickAnimatedImage::frameCountPal Toth2017-09-133-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-62913 Change-Id: Ib561e0ab6582c1df41ae1c75ba304377c00d63f0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Fix qml cache invalidation when changing dependent C++ registered QML singletonsSimon Hausmann2017-09-123-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a qml file uses a qml singleton, we need to reliably detect when the singleton changes and re-generate the cache of the qml file using it. This is a scenario covered and fixed by commit 5b94de09cc738837d1539e28b3c0dccd17c18d29, with the exception that currently QML singletons registered via qmlRegisterSingleton were not added to the list of dependent singletons for a qml file. We can fix this by extending findCompositeSingletons() to also cover the singletons that do not originate from a qmldir file. [ChangeLog][Qt][Qml] Fixed bug where sometimes changes to a qml singleton would not propagate to the users or cause crashes. Task-number: QTBUG-62243 Change-Id: I16c3d9ba65fd82e898a29b946c341907751135a9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Fix Integrity buildSimon Hausmann2017-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disambiguate the QV4::Value parameter. Task-number: QTBUG-63135 Change-Id: Iae6bd209876336d58256aa94f89d146cadc62f08 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Add missing math.h include for math functionsJake Petroules2017-09-122-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some platforms, math functions in the std namespace don't work even if cmath is included. Change-Id: Ia71d22b07f508e0584de5320f376fbf4b3a2887b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * Update the expected size of QV4::CompiledData::UnitJ-P Nurmi2017-09-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ebda8170a removed a member. Thanks to the padding, the size of the structure remained the same on 64-bit, but not on 32-bit. Removing the padding gives now the same size on both. Task-number: QTBUG-63109 Change-Id: If87ad21a1c94e63643b0cd52f95e244364f6e73d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Fix compilation with clang 4 on LinuxLars Knoll2017-09-111-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3f978d9638ce3f47dff0adfb5fccdc0b4816a690 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Drain the mark stack while collecting rootsLars Knoll2017-09-101-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids overflows in the markStack for test cases where we have a huge amount of compilation units with many runtime strings that all want to get marked. Task-number: QTBUG-63063 Change-Id: I150c1f1a4065350cec59dd80c5c628920f70e3d0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Fix issue with programmatic flicking at boundsMichael Brasser2017-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the same flick consistently produces the same results, by making sure we don't use old timestamps from previous flicks. Task-number: QTBUG-62939 Change-Id: Ie738076abba66d38ff505292925e9441c38a3c95 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Fix reuse of regexp objects by regexp literalsAllan Sandfeld Jensen2017-09-0810-39/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accoding to the standard the regexp objects created by literals should be separate objects as if calling new. We were violating that by caching the same object for every instance of a literal. This also fixes a problem with leaking values of lastIndex between separate instances of the same global regexp literal. Task-number: QTBUG-62175 Change-Id: Ib22e9ee68de1d1209fbd4212e72f576bc059d245 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Remove temporary allocations during type cleanupSimon Hausmann2017-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a follow-up commit to 48c09a85, avoid the use of key() to create a temporary string when cleaning the QML type registry. There is strictly speaking no need to perform another hash lookup anyway. Change-Id: Ibd5f0210d5584d1f847d8ec61f25cb0972076365 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Get rid of the root object index variableSimon Hausmann2017-09-0811-43/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to the parent commit to remove the variable that is really a constant (zero). Change-Id: I8fc20027c5c7b871269b814cb8b93636e94be267 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Fix crash with loading cache files originating from top-level componentsSimon Hausmann2017-09-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a .qml file starts with Component {} and its item(s) define their own properties, alias, etc. then loading this file initially would work, but loading it from a cache file would crash with dangling pointers in the property cache. This was due to us registering aliases, properties, etc. twice in the property cache, exceeding the reservation in the property cache vectors. The minimal fix is to skip the root object in the property cache creating loop as we do handle it separately afterwards. It needs to be separate because the first object index within the component does not stem from a binding. However as the root object index is always zero, I'll make a follow-up patch to get rid of of the variable. Task-number: QTBUG-62263 Change-Id: I86b76d38cb490750a561eac2b0ad6fff6ef2e20a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Fix crash with dangling context object pointersSimon Hausmann2017-09-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression introduced by commit e22b624d9ab1f36021adb9cdbfa9b37054282bb8, where the object that owns the QML context would destroy the context upon struction. Now the context may live longer and thus the context->contextObject pointer would become a dangling pointer. Task-number: QTBUG-63078 Change-Id: I8fdab4086b0472d5d4930cf57aa76922b7ed9e2e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Settings: document how to have several categoriesMitch Curtis2017-09-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0f27a162936015e2aeb9d52079a65b218498b50a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | | | * Fix crashes in QML apps when upgrading Qt snapshotsSimon Hausmann2017-09-072-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When upgrading from one Qt snapshot to another, we may not end up bumping the Qt version. However we do need to re-generate QML cache files. Therefore let's encode the commit hash of declarative in the checksums. Task-number: QTBUG-62302 Change-Id: Ia597fcbe05ea2d32664da2572a1b35c624490095 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | | | * QQmlPropertyValidator::validateObject(): remove unused codeJ-P Nurmi2017-09-071-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was moved to QQmlDeferredBindingScanner in f27d058. Change-Id: I8cf261c497ec433a14e00e17b67a284b45cf8d75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * add qt.quick.canvas logging category, show size change due to DPRShawn Rutledge2017-09-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly as a way of verifying the fix for QTBUG-37095, so far. But of course other log messages can be added to this category later. Task-number: QTBUG-37095 Change-Id: I57930e9376529b6eacca1b554d31382d41582fda Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * Canvas: Repaint on devicePixelRatio ChangeMorten Johan Sørvig2017-09-072-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle moving between high- and normal-DPI displays. The texture gets a setCanvasWindow() call on screen change. Read window->effectiveDevicePixelRatio() here and set m_canvasWindowChanged on change to trigger a repaint if there was a change. Task-number: QTBUG-37095 Change-Id: I96ff07bd7334269cad219eb0a9056c62e850aac7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * QQuickDragAttached: make hotSpot work with imageSourceOleg Yadrov2017-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends patch 4b982c744f538a24e21a2af146c45f93d27dd1cb. Previously, setting hotSpot had no effect on the image position because QDrag object used for the drag is created in startDrag(), and the hotspot was never updated before drag->exec(...). Task-number: QTBUG-61980 Change-Id: I9c11c456d3b32b5986cf287b2610437e3825d9d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Disable deferring when referenced as a grouped propertyJ-P Nurmi2017-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to fix QTBUG-50992 - the issue with most votes in QQC2. Task-number: QTBUG-63036 Change-Id: I996cd1128582b80e0c8480ae143d682c1e8eb8fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| | | | * Fix crashes with closures created in QML componentsLars Knoll2017-09-0613-106/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When closures created inside QML components are called after the surrounding component (and consequently QML context) has been destroyed, we are in a somewhat limited environment. Initially we would just crash as the calling QML context is not valid anymore. We can alleviate that by introducing reference counting on the context and letting the QML context wrapper keep a strong reference. This avoids the crashes and also ensures that at least imports continue to be accessible within these contexts (as the singleton test case demonstrates). Task-number: QTBUG-61781 Change-Id: I893f171842d01b0863d95a02ea738adc2620e236 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Qml Tooling: Replace bare pointers with QScopedPointerUlf Hermann2017-09-064-27/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we don't have to manually initialize and delete them. Change-Id: I0104c744dba380e957271d0924498e3643856e9e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Fix QtQml crashing with GHS compiler when using AOTSimon Hausmann2017-09-051-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support compilers that do not support the packing attribute, replace the use of the pack macros with static assertions about the structure size, to ensure that what is generated by host tools (qmlcachegen, qqc) is compatible with what's loaded by the target at run-time. This requires padding and re-ordering some structures. Task-number: QTBUG-61468 Change-Id: I3d82457f086a9b066d1c6df4c46d9f154dd5f208 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Change mirror vertical for software QSGLayers to trueAllan Sandfeld Jensen2017-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the default for OpenGL and D3D12 QSGLayer implementations, and means that code using QSGLayer can end up rendering upside down if switched the software backend. Task-number: QTBUG-62929 Change-Id: Ib34b10c4eb834d2ef52e9005866242886b3addeb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * QmlProfiler: Avoid race conditions in QQmlTypeLoaderUlf Hermann2017-09-055-16/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to make sure all profiler calls to one adapter are done from the same thread. It turns out that all the calls from QQmlTypeLoader are done from the type loader thread. By using a separate adapter for that, we avoid any extra locking. Task-number: QTBUG-62987 Change-Id: I5cffcc30b84dd4154daa0c56312a1141ce2033e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Register uncreateable types PointerHandler, EventPoint, EventTouchPointShawn Rutledge2017-09-201-1/+6
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If PointerHandler had the intended pressed/updated/released signals, it would be useful for handling EventPoints in arbitrary ways in Javascript. But we are deferring that feature for fear of abuse. And users will never need to create EventPoints, but they can be exposed to QML in rare cases. Change-Id: If86c4e1ba1904f18fb417f23282bd084206da3db Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * | QuickTest: initialize import and plugin paths before TestCaseCollectorJ-P Nurmi2017-09-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 215c0145 broke QQC1 auto tests. The problem seems to be that TestCaseCollector created a QQmlComponent instance before the import and plugin paths were set. Later on, when running the actual tests, a cached component was used and the paths were missing. Task-number: QTBUG-63220 Change-Id: Ifec163899db9ea088fdabc179181cc150534fc4d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Use the qEnvironmentVariable function from QtCoreThiago Macieira2017-09-142-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects the encoding of QML2_IMPORT_PATH environment variable, since it contains paths. For the other cases, it's just improving the code. Task-number: QTBUG-62328 Change-Id: I0f2ce894387048f78465ffff141ca50208f6845a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | improve documentation of PinchHandlerShawn Rutledge2017-09-145-12/+244
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If7acf359731a046637248d9b415b9e865365a068 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | qmltest: Enumerate test cases / functions without evaluating QMLTor Arne Vestbø2017-09-133-29/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most, if not all, QML tests are written without any sort of dynamic instantiation of the test data, so doing view.setSource() will evaluate the whole source file, compute bindings, create items, windows, etc. This is less then ideal when all you want is to list the test functions using -functions, or when running a single test from the command line, as in both cases we'll still actually evaluate every single QML file. This makes it really hard to evaluate test output, e.g. from the CI, especially with logging enabled, as even if a single test is requested, the logs are filled with results from the loading of the other tests. To improve the situation we use a non-instantiated QML component that we then inspect its compilation data, looking for test cases and functions. In the future the implementation of TestCase's qtest_run* machinery should be built on top of QTestLib instead of being reimplemented in JavaScript, but this is left for later. Change-Id: Ie5448208daf786e335583ab6bdfbc195891ec1f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | PinchHandler: correct the usage of min/max x/y for movement boundsShawn Rutledge2017-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QRectF constructor takes x, y, width, height not x1, y1, x2, y2 Change-Id: I84f9e62ef7a6587a319ed33d8937365f94fdba3b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * | PinchHandler: make the properties useful when target is nullShawn Rutledge2017-09-122-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An example is forthcoming in the form of a documentation snippet. Also, translation is a relative measurement, so its type is now QVector2D rather than QPointF. This doesn't change the QML API: x and y properties are still defined. Change-Id: I00f9a02a45c30899a568fe827f47cae9b4cc0f42 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * | QQuickMultiPointHandler::eligiblePoints: use parent not targetShawn Rutledge2017-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a PinchHandler for example is declared with target: null, it was crashing here. The eligible points are contained within the Item within which the Handler is declared; it's OK to do a pinch gesture within one Item but manipulate another Item instead. In such a case, the parent and target are different. Alternatively, target can be set to null, if the user is only interested in reacting to the Handler's properties in some other way rather than directly manipulating some target. Change-Id: Ia077006be1285c242fe7ba71ea89850cd7717c7c Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * | rename TapHandler.isPressed property to pressedShawn Rutledge2017-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is for the sake of convention. Unfortunately (and the reason it wasn't done this way at the outset), it may prevent us from ever having a signal called "pressed" in this handler or its base class. Change-Id: Iafa117410e0e33562290b87df59bc8c0085c217d Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * | | QML Tooling: Not all debug services need the interpreterUlf Hermann2017-09-211-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can use the debug messages and profiler services on the JIT just fine. In fact you shouldn't use the profiler on an interpreter if you have a JIT. Change-Id: I6d0729ddfe6c978e6d1405980ae0dcdf8de3f30c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Fix support for creating QWidgets in QMLSimon Hausmann2017-09-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating QWidgets, it is important to replace any call to QObject::setParent with QWidget::setParent. We do this now with the hook introduced in commit fc8adfea9f5e09e5f47ac4e592e5d9db471caede in qtbase. Change-Id: I2e069696b7ceb7f3b77d0f17e058f5a00ca4a029 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Automatically register the latest import versionMitch Curtis2017-09-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows what was done in d28c9f6a for Qt Quick Controls 2. The latest import version (e.g. 2.11 in Qt 5.11) will automatically be registered whenever the Qt version is bumped. This avoids needing to wait until a new type is added (or a new revision is added to an existing type) before being able to use the newest Qt Quick version. Change-Id: I7c0aa83aac56c3ac755d4ad0fd614c509ba058c9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>