aboutsummaryrefslogtreecommitdiffstats
path: root/src
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-286-10/+12
| | | | | | | | | 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-282-10/+5
| | | | | | | | | | | | | | | | | | | 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-286-4/+92
| | | | | | | | 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>
* 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>
* QQuickShape: override contains(QPointF); demonstrate in examplesShawn Rutledge2018-01-256-6/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-255-3/+83
| | | | | | | | | | | | | | | 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>
* 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-224-25/+2
| | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-203-0/+311
|\ | | | | | | Change-Id: Ibcdccc2149539466475ce32f58a9a568705caf23
| * 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-184-6/+26
| | | | | | | | | | 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>
* | 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-1510-115/+19
| | | | | | | | | | | | | | 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-128-22/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-6/+10
| | | | | | | | | | | | 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>
* | Convert more builtin functions to use the new calling conventionLars Knoll2018-01-1225-166/+165
| | | | | | | | | | | | | | | | Convert most of the methods used QML objects to the new calling convention. Converted IndexedBuiltinFunction to do the same. Change-Id: I41b26042c2f56f24988485b06e8ccd214e2573c0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add setContextProperties()Thomas Hartmann2018-01-122-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting all properties in one batch avoids unnecessary refreshing of expressions and is therefore a lot faster if there are many expressions in the context. In an example I created it takes 500ms to set 10 context properties using setContextProperty() and it takes about 150ms to set the context properties using setContextProperties. Change-Id: Ic7cf03cda292b316198f37f963b61a2388a288c9 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Introduce Q_FALLTHROUGH()Friedemann Kleint2018-01-104-4/+5
| | | | | | | | | | | | | | Silence g++ 7.X warnings. Change-Id: Iba80ab547111d883ff8b3e99173cc5f3a79ae81f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Drop the qml-interpreter featureUlf Hermann2018-01-106-42/+14
| | | | | | | | | | | | | | We cannot build QML without interpreter anymore. Change-Id: Ibc51240caa956132eef8753fa6c75939026930d5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix calculation of String hash values for char *Lars Knoll2018-01-101-1/+1
| | | | | | | | | | | | | | | | If char is signed on the platform and the char * array contained non ascii values, this would actually miscompute the hash value Change-Id: Id26891482831bcc23c5ce61e8094a85b53d00a1c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Cleanup IdentifierHashLars Knoll2018-01-107-94/+54
| | | | | | | | | | | | | | | | This class is only used in one place, so there's no point in it being a template. Change-Id: Ibbbed8d5be1d02015339c9b39cd1b167f36b8885 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Simplify and cleanup code in QQmlContextLars Knoll2018-01-101-37/+1
| | | | | | | | | | | | | | | | Simply forward the setContext(QObject *) call to the QVariant overload. Change-Id: I6f7d03419788c4323fd3dc2a725628bfe1170102 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Optimize inc/dec operationsLars Knoll2018-01-091-24/+63
| | | | | | | | | | | | Change-Id: I3e1fa464e380a40b610bbc339bdbc272ebc863d1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-0940-165/+468
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/memory/qv4mm.cpp src/qml/qml/qqmlbinding.cpp Change-Id: I98e51ef5af12691196da5772a07d3d53d213efcc