aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QQmlDelegateModel: check incubationTask before accessing itwip/itemviewsRichard Moe Gustavsen2018-02-061-2/+8
| | | | | | | | | | | A QQmlDelegateModelItem will have its incubation task removed when the item has finished loading. So we need to check that it exists before trying to access it. And we know that the item is ready (and not in error state) if the item still exists in the cache. Change-Id: If25dca6b5902c491f5061b8d5d84046a72a8029b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQmlDelegateModel: mark setModelIndex as virtualRichard Moe Gustavsen2018-02-061-1/+1
| | | | | | | | This function is marked as "override" in QQmlDMCachedModelData, which means that it needs to be "virtual" in QQmlDelegateModelItem. Change-Id: If53b85a7ebfde92d348d298a6e5595bcdb2671d4 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Get rid of internal QQmlPrivate::CachedQmlUnit interface part 1Simon Hausmann2018-01-285-32/+32
| | | | | | | | Within QtQml we don't need to use this data structure anymore, we can use its one member directly Change-Id: Id850e12918257c7af3c97bfef41d1e93578842d2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove private API dependency of qmlcachegen generated codeSimon Hausmann2018-01-288-21/+13
| | | | | | | | | Since the compilation unit does not have a backend anymore, we can create it in QtQml itself instead of in generated stub code. That removes the last dependency to private headers in the generated code. Change-Id: I186fc5bd679476b1a4714e4e3ba0ac00b55676cf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for compiling QML/JS files ahead of time in resourcesSimon Hausmann2018-01-2813-21/+1114
| | | | | | | | | | | | | | | | | | | This is bringing over the loading infrastructure from the Qt Quick Compiler that allows embedding qml/js files in resources and compiling them ahead of time. At the moment, the approach of generating one cpp file per qml/js file and the loader stub is needed because the build system does not support dynamic resource generation. In addition, as per QTBUG-60961, we must ensure that the generated data structures are aligned. To retain compatibility this is enabled via CONFIG += qtquickcompiler, but we may need to find a new name (but should keep the old one in any case). Task-number: QTBUG-60961 Change-Id: Ia9839bf98d3af4c50636b6e06815364a9fc7ee57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* FolderListModel: add status propertyIlya Kotov2018-01-287-4/+108
| | | | | | | | This allows to track directory loading Task-number: QTBUG-48708 Change-Id: If79a325ef1bfc831d3bc2a205e3127a571fcb0c1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add localserver feature check for qmldbg_local pluginFrank Richter2018-01-271-1/+2
| | | | | Change-Id: I515be06d1ea24497ddbd152d04c800fc1788811a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Refactor compressed texture file readingEirik Aavitsland2018-01-279-188/+545
| | | | | | | | | | | | | | This commit expands on the basic support for compressed texture files that was added in 432e27a. It prepares for adding support for other file types than pkm by declaring a common QSGTextureFileHandler interface, and by factoring out reusable code parts in a new QSGCompressedTexture class. It also adds some more systematic logging and checking for error conditions. Change-Id: Ie5070d0a6df757fee0753f53adbe23a33d51a634 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Remove duplicated declarationLars Knoll2018-01-261-1/+0
| | | | | Change-Id: I42332ea59fcb5479d49c24c2189d066af569d4fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a couple of places where we'd free used objectsLars Knoll2018-01-262-5/+7
| | | | | | | | Make sure all our JS objects are referenced from the JS stack before calling into the memory manager. Change-Id: I88d622d37b9d6cfc19db4045ebd3fadc5bb4cabe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Give Qt Quick Test its own documentation moduleMitch Curtis2018-01-266-3/+180
| | | | | | | | | It has its own QML types, so it makes sense. This also makes it easy to add documentation for C++ types later on. Task-number: QTBUG-50064 Change-Id: Ifc302c7d547d806f2ea7674dfecddf36cc1e258f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* demonstrate containsMask in the tapableTriangle Shape exampleShawn Rutledge2018-01-261-2/+3
| | | | | | | | | | This isn't an improvement in behvior, it just shows that a Shape can be used as a mask on some other Item. But Shape.containsMode is still important so that when the outer Rectangle's contains() calls Shape.contains(), the latter will do the right thing. Change-Id: I1bd127784e708f30561945a4958e4d5f0c1c0b85 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix compilation unit memory leak when using qml caching from resourcesSimon Hausmann2018-01-261-1/+2
| | | | | | | | The unit created via the factory function has a refcount of 1, so we need to adopt it. Change-Id: Ia7aadf02c9fc133919f97ea07fc3f3546a7e2680 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove some duplicated codeSimon Hausmann2018-01-254-31/+26
| | | | | | | | We can centralize the code that initializes a V4::Script instance used in worker scripts as well as in the Qt.include() function. Change-Id: I9a83f990c694eb4d793ec5ac3b1c917d8c068d06 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* AnimatedImage example: allow setting speed to 0Shawn Rutledge2018-01-251-1/+1
| | | | | | | It's OK after the fix for QTBUG-65758. Change-Id: I132bec5db250cd0cd57e6048649ab25cb360144b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickShape: override contains(QPointF); demonstrate in examplesShawn Rutledge2018-01-2511-18/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickItem::contains() only checks the Item's bounding box by default. In the case of Shapes, that can be comically imprecise, but it's fast. So we add a containsMode property to control whether we will do that (the default) or actually check each of the QPainterPaths within to see whether they contain the point (FillContains). FillContains could be optimized later: use QRegion perhaps, or download the rendered texture from the GPU and test whether the pixel at the point is transparent. It may also be appropriate to add a StrokeContains option. The main motivation is to detect mouse (or touch) interaction within a shaped area. QQuickSinglePointHandler::wantsEventPoint() already checks whether its parent Item contains the event point. So if a Shape has a TapHandler for example, it will respond only within the visible bounds of the Shape rather than within the entire rectangular bounding box as long as containsMode is set to FillContains. Examples quick/shapes/content/tapableTriangle.qml and tiger.qml are modified to react when a press occurs inside, and the former is fixed to be able to run standalone via the qml runtime. The latter has an offset issue when run standalone but is OK within the shape gallery example. As a drive-by optimization, QQuickShapePrivate's variables are re-ordered by type so that the compiler can place the bools and enums into bitfields; and to facilitate reordering, the initialization is done C++11-style, in the header. [ChangeLog][QtQuick][Shape] A containsMode property is added. If it is set to FillContains, then Shape.contains() returns true only within the visible bounds, so its Pointer Handlers also respond only within those bounds. Change-Id: I31c85a9b08aa6945c58dc07febfe89ffef21274b Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Support masking of QQuickItemsPaolo Angelelli2018-01-258-4/+210
| | | | | | | | | | | | | | | Adding a new property, containsMask, to QQuickItem, that can be set to any QObject defining a Q_INVOKABLE bool contains(const QPointF &point). When this property is set, the mask object contains method is used in place of the item own contains method. [ChangeLog][QtQuick][QQuickItem] Added containsMask property. Task-number: QTBUG-20524 Change-Id: I5b0696e2cddc6ae3e217ce149c5f44980fdb69aa Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist QTBUG_34576_velocityZero ListView test on macOS 10.11Shawn Rutledge2018-01-251-0/+3
| | | | | | Task-number: QTBUG-65964 Change-Id: Ie1ba02a38cbd019077c7a89ed310d79ec28b6bec Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* blacklist tst_qquickimage::nullPixmapPaint on QEMUShawn Rutledge2018-01-251-0/+4
| | | | | | Task-number: QTBUG-65978 Change-Id: I0b506a2a85566f560eb555c26b568b1dd81811b3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Match QQmlEngineDebugServiceTest to the serviceUlf Hermann2018-01-252-5/+17
| | | | | | | | | | | | The fact that the service transmits QObject properties by their objectNames, rather than as proper references is not very useful and in fact the reason for some strange behavior in QtCreator. However, it's been that way for a long time and we should test what the service actually does. Task-number: QTBUG-65852 Change-Id: I6e489bb9877fae129432b5b3d5d4c7bfb5deaa9b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlEngineDebugService: Output better diagnostics on test failureUlf Hermann2018-01-251-3/+7
| | | | | | | | | Apparently this check fails sometimes. We want to know what kind of value causes it to fail. Task-number: QTBUG-65852 Change-Id: I732ee5e3b224567bf3ea34d57bef5d78bfdd6ca1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix crash in tst_controls in QQC2Simon Hausmann2018-01-222-4/+24
| | | | | | | Handle startsWithUpper() for complex sub-strings Change-Id: Ia7494a880612761ee3caf9113c2ac5faa4edd182 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Minor data structure cleanupSimon Hausmann2018-01-228-89/+8
| | | | | | | | The cache files are architecture and ABI independent, so we can remove any associated field/code as well as the workaround for Android. Change-Id: Ia52a5be886fc22a2105460e003e7a76af7dc1818 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add an AnimatedImage exampleShawn Rutledge2018-01-214-0/+119
| | | | | | | | | | | This provides a way of testing the new speed property too. The animated GIF comes from https://en.wikipedia.org/wiki/Uniflow_steam_engine Task-number: QTBUG-62203 Change-Id: I1df118e79d9c7451c2fbf712b1ab4eb0656e4cc7 Reviewed-by: Louis du Verdier <louis.du.verdier@free.fr> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-204-2/+318
|\ | | | | | | Change-Id: Ibcdccc2149539466475ce32f58a9a568705caf23
| * Create new engine for each benchmark runAllan Sandfeld Jensen2018-01-171-2/+7
| | | | | | | | | | | | | | | | | | | | Otherwise we end up with too many mmap'ed blocks as they appear not to be deallocated until the engine is destroyed. Change-Id: I88b8dd6d570423a492ddc6c7f105d0db97caa72d Task-number: QTBUG-60590 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Qt.labs.handlers: add plugins.qmltylesShawn Rutledge2018-01-121-0/+308
| | | | | | | | | | | | | | | | This was missing in 5.10.0 so Creator didn't recognize the pointer handler types very well. Change-Id: I593625c1629dfffa66421b76038d7a6583bbb72d Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * QQuickPointerHandler: add virtual onTargetChanged()Shawn Rutledge2018-01-122-0/+3
| | | | | | | | | | | | | | | | To be overridden in handlers which need to know when this happens, to avoid connecting to the targetChanged() signal. Change-Id: I51432b69d05fd541eb62e0cd01f4019e336816ac Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Remove unused methodLars Knoll2018-01-192-7/+0
| | | | | | | | | | Change-Id: If4748db470e053d0980700cedc33676359abb067 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Disentangle include dependencies around the write barrierLars Knoll2018-01-196-134/+130
| | | | | | | | | | | | | | The write barrier header should have minimal dependencies. Change-Id: I071718c2fafe5020d1093ca3b363844f7a9b7b35 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Introduce a SubString String typeLars Knoll2018-01-194-12/+50
| | | | | | | | | | | | | | | | Use it in regexp matching. There's probably other places where we should use this as well. Change-Id: Ie2774acff0a5ec7b1c26c564fa40e65fecea29d4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Split up String type into a regular and a ComplexStringLars Knoll2018-01-194-61/+73
| | | | | | | | | | | | | | | | Saves some memory for many cases, and will allow re-using the String itself as an identifier Change-Id: I462d63bc6f113dff1dce0de28ee4eea3949a4b95 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for getting the flags from the original mouse eventAndy Shaw2018-01-189-6/+192
| | | | | | | | | | Change-Id: Ifdf0b8cb43b1e88f3931f49ac6ca72019548ddcf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | V4 JIT: Fix JIT thresholdErik Verbruggen2018-01-171-1/+1
| | | | | | | | | | | | | | | | | | Because increments for the interpreter call counts are done after checking the threshold, the check has to be greater or equal. Otherwise this will be an off-by-one. Change-Id: Iebe6c5770512e58ff5af8170dd33ec850b054966 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix license headersJani Heikkinen2018-01-161-17/+12
| | | | | | | | | | | | | | | | old header.LGPL21 was used in one tests file. Replace that with correct header.GPL-EXCEPTION one Change-Id: I2319dea697ab1950f989316869e3342a4c2dfe52 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Add a speed property to AnimatedImageLouis du Verdier2018-01-164-1/+38
| | | | | | | | | | | | | | | | | | | | QMovie handles most of AnimatedImage's behaviors and already provides a speed property (that is a percentage, 100% by default). This commit only offers the possibility to change its value from the QML. Task-number: QTBUG-62203 Change-Id: I8b7b79053181c1544aee1e95054b3b48229381fb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QQuickShapePrivate: use header init, order storage by typeShawn Rutledge2018-01-162-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Header initialization makes it more clear that initialization is being done properly (and in fact a couple of these were not). Ordering by type allows compilers to pack the bools and enums into a bitfield. (Unfortunately explicit bitfields aren't syntactically compatible with header initialization, so we leave it up to the compiler to make this optimization on its own, since Shape is not intended to be used in large numbers anyway.) Change-Id: I68b1f5dec59bc2c487ab37bd3495eca19736bc21 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fix build without QML debuggingUlf Hermann2018-01-165-11/+8
| | | | | | | | | | Change-Id: Ie1b18dd00705b1913572b87c6968a63438e7a90c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add a feature Qt Quick RepeaterUlf Hermann2018-01-155-3/+28
| | | | | | | | | | Change-Id: I863e721c623f7916ea36a34edd2d6faece1d06a4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QQmlProfilerService: Avoid type ambiguitiesUlf Hermann2018-01-151-5/+8
| | | | | | | | | | | | | | | | | | Use C++ cast operators, and always choose types of defined length when interacting with the packet protocol. Also, don't let the client overflow the flush interval setting. Change-Id: I2f4654d4e3e350a979a989784dc61fbc8b97df2a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move the freeList from Heap::ArrayData to SparseArrayLars Knoll2018-01-155-20/+18
| | | | | | | | | | | | | | It's only used for sparse arrays, so the data should live there. Change-Id: I9ca04c73dd2dbebf459ee64c164a69681623a351 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Get rid of BuiltinFunctionLars Knoll2018-01-1511-118/+22
| | | | | | | | | | | | | | It's now unused. Change-Id: Id2941c212d488c9b0933fa06aac9922b9db13a05 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move the last builtin methods over to the new calling conventionLars Knoll2018-01-151-31/+31
| | | | | | | | | | Change-Id: Ia7491ccae6b2fc3b4fb8525e1bd077f6d16f66a5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Convert XmlHttpRequest methods to new calling conventionLars Knoll2018-01-151-134/+134
| | | | | | | | | | Change-Id: Ife44dbb4b18f0542a9fc54047baa6cccc78b2e22 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Convert particles over to new calling convention for builtin functionsLars Knoll2018-01-121-26/+26
| | | | | | | | | | Change-Id: Id57417f4deba21917136edd6c10f2ad52c9f9fbb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Convert canvas2d methods to new calling conventionLars Knoll2018-01-121-457/+459
| | | | | | | | | | Change-Id: I543ae856a5c56ee69f7e7cc6f1ff9a8ce2a6b489 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Convert methods in qqmlbuiltinfunctions.* to new calling conventionLars Knoll2018-01-122-309/+309
| | | | | | | | | | Change-Id: I8f289668b9321460778d2a431cb9c2af1f22eb93 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Allow exported signal handlers for signals with revisionThomas Hartmann2018-01-1213-22/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properties of QML objects or alias properties to QML objects have to know about the revision of the QML type. If the property is used as a grouped property and a signal or property is assigned. Without this patch this is not working with signals that have a revision. To get this working we store the minor version of the QML type in QQmlPropertyData and retrieve the QQmlPropertyCache with the correct AllowedRevisionCache using this minor version. Task-number: QTCREATORBUG-18820 Change-Id: I1e20169e0d5a2ae11059a951aa83a5c94106accb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Arguments passed to functions should shadow the function nameLars Knoll2018-01-123-6/+25
| | | | | | | | | | | | Task-number: QTBUG-65140 Change-Id: I6c6b24f081b31ef0f16fec9b2024485acec11c2d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Convert QQmlLocale to the new builtin calling conventionLars Knoll2018-01-122-185/+185
| | | | | | | | | | Change-Id: Iebe9f18d688d991346cbb52b3c939d31159b7fef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>