aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Expose "Qt.application.state".Yoann Lopes2013-09-171-8/+45
| | | | | | | | | | | | | | | | | | | | | | This deprecates Qt.application.active. The new property can indicate more states than just active or inactive (currently Suspended and Hidden exists in addition to the aforementioned). Change-Id: I8d5bf72f89a357c13daf1625c20e8e7311dac013 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Beginning of a new qml parserSimon Hausmann2013-09-081-0/+2
|/ | | | | | | | | | | | | | 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>
* Merge branch 'stable' into devSergio Ahumada2013-09-061-1/+2
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv8debugservice.cpp src/qml/qml/v8/qv8engine.cpp tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic4a1dcdd8b8a84155d2f2abefdf1da5c3a56af31
| * Debugger: Fix crash when app exits while debuggingKai Koehne2013-08-211-1/+2
| | | | | | | | | | | | | | | | Make sure we don't access an already deleted v8engine any more. Task-number: QTBUG-33100 Change-Id: Ic517577ae30b41375cbf9f787cfe0a29121171e2 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* | Don't crash with deferred propertiesAlan Alpert2013-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | There are cases where a qmlExecuteDeferred(o) can be postponed until the context of o is being destroyed, at which point it's too late to create an object in that context. Task-number: QTBUG-33112 Change-Id: I7f981b5e34e3cb8a52c00de4742a7242d7e4df54 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-08-061-4/+1
|\ \
| * | Merge branch 'stable' into devSergio Ahumada2013-08-051-4/+1
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I06f79bcbde13c7b12905492a17dbcbb4a594e557
| | * Doc: Modified the term for the Qt global object.Jerome Pasion2013-07-251-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtQml::Qt is a "QML global object" to differentiate it from the Qt namespace. "QML Qt object" "QML Qt global object" "Qt global object" (in the context of QML-only pages) Change-Id: I1d2896ad48e8432c5eb8b18f05af247986bff336 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-221-6/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/quick/items/context2d/qquickcontext2d.cpp tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-041-3/+0
| |\| | | | | | | | | | Change-Id: I15cb7460171b38d11d66367aeb0831ec6e3ca933
| | * Fix access to invalid memory in ~QQmlEnginePrivateKai Koehne2013-07-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ~QQmlEnginePrivate tries to set incubationController->d to 0. However, we're already setting the backpointer (q) of incubationController to 0 in ~QQmlEngine, so that the IncubationController destructor might run in between without being able to reset incubationController. To fix this, just handle the unsetting of incubationController once, in ~QQmlEnginePrivate. Task-number: QTBUG-32161 Change-Id: I43a72dcfc0f95938ebfa67d3998adff1fb2d05a1 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * | Add Qt.application.organization/domainJ-P Nurmi2013-06-291-1/+9
| | | | | | | | | | | | | | | | | | Change-Id: Ic4a161b59d51e621e13c960f104d1a3be2ee64f8 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-271-2/+2
| |\| | | | | | | | | | Change-Id: I59f34fafd795694981dd1edffca1d322657f1ae6
| | * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-251-2/+2
| | |\ | | | | | | | | | | | | Change-Id: I6e060496b8c252fb4e2d5d2d40ae16bf950e2ec4
| | | * QQmlPlatform: rename "mac" to "osx"J-P Nurmi2013-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie458690b8008b211785cf9dcc0312a7e25c84f6b Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@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-16/+93
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-201-2/+2
| |\| | | | | | | | | | | | | | Change-Id: I5cc2cacd26004ba18f0c6214759f5e073b5c6cfb
| | * | fix case insensitive issue with image provider idTasuku Suzuki2013-06-181-2/+2
| | |/ | | | | | | | | | | | | | | | | | | Task-number: QTBUG-31614 Change-Id: I866df6e3ed6226b443640a51f66a3dbb92b31249 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-281-10/+87
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/doc/src/appdevguide/porting.qdoc sync.profile Change-Id: Iec5516c596c3eca60a3e6ceb1d45f2a7a1595c12
| | * Partial fix for deferred properties when combined with componentsAlan Alpert2013-05-221-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current deferred properties implementation did not store context or compiled data pointers correctly. Those pointers are now stored when the defer is reached, so as to avoid confusion (confusion leads to asserts or crashes). Does not extend the deferred property support to allow multiple deferred blocks per item. This now prints and error and the side effect is only that one of the deferred blocks is lost. This use case is sufficiently rare that it may not be worth the cost. Task-number: QTBUG-30325 Change-Id: I80cb074ed4452e95020208a0142a91e721bced7d Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Do not use an export macro in the function definitionThiago Macieira2013-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmlExecuteDeferred is exported using Q_QML_EXPORT in qqml.h, so we don't need to use one here. Better not have any than have the wrong one, which can cause problems. Cherry picked from d6d2074ff in qtquick1 Change-Id: Ief978feb503b7381ed462f71ebbd7986bd6862c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Move exports conflicting with QtDeclarative into namespaceKai Koehne2013-05-151-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move exported qml* symbols that conflict with QtDeclarative into an - automatically imported - namespace. This ensures apps can link against both QtDeclarative and QtQml. To keep the BC promise the old symbols are still exported. Task-number: QTBUG-29584 Change-Id: I3d31c36ca4e2faaf6f5d67a77c5c5a304c0338a4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| | * Doc: Define Qt global object as a QML type and fix referring docsTopi Reinio2013-05-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the Qt global object as a QML type in the Qt QML module and fixes links to it in documentation. Task-number: QTBUG-29353 Change-Id: I1690224091a79a3309fac7a78aa0c0c734449e4f Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * Add qmlClearRegisteredTypes FunctionAlan Alpert2013-05-071-3/+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-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | Allows for custom file handling to a greater extent than the QNetworkAccessManager. Change-Id: Ifd3946bf33530c40ca2edeeb9f441f712e4941f6 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
| | * Document percieved memory leakAlan Alpert2013-05-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QJSEngine doesn't call collectGarbage upon deletion, because this operation can be expensive and in most cases the JS engine is deleted during application shutdown, when the memory can be deallocated cheaper. This can lead to an apparent memory leak if multiple engines are created and destroyed in the same process. Documenting how to avoid this. Change-Id: Ie02cb8bedc8821e0bb04dfa52a5a2d65b4b085a3 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
| * | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-05-031-2/+2
| |\| | | | | | | | | | refs/staging/dev
| | * Doc: Create links to Qt Quick 1Sze Howe Koh2013-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Point to the porting guide, so that users who search for the old names will be directed to an explanation of the name change. Also made some new links to Qt Quick 2, and changed "favour" -> "favor" (Sanity Bot complained) Change-Id: If30c8d619d8fdb9df72b7b5f3efd356f1e07b23a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * Doc: Qt Quick: Fix module name format (Pt 2/2)Sze Howe Koh2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Attempt to differentiate between the whole module ("Qt Quick") and the QML import ("QtQuick") by encoding the latter with monospace font. There are places in the text where both representations are valid. Change-Id: If398304757e0a5106542c09099e1814084e54c5c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * Doc: Qt Quick: Fix module name format (Pt 1/2)Sze Howe Koh2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Attempt to differentiate between the whole module ("Qt Quick") and the QML import ("QtQuick") by encoding the latter with monospace font. There are places in the text where both representations are valid. Change-Id: Id6e157a4191aaa4e23a9cd5c76abfe902fe43d33 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * | Adjust ifdefs to accommodate WinRTAndrew Knight2013-05-031-1/+1
| |/ | | | | | | | | | | | | | | | | | | Slight preprocessor changes for the upcoming platform. Change-Id: Ia13ef22f511afa781d31a759f75eae4d745558fa Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Doc: Reassigned types and pages to their correct modules.Jerome Pasion2013-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 1)Moved classes and basic types to \module QtQml 2. -QQml* classes are in QtQml 2 for 5.1 2)Removed \inqmlmodule commands in overviews and tutorials. -Only QML API should have \inqmlmodule commands because they are added to the auto generated list of types. Change-Id: I9aa3ca8062fa9fed76734885829879122841b119 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Cleanups in QObject bindingsSimon Hausmann2013-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | * Rename v8object to jsWrapper in QQmlData * Rename v8objectid to jsEngineId, as that's the identifier of the engine that currently owns the primary JS wrapper This is in preparation for moving newObject away from QV8QObjectWrapper Change-Id: I6432365e849d159600e22f09e7e2ab2ae2117db6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove some leftovers from the v8bindingsLars Knoll2013-05-291-1/+1
| | | | | | | | | | | | | | | | 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>
* | Port Qt.include() over to v4Lars Knoll2013-05-241-1/+1
| | | | | | | | | | | | | | | | | | Still doesn't quite work as it should, but that's no regression to before neither. The reason is that the context handling is still v8 based and needs to be rewritten. Change-Id: I51216f93d6db4ba26f8adddaeb39d8a8c62df7ee Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup QQmlDelayedErrorLars Knoll2013-05-211-2/+2
| | | | | | | | | | | | | | | | Remove dependency onto v8::Message and simplify conversion from QV4::Exception to QQmlError. Change-Id: Icfdfd7a2749210b2df9fda6cd5de94114b8adcfa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | convert QV8VariantWrapper to v4Lars Knoll2013-05-171-2/+3
| | | | | | | | | | | | | | | | | | 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>
* | Remove more v8::Persistent usagesLars Knoll2013-05-071-5/+1
| | | | | | | | | | Change-Id: Ifa1706e2e609ded86a8bc1a840ca2ed36b869098 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Rename QQmlV8Handle to QQmlV4HandleLars Knoll2013-04-191-1/+1
|/ | | | | | | | | The handle wraps a V4 Value, so this is the better name for it. Also added some accessor methods to convert to and from V4 Values. Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add Instantiator type to QtQmlAlan Alpert2013-03-201-0/+2
| | | | | | | | | Provides a dynamic instantiation type which is not tied to visual items. Change-Id: I42f7332b29b752dcc94979b6e0ec191fc76b96ef Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add QQmlApplicationEngineAlan Alpert2013-03-201-0/+10
| | | | | | | | This helper class exposes QML application functionality that QML-only applications want to have, but QML-using applications may not. Change-Id: If91c3f55ffa2a4aecdd9d6cc62f6ad09fd35b0dd Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Move QML types to types folderAlan Alpert2013-03-141-1/+1
| | | | | | | | | The QtQml module has gain a bunch of QML types cluttering up the qml folder. Moving them to types organizes them a bit better. Change-Id: I570884c00f4abc48f4f1aea048bf002bc70223f3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add QtQml.Models moduleAlan Alpert2013-03-121-9/+9
| | | | | | | | | | | The moved Model classes can now be exposed in a QtQml import. To keep the QtQml import resticted to more core functionality, they are being exposed in a plugin module. Change-Id: I0a84642a72c7c9bbf9b6ffd2a6c33549f8e61c29 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add core application functionality to Qt.application in QMLAlan Alpert2013-03-051-1/+19
| | | | | | | | | | | | | | This exposes some information to QML which is available on the QCoreApplication instance. A future change should make it possible to restrict this for use in scripting environments (which should not have access to the QCoreApplication). That has been left out of this change because proper support for such restrictions is not yet in place. Change-Id: Ica144fcfb0b42fa6df8d0cb1c7c03eb97282b489 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Kai Koehne <kai.koehne@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>
* Add QQmlPlatform (exposed as Qt.platform)J-P Nurmi2013-02-141-0/+31
| | | | | | Change-Id: If34603fd8fbd907bc063b52ea31848eabdb49f61 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Move the model classes from QtQuick to QtQmlAlan Alpert2013-01-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | This is needed for proper support of non-GUI instantiators in QtQml. Only private C++ classes are affected. Aside from name changes, model classes now operate on QObjects instead of QQuickItems, leading to minor changes in the implementation of QtQuick classes using them. The old QML type names will still be registered in the QtQuick import for the forseeable future, but pointing to the new classes. The new QML types will be added in a second commit. Classes Affected: QQuickVisualDataGroup -> QQmlDataGroup QQuickVisualDataModel -> QQmlDelegateModel QQuickVisualItemModel -> QQmlObjectModel QQuickVisualModel -> QQmlInstanceModel QQuickChangeSet -> QQmlChangeSet QQuickListAccessor -> QQmlListAccessor QQuickListCompositor -> QQmlListCompositor QQuickPackage -> QQuickPackage (just moved for now) Change-Id: Ia19e630e53bfa9e5d459e289596cd11df1ea3930 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Move ListModel and ListElement to the QtQml importAlan Alpert2013-01-241-3/+3
| | | | | | | | | | | | They're already in the QtQml module, but were left in the QtQuick import because they were considered to be of minimal use without QtQuick types. QtQml types are being developed would could make ListModel useful without QtQuick, indicating that they should no longer be considered QtQuick depedent. Change-Id: I31499f2cc23baf4bc70fb451ba164408bed89ff6 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* 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>