aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-1/+1
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/quick/doc/src/qmltypereference.qdoc Change-Id: Ia58f1c5a98309c32ef8d8e5c893faf261215f19f
| * Fix ObjectModel::move() to mark the changes as movesJ-P Nurmi2017-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | QQmlObjectModel::move() created a QQmlChangeSet with moveId -1, which made item views and controls see the changes as removals and insertions, because QQmlChangeSet::Change::isMove() returned false. Consequently, item views did not update the current index when the current item was moved. Task-number: QTBUG-60894 Change-Id: I4a64b7670c1fae12337995627437cc83efb9f1ef Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-062-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4argumentsobject.cpp src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4errorobject.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/qml/jsruntime/qv4lookup.cpp src/qml/jsruntime/qv4managed.cpp src/qml/jsruntime/qv4managed_p.h src/qml/jsruntime/qv4object.cpp src/qml/jsruntime/qv4object_p.h src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/memory/qv4heap_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/memory/qv4mmdefs_p.h src/quick/scenegraph/util/qsgdistancefieldutil.cpp src/quick/scenegraph/util/qsgdistancefieldutil_p.h tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: I7ed925d4f5d308f872a58ddf51fdce0c8494ec9c
| * Fix QML Connections element ignoring the enabled propertyThomas McGuire2017-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | The enabled property was ignored if it was set before componentComplete() was called. [ChangeLog][QtQml] Fixed the QML Connections element ignoring the initial state of the enabled property Change-Id: I40c92fcb30f0bb8ca406f248b3bde2fced5ab58f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Add missing breakThiago Macieira2017-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 2a812493bc97983b85110f853d3dbe57b54667d8 added the VariantMap case but forgot to add the break before it (there wasn't a break because it fell through to default: break). This is a 6.5 year old issue, though it affected no one because setVariantMapProperty checks the destination's type again. Found by GCC 7: qqmllistmodel.cpp:1075:62: warning: this statement may fall through [-Wimplicit-fallthrough=] target->setVariantProperty(targetRole, v); ^ qqmllistmodel.cpp:1077:13: note: here case ListLayout::Role::VariantMap: ^~~~ Change-Id: Ica9894dc9b5e48278fd4fffd14bb35efd18a8a6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix stringsJarek Kobus2017-05-171-2/+2
| | | | | | | | | | Change-Id: Ib073a4161f68bdde50c9287f66f111a49adb7e26 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | QQmlListModel: Optimize model updatesArnaud Vrac2017-05-052-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only update changed indices in the list model on insertion, deletion or move. This can greatly improves performance when inserting or removing near the end of the list, or when moving elements in a large model. On a work in progress version of qmlbench's modelperf_listmodel_addremove.qml, this appears to improve performance quite a bit (~40%): Before: Average: 363.4 frames; using samples; MedianAll=363; StdDev=5.31977, CoV=0.0146389 After: Average: 518.2 frames; using samples; MedianAll=518; StdDev=20.5475, CoV=0.0396517 Change-Id: I8ce7bea4ab8b1c7c3d0fbccc40b9a12ca3eadf59 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QQmlComponent: Move incubateObject from QQmlDelegateModel to ↵Robin Burchell2017-05-032-30/+3
| | | | | | | | | | | | | | | | | | QQmlComponentPrivate This feels like a slightly tidier encapsulation. Change-Id: Iff6c05e1fe7fbc6bb1ec58a7ea42d32ee03187df Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-0210-0/+18
|\| | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| * Run includemocs in qtdeclarativeThiago Macieira2017-04-2610-0/+18
| | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QQmlConnections: Don't crash (or read past bounds) if a silly prop name is givenRobin Burchell2017-04-131-3/+2
| | | | | | | | | | Change-Id: I156d27b21159f019a969a33e553e63fac9a3d193 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-04-111-7/+4
|\| | | | | | | Change-Id: I95914046889022e0ef9bdc17338dc5895c5223fe
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-111-7/+4
| |\ | | | | | | | | | Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
| | * Avoid access to declarativeData when isDeletingChildren is setBernhard Übelacker2017-04-101-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QObject's members declarativeData and currentChildBeingDeleted share the same memory because they are inside a union. This leads to a problem when destructing mixed Widgets and QML objects. Then in QObjectPrivate::deleteChildren the member currentChildBeingDeleted is set. But unfortunatley QObjectWrapper::destroyObject retrieves the same pointer via declarativeData. This patch should avoid this by disallowing retrieval of declarativeData when isDeletingChildren is set (or at least adds a Q_ASSERT). Task-number: QTBUG-57714 Change-Id: I9ee02f79be3e8226c30076c24859b49b8dcfaecf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-04-071-2/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4vme_moth.cpp Change-Id: I865d794e550a263387a39ca8d051ebf48b70cbc0
| * | Fix build without features.animationTasuku Suzuki2017-04-031-2/+8
| | | | | | | | | | | | | | | | | | Change-Id: Ie45a2f01def64941a323973ea27446e3fc85a72b Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-141-4/+3
|\| | | | | | | | | | | Change-Id: I0ec164ce6e8099e6e4d6b40a3c7340737473ef4b
| * | Fix memory leak in QQDMIncubationTask::statusChangedAlbert Astals Cid2017-03-011-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Mimic the same process we do in QQmlDelegateModelPrivate::incubatorStatusChanged i.e. there's no need to check for object before destroying contextData Change-Id: I8cb1cda6da43bada350183ae11ee9b85b7fffee5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-021-2/+2
|\| | | | | | | | | | | Change-Id: I6cbd83b61fac34c2ba6936711289ec09a490719a
| * | Doc: minor language correctionsNico Vertriest2017-02-271-2/+2
| | | | | | | | | | | | | | | Change-Id: Ifa031002f4b67f575adebcde8b26d9332fffa8da Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-02-281-1/+1
|\| | | | | | | | | | | Change-Id: I92b13a9c1727644d63e125c1e6f1fdac72720ad7
| * | Add Q_ALLOCA_VAR, Q_ALLOCA_DECLARE and Q_ALLOCA_ASSIGN macrosKimmo Ollila2017-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define Q_ALLOCA_VAR macro to be used instead of #ifdeffing the occurrences of alloca() in case it's not supported. Q_ALLOCA_DECLARE and Q_ALLOCA_ASSIGN macros separate memory allocation from the declaration and RAII. Change-Id: Idc7551642c48a968a44bcade14d84800a3a1270e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | sources: Add missing override and remove redundant virtualAlexander Volkov2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Change-Id: I48e26b1491024d41ebf75d40f0d1a7e9a1b20f22 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Object: Allow put and putIndexed to return success or failureRobin Burchell2017-02-092-2/+3
|/ / | | | | | | | | | | | | | | | | Some parts of the ES6 (and even ES5!) spec specifically require handling of a property write failure. This will be introduced in followup changes, as it's going to be rather more involved than this. Change-Id: Ie482493fcf4780df0e23619650a856421d20bd55 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Convert more builtin functions to the new calling conventionLars Knoll2017-01-253-49/+49
| | | | | | | | | | Change-Id: I053215261e1186aff25f29e0967219ef667f7678 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlListModel: Fix potential uninitialized valueRobin Burchell2017-01-181-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If roleCount is 0, alloca(0) will give us a pointer. The loop will then not initialize the returned pointer (due to the roleCount being 0), passing an uninitialized changedRoles to emitDirectNotifies. emitDirectNotifies doesn't access changedRoles unconditionally (via another for loop), but this is probably better to check than not. Coverity-Id: 172868 Done-with: John Brooks Change-Id: I821c06221d2659d3310082b4e81442cc58b197f7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qml: Remove last foreach, and mark QT_NO_FOREACHRobin Burchell2017-01-172-5/+7
| | | | | | | | | | | | | | Just src/imports/ to go... Change-Id: Ib4484676e24655cb950b3c4bb6495ff0e7f9700f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Port existing qmlInfo callers to qmlWarningRobin Burchell2017-01-115-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that qmlInfo actually reports info messages, we want to change existing callers to use warning-level messages to preserve the original message level. This was done through: perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc} .. with a little care taken to only add the hunks that should be changed. Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-145-28/+64
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Merge remote-tracking branch 'origin/5.8.0' into 5.8Lars Knoll2016-12-072-9/+17
| |\ | | | | | | | | | Change-Id: I19804e880005c66880eeabfaebf0b1093de80e6b
| | * QQmlDelegateModel: Avoid allocating unnecessarilyRobin Burchell2016-11-302-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wait for the update request to be posted and take effect before piling another one up. This speeds up qmlbench creation benchmarks a bit (as they make use of Repeater). Results for benchmark/creation/delegates_item on a 5.6 base on a 2011 mbp: Before: Average: 670.4 ops/frame; using 5/5 samples; MedianAll=674; StdDev=6.34, CoV=0.00946 - StdDev (all samples included)=6.34 After: Average: 702 ops/frame; using 5/5 samples; MedianAll=700; StdDev=8.97, CoV=0.0128 - StdDev (all samples included)=8.97 Change-Id: Ic0ef4c1e2d6cb309edeb512cad4280a15abc7a06 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Start cleaning up the QmlContextWrapperLars Knoll2016-12-041-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The class should get merged with the QV4::QmlContext class. Simplify the cleanup by moving both classes into a common file. Change-Id: I0074da79701d5f41eb51681b70fcde85bfd45fc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Clean up Value::isString()/stringValue() combinationsLars Knoll2016-11-291-2/+2
| |/ | | | | | | | | | | | | | | It's enough to just call stringValue(), as that already does the isString() check. Change-Id: I7be0e643a7975c0704b4c9c43b337deb8db9fce0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-282-3/+43
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renderers added in 5.8 had to be adapted to the changed profiling macros from 5.6. Conflicts: src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp src/quick/util/qquickprofiler_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
| | * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-252-3/+43
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/quick/util/qquickprofiler_p.h Change-Id: I11a89c2a166115d6697adfba09928805643e709e
| | | * Fix binding re-evaluation when list model properties changeSimon Hausmann2016-11-182-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression from commit 4876ea6a18ccdfd72014582aa5d50ab9f6b6ec9e, which avoided returning an expensive QObject when calling get() but also lost the ability to perform binding captures when accessing the properties. This change restores the captures by performing them by hand in get() and also triggering the notifiers directly when the values change, without creating the QObject. Task-number: QTBUG-52356 Change-Id: Ia429ffafd4032b63d3e592aa63bb0864a24e0965 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | headers: Add missing override and remove redundant virtualAlexander Volkov2016-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifa816ebcd79372afca42dbd0dc0ecde006bb688a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-231-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4object_p.h Change-Id: Iff4d3aba7710a999b8befdc493cbe959e1ce02f9
| * | | Merge remote-tracking branch 'origin/5.7' into 5.8Simon Hausmann2016-11-151-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4string.cpp The conflict resolution for qv4tsring.cpp is to essentially omit the change of commit 64714ea431f2fd355ed27edc69dba4e992511e75 as the code in 5.8 already uses the add/mul_overflow functions. This merge also reverts commit f4ac007f4a19bc095ff15d415a6629986de78e49 as we can deal with dead store elimination now. Change-Id: Iee08c87cbe1a2ff23a73ce621d56262b4e007c56
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-151-2/+2
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmldevtools/qmldevtools.pro tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp Change-Id: I12255c16716bd8a74e7047cdb1f9302a4d1ea827
| | | * Setting Connection's target to null should disconnect implicit targetMichael Brasser2016-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id7c8c7080e6db8bb6d09c1df13cddaef047cf611 Task-number: QTBUG-56499 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-184-30/+41
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
| * | | Turn the no-network support into a configurable featureLars Knoll2016-10-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic70f60c124fe166b37fbe9b853735be3c5e0d46d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | QML: Also check for correct destroy() chainingErik Verbruggen2016-10-062-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the destroy() method of Heap::Base was called when a Managed object needs destruction. This checks if a call to the parent's destroy() method was accidentally omitted. Change-Id: Id025ecd6d4744bf3eab23503fbe317ed2a461138 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | QML: Make Heap::Object and all subclasses trivialErik Verbruggen2016-10-063-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC6 might dead-store-eliminate out our secret write to Base::mmdata, because it expects all memory content to be "undefined" before constructor calls. Clang might take the same approach if the constructor of Heap::Object is removed. By making these structs trivial, it also makes them memcpy-able. Change-Id: I055b2ad28311b997fbe059849ebda4d5894eaa9b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | QML: Introduce destroy() on Base subclassesErik Verbruggen2016-10-052-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the destructors of subclasses of Base, making them nearly trivial. Change-Id: Ia6f7d467e87899b5ad37b8709a8f633a51689d59 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Qml, Imports: mark some methods as constAnton Kudryavtsev2016-10-133-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods do not modify objects. Change-Id: I67b1a10cfd0b32688500fca3265a96f53afd1b57 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | QmlDelegateModel: proper construction of vectorAnton Kudryavtsev2016-10-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... with known size and known value by corresponding ctor. Don't use appending for this case. Change-Id: Iee11d305a096e1f81371b31ce472dbea9fac93e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | Qml: add missing 'override'Anton Kudryavtsev2016-10-075-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and drop redundant 'virtual' Change-Id: Ib1f68c1ebd0468cb4a77eecc986bbf718f6bf789 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | Qml types: replace 'foreach' with 'range for'Anton Kudryavtsev2016-10-075-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all, just instances with low risk. Change-Id: I30612a1debd83dfa01aa087799658cff254bc9fc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>