aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Make QQmlPropertyCache available in QJSEngineSimon Hausmann2014-12-291-107/+1
| | | | | | | | | The QQmlEngine has two containers for property caches, one for QML types and one for all-purpose meta-objects. The latter is rather useful and now being moved to QJSEngine to be available there. Change-Id: Ieab65c400b8a2e410e5f9eee6d603162dbb864d9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Replace usage of stdout for debug output by qDebugErik Verbruggen2014-12-191-1/+1
| | | | | | | | This way even paranoid Androids can be show interesting stuff. Task-number: QTBUG-43109 Change-Id: Ib0ef9e8f6c6fc66e9ea9bfcaf2cd9e33d7469070 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup: Remove unused codeSimon Hausmann2014-12-091-4/+2
| | | | | | | | isConcurrent is not virtual and always returns true, so we can remove it and remove the if() on the caller side. Change-Id: Ie750fdeddaf8c339e1fcab99ebd967e3446bd975 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* May it rest in pieces.Robin Burchell2014-12-091-1/+0
| | | | | Change-Id: I58a2ac56e099da44314feb1614067626b015710a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QmlEngine: Use separate mutex for network access managerKai Koehne2014-10-231-0/+1
| | | | | | | | | | | | | Creating the network access manager can involve blocking calls to DBus, which apparently can take quite long in pathological cases. Using the same mutex in this case like for instance registering objects can therefore result in a freezing UI. Mitigate this by introducing a separate mutex. Task-number: QTBUG-41183 Change-Id: I55bd8453d8e4bbc0bda1591eb3fd48b50ca921c1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix crash on QQmlEngine destruction.Andrew den Exter2014-07-031-1/+2
| | | | | | | | | QQmlTypeLoader references QQmlImportDatabase in a thread, so change the declaration order so QQmlTypeLoader is destroyed and its thread stopped before QQmlImportDatabase is destroyed. Change-Id: Idfa511cf9625f893c4398f419a74d869169b478d Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Cleanup: Remove last traces of QQmlScriptSimon Hausmann2014-03-191-0/+1
| | | | | | | | | | What remains is the code for removing .pragma from script source code (and replacing it with white-space to preserve line/column numbers). The previous code even returned the value of the pragmas, but for the remaining caller sites that value isn't used, so we can just return void. Change-Id: I16db15da236970660b817d6c4493005365a7a1af Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove old compiler and VMESimon Hausmann2014-03-071-5/+0
| | | | | | | | | | | | This removes the bulk of the code. A few smaller cleanups remain, to be done in smaller changes as they move code around. Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData, which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not do anything and the class is gone now :) Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Match class and file nameSimon Hausmann2014-02-161-2/+2
| | | | | | | QmlObjectCreator -> QQmlObjectCreator Change-Id: I23da2d9c7fa0dcd760f5cc695c1759b44d1e72f0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add dedicated QML profiler and adapterUlf Hermann2014-02-151-0/+3
| | | | | | | | The remaining "profiling" parts of the QML profiler service are engine specific and are best accessed through their own adapter. Change-Id: Idb763104bdd80e4dabdf132ec1a496b9bc9f6f46 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-25/+25
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Improve type interference for QObject propertiesSimon Hausmann2013-11-251-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Propagate QObject properties in member expressions across temporaries as part of the type interference SSA pass. This replaces the earlier attempt to resolving QObject properties in fieldMemberExpression() in the codegen, but it was incomplete and now things like the following are fully resolved: var tmp = blah.somePropertyThatReturnsAQQuickItem; <-- QQuickItem property return type propagated into tmp var width = tmp.width; <-- and picked up here again to resolve the index of width instead of by name With this patch Temp gets a helper structure with a function pointer, initialized to aid the resolution of properties in Qt meta objects. This structure is propagated into the temps until it reaches the next member expression that uses the temp. Similarly QObjectType is added as IR type, next to VarType. The resolution inside the SSA type interference pass also requires passing through the QQmlEngine from the upper caller levels, in order to resolve the property type to a potential QMetaObject property. Change-Id: I14c98fa455db57603da46613ce49c174d0944291 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix crash on QQmlEngine destruction.Robin Burchell2013-11-251-1/+1
| | | | | | | | | | QQmlTypeLoader references QQmlImportDatabase in a thread, so change the declaration order so QQmlTypeLoader is destroyed and its thread stopped before QQmlImportDatabase is destroyed. Change-Id: If1f8ef0a5ce56103a417ecfb6897d2c3b9c8d364 Done-with: Andrew den Exter <andrew.den.exter@jollamobile.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make QQmlIncubatorPrivate refcountedLars Knoll2013-10-151-2/+2
| | | | | | | | | This fixes possible bugs and crashes where the incubator could get deleted through GC while constructing the component. Change-Id: Ibe0c5d4e172f0b5505ace0c3ea0369169b8b48a5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* [new compiler] Add support for finalization callbacksSimon Hausmann2013-09-201-0/+5
| | | | | | | | | | | This is needed for Component.onCompleted (the signal emission) as well as the private finalization callback API in QQmlEngine, used by QtQuick. The creator - similar to the VME - tracks the attached properties object of QQmlComponent through a linked list. Change-Id: I8ada94009a7ce2078feefd359485657626c300fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Beginning of a new qml parserSimon Hausmann2013-09-081-0/+1
| | | | | | | | | | | | | | The goal is to parse QML and JavaScript binding expressions/functions in one go and generate data structures that allow for the parsing to happen in a thread and the instantiation of the object tree in another thread, just reading from the generated data structures. This will replace qqmlcompiler and the VME. This new way of loading QML is currently hidden behind the QML_NEW_COMPILER=1 environment variable. There's lots of work left to fill in the gaps in object construction, Component support, Component.onComplete, error messages, etc. etc. Change-Id: I5e40643cff169f469f0b6ce151584ffee5ca5e90 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-1/+1
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-241-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * Add qmlClearRegisteredTypes FunctionAlan Alpert2013-05-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | Registered types are stored in a global static variable, not on an engine instance. For applications managing multiple engines over their lifetime, there needs to be a way to clear the existing types so they can register new ones and avoid memory leaks. Task-Number: QTBUG-28572 Change-Id: Ic70a4dd1e29d99399b21fb42eaf10d4a52bf2adf Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
| * Add a URL interceptor to the QML engineAlan Alpert2013-05-071-0/+2
| | | | | | | | | | | | | | | | Allows for custom file handling to a greater extent than the QNetworkAccessManager. Change-Id: Ifd3946bf33530c40ca2edeeb9f441f712e4941f6 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* | Move QV8QObjectWrapper::newQObject into QV4::QObjectWrapperSimon Hausmann2013-06-051-1/+10
| | | | | | | | | | | | | | | | ...where it is just called wrap(), because it doesn't always create a new JS wrapper for the QObject. Change-Id: Ieed0fc97174eb51cd04df0149e715c234a5822bd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove some leftovers from the v8bindingsLars Knoll2013-05-291-3/+0
| | | | | | | | | | | | | | | | The shared context concept was only used there, so remove code that was referring to it. Change-Id: I5ae56049a83818c898ef1cc4e68a5333a9374656 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | convert QV8VariantWrapper to v4Lars Knoll2013-05-171-13/+0
|/ | | | | | | | | Implement variant support through a QV4::VariantObject class. Port scarce resource support for the pixmap and image variants. Change-Id: Ib6aac8debc7f57224ccddb912ab4342c5f1dec15 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add Composite Types to QQmlTypeAlan Alpert2013-02-181-2/+2
| | | | | | | | | When a composite type is loaded from a QML file, it now generates a QQmlType entry in QQmlMetaTypeData. Change-Id: I9b127dff7955456aacb25138fa6ea8efb7bb9221 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Add designer support for animations and componentCompleteMarco Bubke2012-11-221-0/+4
| | | | | | | | | In the designer animations confuse users, if you change a state or move a item around. Also component complete is called later by the designer. The call in the VME is to early. Change-Id: I49aa04edbc49fb44ddb7b52062307982865efd7e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* doc: fix some more typosSergio Ahumada2012-09-101-1/+1
| | | | | Change-Id: I7fa055049b9e5900d597754c6004febb153de12b Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Refactor singleton type registration codeChris Adams2012-08-281-4/+0
| | | | | | | | | | | Previously each singleton type was registered as an implicit separate import. This commit changes the code so that these types are treated just like any other type in the registration sense. It also ensures that singleton types are instantiated per-engine. Change-Id: I5c81c4ca5bf65210f7125d74a62a282a21838068 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Permit value types with metatype IDs >= QMetaType::UserMatthew Vogt2012-08-101-2/+0
| | | | | | | | | Remove the assumption that value types must be types defined by Qt, having metatype IDs below QMetaType::User. Task-number: QTBUG-26352 Change-Id: Ib5a56ff2e7892e82adf17a3a1e7517a0c9fe0534 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add type name to singleton (module api) implementations.Glenn Watson2012-08-081-2/+2
| | | | | | | | | | | | | This change renames the previous module api implementation to singleton types. When a singleton type is registered, a type name must be provided that is used when accessing the API from QML. This makes the implementation more consistent with the rest of QML. Task-number: QTBUG-26549 Change-Id: Iab0bb1ccf516bd3ae20aee562a64d22976e0aecd Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Put basic language types into QtQml importChris Adams2012-06-211-1/+2
| | | | | | | | | | This import is automatically registered by the engine. It provides basic language types (Component and QtObject). Note that the QtQuick import still has these types registered into it, so this commit doesn't break existing code. Change-Id: I8ff190f057fc92969020cf8e896da1649ca3069b Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Delay conversion of v8 exceptions to QQmlErrors.Michael Brasser2012-06-051-0/+2
| | | | | | | | | This conversion in relatively expensive, and not required for transient exceptions that occur during startup due to the order of binding evaluation. Change-Id: I29a16c075890c8966c0bad0a77412ad232c791bb Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Reduce size of QQmlNotifierEndpointAaron Kennedy2012-05-241-2/+1
| | | | | Change-Id: I4d4a22f5f3d88d4ad2fcd738753fd8da2d8a9263 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Lazily create QMetaObjectsAaron Kennedy2012-05-241-10/+7
| | | | | | | | | | For internal QML built types, creating a metaobject each time is just wasteful. Additionally, as the property caches were always created from the intermediate QMetaObject, it was difficult to pass information directly from the compiler to the property cache. Change-Id: I769526b0edaaf16a86883f3065b75618b94e4077 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Remove unnecessary exportsMatthew Vogt2012-05-181-1/+1
| | | | | | | | | Reduce library load time by removing any exports which are not required by existing clients. Task-number: QTBUG-24768 Change-Id: Ia5754d6f97bb2ed46e290820a5b092f85a4bc5b0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add QQmlEngine::trimComponentCache()Matthew Vogt2012-05-171-2/+11
| | | | | | | | | | | | Allow unused data in the engine's component cache to be safely discarded so that the memory can be freed for other purposes. Unloading of scripts that are no longer required after trimming unused components is not yet supported. Task-number: QTBUG-25653 Change-Id: I37bc9d5592eeb5edceeb34d010a555dcffd11cea Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Inspector:Modified Apply changes on Save for unsync. changesSimjees Abraham2012-05-141-0/+17
| | | | | | | | | | Changes done to reload the view if the user opts to do so after making unsynchronizable changes. Inspector informs the QmlEngine about the changes which caches it. The cache is used to load the files which were changed when reloading the view. Change-Id: I22d476cace294d6ecf4e428dac104a557c3f7dde Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Defence programming: add more assertsCharles Yin2012-05-091-2/+10
| | | | | Change-Id: If432e09ce1c4e556a6b0265ca7255ad5325d0e5d Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Initial bundle supportAaron Kennedy2012-05-041-3/+0
| | | | | Change-Id: I095249f64ecf4ef1e3fbfb164e3d50edffab61e8 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Support and use parameters in QQmlNotifierEndpoint.Michael Brasser2012-04-231-1/+1
| | | | | | | | | Allow QQmlNotifierEndpoint to support signals with parameters. Update QQmlBoundSignal to use this support. Change-Id: Ie2a245b39283b0b66d66bd2350e8bc85fe519bb5 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Remove uses of QtGui symbols in QQmlEngine.Matthew Vogt2012-03-071-6/+1
| | | | | | | | | Move the code dealing with QImage and QPixmap out of QQmlEngine and into the QtQuick library. QQmlEngine remains the owner of image provider resources, but does not use them directly. Change-Id: I52083581394d9c308db446372883eb7479ccf807 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+522
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>