aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvme_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused QBitField classFabian Kosmale2021-03-041-1/+0
| | | | | Change-Id: I441dc66a94656afdea6569dcdde1bdf8e701213b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qqmlvme: remove dead codeFabian Kosmale2021-03-041-26/+0
| | | | | Change-Id: I4e862f2bf5d05987482345699da4952566ead124 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-12-161-1/+1
| | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtDeclarative. As the two are synonymous, this patch should have no impact on users. Task-number: QTBUG-86829 Change-Id: I5bb418483a3b06619abb4ff62cf0290a7b3bcd4f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlIncubator: remove deprecated codeFabian Kosmale2020-06-091-11/+1
| | | | | | Change-Id: I2aecdf789775c2363fb7990153951b45e2c42408 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Encapsulate QQmlContextDataUlf Hermann2020-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is not a private detail of QQmlContext. And it is incredibly hard to see who owns what in there. Let's add some civilization ... We enforce refcounting for QQmlContextData across the code base, with two exceptions: 1. QQmlContextPrivate may or may not own its QQmlContextData. 2. We may request a QQmlContextData owned by its parent QQmlContextData. For these two cases we keep flags in QQmlContextData and when the respective field (m_parent or m_publicContext) is reset, we release() once. Furthermore, QQmlContextData and QQmlGuardedContextData are moved to their own files, in order to de-spaghettify qqmlcontext_p.h and qqmlcontext.cpp. When the QQmlEngine is deleted, any QQmlComponents drop their object creators now, in order to release any context data held by those. Before, the context data would be deleted, but the object creators would retain the dangling pointer. [ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does what the documentation says now: It prefers explicitly set baseUrls over compilation unit URLs. Only if no baseUrl is set, the CU's URL is returned. It used to prefer the CU's URL. Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlIncubationController: remove a possible signed integer overflowGiuseppe D'Angelo2019-10-221-7/+7
| | | | | | | | | Port incubateFor / incubateWhile to qint64. Since the implementation was doing calculations in nanoseconds, a few seconds incubation was sufficient to cause an int overflow. Change-Id: Iba68260a1fd62613aec17ba990ead221c0f7da10 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQmlIncubationController::incubateWhile: port to atomic<bool>Giuseppe D'Angelo2019-10-211-11/+24
| | | | | | | | | | "volatile bool" does not guarantee synchronization, and as such, the documentation (and the intended use case, having another thread stopping incubation) are wrong. Add a different overload that takes a std::atomic<bool> as a replacement. Change-Id: I05e2d608385d075ef67989839d6c0a634da7a64b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Internally document the VME abbreviationMitch Curtis2018-04-271-0/+4
| | | | | | | This makes reading the code less confusing. Change-Id: Id49de8ff6645d5e1d66eb07d36c3b322dbb60c68 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-3/+3
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Revert "Allow canceling incubation"J-P Nurmi2018-01-171-1/+0
| | | | | | | | | | | This reverts commit ca6b787a01ea289bd5c2a3e4ff3c7442a4ff58fc. This internal API was added as a workaround for Qt Quick Controls 2. It is no longer needed now that Qt Quick Controls 2 are using deferred execution. Task-number: QTBUG-50992 Change-Id: Iaddf22460f091743e1a68acd16813a28f3e82ecb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Allow canceling incubationJ-P Nurmi2017-01-241-0/+1
| | | | | | | | | | | | Qt Quick Controls must avoid destroying any object that belongs to a tree of objects being incubated. The problem is that QQC have no control over the incubation process. This patch adds private API that allows QQC to cancel incubation of a specific item that QQC would like to destroy. Change-Id: Id9f9004736e2b53fe46cdb6bb3055b7457def94d Task-number: QTBUG-50992 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove QQmlCompiledData in favor of QV4::CompiledData::CompilationUnitSimon Hausmann2016-06-011-3/+1
| | | | | | | | | QQmlCompiledData used to contain the binary data for instantiating QML types in the QML VME. Nowadays the QML type compiler as well as the JavaScript compiler create a QV4::CompiledData::CompilationUnit. Change-Id: I155f62a5ecfb55a3fe230520231b6d8fd5b28ac9 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* QML: Drop unnecessary includeUlf Hermann2016-04-251-2/+0
| | | | | Change-Id: Ife8187cc2f052cf76c528cd35efa509f306129cb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* 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>
* Remove QQmlTrace. We have a real profiler.Erik Verbruggen2015-01-091-1/+0
| | | | | Change-Id: I50d981b277187327c2c63f8372f64db1300ed9ef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove use of anonymous struct in header fileKai Koehne2014-09-011-4/+2
| | | | | | | | | | | | | Although all compilers seem to support this, anonymous structs have only been added formally to C++ 11. Also, this breaks with a change that adds a constructor to QElapsedTimer: error: member 'QElapsedTimer QQmlInstantiationInterrupt::<anonymous struct>::timer' with constructor not allowed in anonymous aggregate QElapsedTimer timer; ^ Change-Id: I5672060e3a623a5d9c4eb1d4e2981c67b96a1192 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>
* Remove old compiler and VMESimon Hausmann2014-03-071-57/+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-1/+1
| | | | | | | QmlObjectCreator -> QQmlObjectCreator Change-Id: I23da2d9c7fa0dcd760f5cc695c1759b44d1e72f0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add dedicated QML profiler and adapterUlf Hermann2014-02-151-1/+1
| | | | | | | | 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>
* [new compiler] Fix tst_qqmlincubator::deleteContextSimon Hausmann2014-02-071-0/+1
| | | | | | | | Protect against QQmlContext deletion during incubation re-using the existing QQmlContextGuard. Change-Id: Ia1c0241029765cc2e00a9b0ffcf484127de20606 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Allow for interruption during object finalizationSimon Hausmann2014-02-071-26/+26
| | | | | | | | | The object tree construction and binding allocation remains synchronous, but the initial evaluation of the bindings is now cooperatively interruptible again, like in the VME. Change-Id: Idd037dd481782c81ad43e20e93d922eb12ac8b85 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-1/+1
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use the new object creation profiler in qqmlvmeUlf Hermann2013-11-291-0/+2
| | | | | | | | | | | | | | There are 3 ways to create objects: "Simple", "Cpp" and "Qml". This patch starts a new profiler whenever a new object is created. It's assumed that everything the interpreter main loop does between two creation instructions is related to the object just created. The componentComplete calls are profiled by restoring saved states of the profilers used during the creation of the respective objects. Task-number: QTCREATORBUG-10631 Change-Id: I2645eab7ba32dfb8749cb51ec888d0f0e8fef188 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove duplicated forward declarationLars Knoll2013-10-151-1/+0
| | | | | Change-Id: Ie3c4e7d500dc9d327aa081c8f701d88ca6d4ca40 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix support for JS imports in QML files in the new compilerSimon Hausmann2013-09-301-1/+0
| | | | | | | | | | | | Remove the v4 value initialization for imported scripts code out of the VME (the method didn't even need any members of the VME class) and into ScriptData, for re-use on the QmlObjectCreator side. Also add the script index setup for the import cache (used by qml context wrapper) to the type loader. Change-Id: Idc3953a48f6fb66d008008e88a2b9b556c775537 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/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * DesignerSupport: Adding separate flag for component completionThomas Hartmann2013-04-111-0/+6
| | | | | | | | | | | | | | | | The designer should only disable completion of components if the component is created directly by the designer. Change-Id: Id86d2b2f2e61355240bdbbb7875db3e97fb0da17 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
* | Remove last traces of v8 API and v8 compatibility layerSimon Hausmann2013-06-121-1/+0
| | | | | | | | | | | | | | | | The debugger and profiler service remain as bigger parts that need to be ported properly to v4. Change-Id: I68e72d6db66fe497eb58ed60df417ffe4662d115 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove more v8::Persistent usagesLars Knoll2013-05-071-1/+1
|/ | | | | Change-Id: Ifa1706e2e609ded86a8bc1a840ca2ed36b869098 Reviewed-by: Simon Hausmann <simon.hausmann@digia.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>
* Declare type information for some internal qml types.Jędrzej Nowacki2012-11-271-11/+14
| | | | | | | | | QQmlVME::State and QBitField are movable and used in QStack. Declaring them as movable may improve potential reallocation time, although it is hard to prove. Change-Id: Ia42b8104e2f24ca7574370c76084df44b9f9298e Reviewed-by: Alan Alpert <aalpert@rim.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>
* Make the instruction table be constThiago Macieira2012-09-131-2/+2
| | | | | | | It's never going to be modified, so it should be const. Change-Id: Ibc3bac0583f72ccbf7caa69aeab029bae03d3cdd Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Contruct per-delegate QQmlContextData directly.Andrew den Exter2012-05-241-1/+1
| | | | | | | | | | The QQmlContext object created per item is a weighty (QObject) wrapper around QQmlContextData that isn't utilized except as an intermeditrary for the QQmlComponent API. By duplicating a little code out of QQmlComponent we can avoid the need to ever contruct the wrapper. Change-Id: I74558c7e746ead2c5127a8754d5f04550b8f4d10 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-13/+11
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+240
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>