aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-251-1/+1
|\ | | | | | | | | | | | | Conflicts: tools/qmlimportscanner/main.cpp Change-Id: I01e17581f6691a03f83788773364d0cf96319514
| * QmlProfiler: Don't create a new event ID for each binding instanceUlf Hermann2016-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | We want the IDs to reflect the location and the type of event that is happening. Thus all instances of a particular component should share the same IDs for their bindings. Otherwise the aggregated views of the QML profiler list the same locations again and again for each object. Change-Id: I3f8a7531589b42f785e40c7c5b04b229f639d696 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-1435-695/+220
|\| | | | | | | | | | | | | | | | | | | | | | | 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
| * Get rid of QQmlJavaScriptExpression::setFunctionObject()Lars Knoll2016-12-093-14/+2
| | | | | | | | | | | | | | | | It was only used in one place now, and the code is actually cleaner when calling setupFunction() instead. Change-Id: Idfe2842b81e765569f2c70f3d5dcd1862442a2ee Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix coding styleLars Knoll2016-12-091-10/+6
| | | | | | | | | | Change-Id: I2d6d67273533930aaa9fc61c5f4cdbef2f0bcf53 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Pass a QV4::Function to the QQmlBoundSignalExpression constructorLars Knoll2016-12-093-6/+6
| | | | | | | | | | | | | | And avoid the creation of a temporary FunctionObject Change-Id: Idaacfd978ac4ee26960bdf185272cc44d6618a71 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Avoid passing a FunctionObject to QQmlBinding::create()Lars Knoll2016-12-095-21/+8
| | | | | | | | | | | | | | | | Like this we can remove the QQmlBinding::create() overload that takes a FunctionObject. Change-Id: Ib6c37395ded325e68cf0fbf3afd08fb6dd6efa3b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Directly store the referenced QV4::Function pointer in the binding functionLars Knoll2016-12-093-26/+3
| | | | | | | | | | | | | | | | | | There's no need to store a pointer to the original function here, we can simplify the code when storing the pointer to the QV4::Function directly. Change-Id: I377aaecf56a0118606713c26cc7da4da001766b1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Don't store a source location in the QQmlBindingFunction anymoreLars Knoll2016-12-094-13/+4
| | | | | | | | | | | | | | | | It's not needed anymore as we now store this in the binding directly. Change-Id: I518c83207f219b690f31200e4d17251075bbd322 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Add a setSourceLocation() methodLars Knoll2016-12-092-1/+9
| | | | | | | | | | Change-Id: I611ab4fe5dd59cb8e07b0fa69ce22c7df5a6c3f2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Get rid of FunctionObject::createQmlFunctionLars Knoll2016-12-093-10/+18
| | | | | | | | | | | | | | | | Instead, simply create a QmlContext, and setup the bindings with the QV4::Function itself. Change-Id: I9db93b15112e43a6d5e275d126fb20f9c8833e8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Don't create a FunctionObject in createQmlBinding()Lars Knoll2016-12-091-5/+2
| | | | | | | | | | | | | | | | This also removes the last use of the QmlBindingWrapper, so remove that class as well. Change-Id: I2ec795b6ab695a689fb24d64c9b8809b651c2b37 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Avoid the creation of a FunctionObject for most bindingsLars Knoll2016-12-095-3/+30
| | | | | | | | | | Change-Id: Ia62d380945250015009d9c2b6ed65f6d830277ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Don't store a FunctionObject in QQmlJavaScriptExpression anymoreLars Knoll2016-12-092-18/+29
| | | | | | | | | | | | | | Instead store the QmlContext, the QV4::Function and a source location. Change-Id: Iafa54c09b9be7e78bace3498673ca94a2a145c97 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Limit access to m_function to QQmlJavaScriptExpressionLars Knoll2016-12-095-10/+28
| | | | | | | | | | Change-Id: I070f73f106440667fce2c7fe33310369a6aa1376 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Don't create a QML function is the signal parameters are invalidLars Knoll2016-12-091-3/+1
| | | | | | | | | | | | | | Moves the error checking to where the error occurs. Change-Id: I2590d3a9d41f41c16d19e4f5883b78a8b28a883c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Remove some dead codeLars Knoll2016-12-091-4/+0
| | | | | | | | | | Change-Id: Ibf6d50926edd85ebee545bcfdfcd14cb0eeab969 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Avoid using the FunctionObject in QQmlJavaScriptExpression::evaluate()Lars Knoll2016-12-091-3/+10
| | | | | | | | | | | | | | Rather directly execute the call on the QV4::Function. Change-Id: I1de52075760be6b3a0358af83270ebd4e1d1e8ae Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Change signature of QQmlBinding::create to take a FunctionObject *Lars Knoll2016-12-093-4/+4
| | | | | | | | | | | | | | This is what's in the Value in all cases anyway. Change-Id: I212c4c4076050e8d0ea4cf6f72a1683e132cd51b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Mostly use the QV4::Function in javascript expressionsLars Knoll2016-12-095-33/+23
| | | | | | | | | | | | | | | | | | Move the function() accessor from QQmlBoundSIgnal to QQmlJavaScriptExpression. Change the profiler to operate on QV4::Function objects for binding profiling. Change-Id: Ic7ce83c487ceb69cad4b16e3dab42026238b7e82 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Remove unused argumentLars Knoll2016-12-092-8/+4
| | | | | | | | | | Change-Id: Ie490f113b6fc48ea75eb5903a79dddb02faa7301 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Minor cleanupLars Knoll2016-12-091-5/+6
| | | | | | | | | | Change-Id: I091f2de77f84fb298404dc8784defcf3a812d56a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Add sourceLocation() accessor to QQmlJavascriptExpressionLars Knoll2016-12-095-15/+9
| | | | | | | | | | | | | | | | And remove it from the derived QQmlBoundSignalExpression class. Change-Id: I93cdc67136ddd916474acd2169faf380e296a900 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.8.0' into 5.8Lars Knoll2016-12-072-3/+2
| |\ | | | | | | | | | Change-Id: I19804e880005c66880eeabfaebf0b1093de80e6b
| | * Don't read members of the binding after it has been freedLars Knoll2016-12-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a use after free valgrind error (and thus a potential crash) in tst_qqmljavascript::selfDeletingBinding that got introduced with change e7f28bd13b18cfcb36ef41804029b9b296117002 Change-Id: Ia6b69af199c0f2af1cc0d33d4f13a8593b2c6d51 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Fix caching of the current qmlContext in QQmlObjectCreatorLars Knoll2016-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A context is not a QV4::Object, just a QV4::Managed. Testing for Object here lead to us creating a new QV4::QmlContext every time this method got called instead of sharing it. Reduces memory consumption and improves the performance of some of the creation benchmarks in qmlbench by ~20%. Change-Id: I20c0ad52133aa0cb40c9d2551fd635bef8b7d90a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Cleanup and reduce the number of overloads for QQmlBinding::create()Lars Knoll2016-12-062-31/+2
| | | | | | | | | | | | | | | Change-Id: Ibcd277bc434638e5c6e8e9ccea634aa25cde1643 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Start cleaning up the QmlContextWrapperLars Knoll2016-12-0413-444/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Cleanup Value::isObject/objectValue usagesLars Knoll2016-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Try to avoid calling both as objectValue() already checks isObject(). Change-Id: I1d770d4d9dabed4ea4cc3e322b8fdc5a64f5bd2b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Clean up Value::isString()/stringValue() combinationsLars Knoll2016-11-292-32/+38
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Get rid of most QT_NO_FOO usagesLars Knoll2016-11-2915-45/+35
| |/ | | | | | | | | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-284-1/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-254-1/+10
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * Doc: fix incorrect argument name for createQmlObject()Mitch Curtis2016-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "string" is the argument type, not its name. Change-Id: Ia8f1afe01363eb6bfa69247aca5c0849c56000c4 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
| | | * Fix reading of enum properties from gadgetsSimon Hausmann2016-11-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaProperty::type() maps an un-registered enum to QMetaType::Int, and so if a property cache is created for a gadget with enum properties, then their type will be int and we'll correctly read enum properties as ints in JavaScript. However if the enum is registered at the time we create the cache, then the property type will be the specific type and not QMetaType::Int. The property reading code in QV4::QObjectWrapper can deal with that, but the property reading code in the gadget value type wrapper code did not. [ChangeLog][Qt][Qml] Fix reading of enum properties from gadgets / value types when the enum was registered with qRegisterMetaType(). Change-Id: I7812b216a276dcc95c36e313507e1a1142250d0b Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-142-2/+2
|\| | | | | | | | | | | | | | | Change-Id: I905dcd29377bf1b2e0ee086823b54277d18e78dd
| * | | Cleanup of builtin JS helpers for qmljsSimon Hausmann2016-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the hand-written gc and print functions with the print and gc functions also used in Qml and QJSEngine. And while we're at it, this also adds the console object. Change-Id: Ia3a0ff24936b7ed5149cb689838b987f9178131e Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Fix OS platform label documentationMaurice Kalinowski2016-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-49033 Change-Id: I2e8157f8d2b40299799cbf31b424060ff89ab75a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | headers: Add missing override and remove redundant virtualAlexander Volkov2016-12-074-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifa816ebcd79372afca42dbd0dc0ecde006bb688a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | QQmlLoggingCategory: drop reduntant QString ctorAnton Kudryavtsev2016-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlInfo::operator<< already has QL1S overload. Change-Id: I959fdf58cfbdc4aba99d7da0545f69947534a8d0 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-232-0/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4object_p.h Change-Id: Iff4d3aba7710a999b8befdc493cbe959e1ce02f9
| * | | QML: Add another specialization for QQmlPropertyCache::propertyErik Verbruggen2016-11-162-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlListReference passes a QLatin1String in, which can behandled by the stringCache just fine. So if there is a cache entry, then this will skip toQString conversion. Change-Id: I13afe4f6e63d486b313ac58cbd86fb7f9e1a80f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | QQmlPropertyCache: adapt qQmlPropertyCacheCreateAnton Kudryavtsev2016-11-221-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to make good use of QL1S Change-Id: I7c3ac1cefb30bee9baa31a3f8ec08f5f57eb5d5b Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | | Introduce qmlRegisterModule()J-P Nurmi2016-11-183-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is particularly useful for keeping the versions of related modules in sync. For example, when QtQuick.Controls introduces new types or revisions and bumps up the minor version, qmlRegisterModule() can be used to make the same version available for QtQuick.Controls.Styles in case it doesn't have new types or revisions to register. [ChangeLog][QtQml] Introduced qmlRegisterModule() that can be used to make a certain module version available, even if no types or revisions are registered for that version. Change-Id: I5ec457465cd778bb0adda55771d195f69cd4b31a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Qml: add missing 'override'Jake Petroules2016-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and drop redundant 'virtual' Change-Id: I2a57685e342208d7ef1f13f97a56cb3ff7a31422 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | QQmlProperty: use new QQmlPropertyCache::property() with QStringRef argAnton Kudryavtsev2016-11-081-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recude memory allocations. Change-Id: I259e47e3c47a562817d1b9585a89c9f8a00260c0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | QQmlPropertyCache: add property() overload with QStringRef argAnton Kudryavtsev2016-11-082-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we can pass 'name' arg as QStringRef. Client code can reduce allocations. Change-Id: I444f7135f4912f54d57e0a1193f330a3976fc186 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-031-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tools/qmljs/qmljs.cpp Change-Id: Ifa9e74bdb780eaff22fbc9ba1c514d0078a3fb29
| * | | QML: Hint LTO to never inline QQmlPropertyCache::resolveErik Verbruggen2016-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... so the fast-path doesn't get bogged down by accidental slow-path inlining. Change-Id: Ifb3eadf5e96b5a61f41fb1f0d32269e43f13be57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>