aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* V4: make QQmlEnginePrivate::dereferenceScarceResources inlinable.Erik Verbruggen2016-05-041-22/+10
| | | | | | | | Done by giving the "expensive" part its own function, that's even unlikely to be called anyway. Change-Id: I35621fb0a764879f9339b9e23f210c66971ff5b7 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QML: add some hot-path hints for the compiler.Erik Verbruggen2016-04-051-1/+1
| | | | | Change-Id: Ic68691639e81a8450311c03e86bcde14e7bd7dd4 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QML: allow more methods to get inlined.Erik Verbruggen2016-04-051-19/+0
| | | | | | | | Most of these methods are small, and all of them lie in the 'hot path' for simple bindings like 'width: parent.width'. Change-Id: I0071cec92b49437a352160b0283ed6c89a278a07 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-191-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp tests/auto/quick/qquickgridview/tst_qquickgridview.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I3cf47faa2fe567d62fffd985aeecbefe5811cc42
| * Revert "Fix crash on QQmlEngine destruction."Robin Burchell2016-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e75be5f64fb21cbbdff3353dbd507c2ca26946a. This patch was originally written by Andrew den Exter in 222e06bf4ed509e72c1533cbe1d4859ca96933f3, externally from the main Qt tree. I upstreamed this as part of our porting efforts. Some time later, this was accidentally reverted in 2e75be5f64fb21cbbdff3353dbd507c2ca26946a: we can't go back in time to examine exactly what happened, but presumably Andrew didn't notice that I had upstreamed this, attempted to apply the patch and ignored the "already applied" warning by accident - and continued on dutifully with the patch accidentally reverted. This change is correct, though, and is thus reinstated. Change-Id: Idfe6ab39ad011f0401de25fe056aa3eb3fb8b424 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2016-01-221-1/+1
|\| | | | | | | Change-Id: I4af0bf8ec1569097d97f8ce0bb8bf1a0e4a989ec
| * Doc: typo fixJoerg Bornemann2016-01-121-1/+1
| | | | | | | | | | Change-Id: Ida2e39f2eb1744173cd40b4a29f3304c2a2bfd6c 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>
* | tvOS supportMike Krus2016-01-011-0/+1
| | | | | | | | | | | | Change-Id: If48e8bcf55781d1148e15ce19e07cfbe35d829d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | Support debugging and profiling for pure QJSEnginesUlf Hermann2015-12-151-8/+2
| | | | | | | | | | | | | | | | | | | | | | The engines will register themselves with the debug server whenever they are created without a private object. The assumption is that we get the latest possible registration like this. They try to deregister in all dtors, but they check if a different engine has done the same first. Change-Id: Ife7d7532d1de2e4a6ee21d9f7e673fcdfff2387b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-071-1/+1
|\| | | | | | | Change-Id: Ica75a71062d0613e415f2433c5c22c2e251b37cd
| * Make property interceptors work on alias properties againLars Knoll2015-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression introduced by change 01c0c0963794f4dd8c3601e8340cc3dc4dec41bd, where interceptors wouldn't work correctly on alias properties. This required some refactoring and splitting out the interceptor handling from the VMEMO into it's own class, as we are now installing bindings directly on the target property of an alias and not on the alias anymore. We now resolve the target property inside the QML object creator and install a interceptor metaobject on the target if required where we can then register the interceptor. Change-Id: I3ebc8f492ce5dcab7acf901711b47336d5182ffa Task-number: QTBUG-49072 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-211-0/+3
|\| | | | | | | Change-Id: I3567f741394f912d4312460e85555b6c39b61cb4
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-171-0/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/quick/util/qquickimageprovider.cpp Change-Id: I7ca4e49468b5ba697208287be4684e42b9900023
| | * Don't normalize the path via the shell if it is a qrc based pathAndy Shaw2015-11-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a qrc based path to shellNormalizeFileName() was causing problems with the Windows API. Since it won't change the path in this case anyway because the path is not valid on the file system then there is no need to do any checking. Task-number: QTBUG-46248 Change-Id: If20075c25aade3740287250b4e1f31538b398f8f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-031-0/+4
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: I1de8832fefd0e45fea16ca072b6c7ae44fa376d4
| * | Doc: added required include statement QtQmlNico Vertriest2015-10-301-0/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-48172 Change-Id: I571a2a28856c95e4293c526aefc8e7ca8c88a0aa Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-141-4/+7
|\| | | | | | | | | | | Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
| * | Make QML composite types inherit attached propertiesJ-P Nurmi2015-10-091-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe Task-number: QTBUG-43581 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-1/+1
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| | * Document that modifying the globalObject of QQmlEngine is not supportedMitch Curtis2015-09-091-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I62feb04ae26b6988c6e392b27bd1c3b7f630fd57 Task-number: QTBUG-48175 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Add enabled property to the QML Connections elementDan Cape2015-09-091-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | Now allows a quick way to enable/disable the signal handlers in the QML Connections element. Updated test file to have objectName and added test for this new functionality. Set to be available as of QtQml2.3. [ChangeLog][QML Elements] Allow enabling/disabling of connections established using a Connections element Change-Id: Ib0de2b3c78bb529ef74d5b4bb4ccb0f335cc50de Task-number: QTBUG-36350 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-181-9/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv4debugservice.cpp src/qml/jsruntime/qv4value_inl_p.h src/qml/jsruntime/qv4value_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/qml/qqmlnotifier_p.h src/qml/qml/qqmlproperty.cpp src/quick/items/qquickflickable.cpp src/quick/items/qquicktextedit.cpp tests/auto/quick/qquickwindow/BLACKLIST The extra changes in qqmlbinding.cpp are ported from changes to qqmlproperty.cpp that occurred in parallel with writeBinding() being moved to qqmlbinding.cpp. Change-Id: I16d1920abf448c29a01822256f52153651a56356
| * Doc: added documentation to undocumented methodsNico Vertriest2015-08-041-0/+15
| | | | | | | | | | | | Task-number: QTBUG-36985 Change-Id: Idc6f7961f4f02f66dc3d4a8e5d09dd15d43b7757 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
| * Fix possible stack overflow with many property bindingsEskil Abrahamsen Blomfeldt2015-07-211-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are a lot of bindings to the same property (like 20 000), we would get stack overflows because the notify list for the changed signal was traversed recursively. Changing this also speeds up the traversal. I see something like ~40% reduction in the case of layout() for a notify list of around 200 items. Note: To make it possible to traverse the double-linked list backwards, the next-pointer needs to be moved to the beginning of the struct, because the implementation pattern assumes this (node->next->prev = &node->next). I think this code has rotted after it was added, since the prev pointer was never actually used anywhere before. Change-Id: Icdfac50b7c8584a908efa65694c7f5f416cb153b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * QtQml: Fix const correctness in old style castsThiago Macieira2015-07-091-1/+1
| | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Make argument to QQmlDebuggingEnabler::startTcpServer an enumUlf Hermann2015-06-101-7/+18
| | | | | | | | | | | | | | | | | | The bool argument is less intuitive as you don't know if e.g. true means "Yes, run the QML" or "Yes, block the QML engine". Task-number: QTBUG-46565 Change-Id: I6d268e1354cebeb794b065e118bc0c353d7dd59a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Only heap allocate binding bits storage if needed.Aaron Kennedy2015-04-271-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For samegame, this has the following change on the total bytes allocated: Startup (main page): Before: 1636 After: 1072 Difference: 564 bytes (-34%) Actual game (single player): Before: 14120 After: 10432 Difference: 3688 bytes (-26%) Done-with: Robin Burchell <robin.burchell@viroteck.net> Change-Id: I10fd1e9f1440dcff93aed06e2c77c2912bc7dd39 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> (cherry picked from commit 54a19db8d00b67044861c8ffd1d5b1e646658609) Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | qml: Avoid heap allocations due to QString::fromLatin1()Sérgio Martins2015-08-131-1/+1
| | | | | | | | | | | | | | By using QStringLiteral when the argument is a literal. Change-Id: Ib25042d10f3d9d0aca81af74cde0107aba4f9432 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Retrieve services from debug connector, not via static instance()Ulf Hermann2015-08-041-4/+4
| | | | | | | | | | | | | | | | | | This will allow us to remove the instance() methods and create the services from factories in plugins. Also, it allows us to remove the isDebugging member from QQmlEnginePrivate. Change-Id: Id9d9820a910902ecfdb1e8175e215093ce3d0965 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Move debugger initialization out of QQmlDebugServer and QQmlEngineUlf Hermann2015-07-301-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlDebugConnector has to check the parameters before deciding if (and what kind of) instance to create. It also has to add the services itself as we don't want to tie a specific implementation of QQmlDebugConnector to a specific set of services. Logic to load the services from plugins will be added in a separate change. Integrating the service initialization with the connector initialization enables us to load the services before the server thread startsi, which will simplify the thread synchronization. QQmlConfigurableDebugService has to recheck for blockingMode once it gets enabled as it cannot rely on being enabled right away anymore. It should have done that already before as it's possible to disable and re-enable services. Change-Id: I9d161d78836bae10d688a90b4c2a32efed320412 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Extract minimal interface from QQmlDebugServer and use it.Ulf Hermann2015-07-301-4/+4
| | | | | | | | | | | | | | | | | | | | This will allow us to move QQmlDebugServer into a plugin. The new QQmlDebugServer is the interface exposed to connection plugins. The interface exposed to services is renamed to QQmlDebugConnector, as technically it doesn't have to be a "server". Change-Id: Id508b8c0a6960228e889f45a437b73060392db39 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove static proxy methods from QQmlDebugServiceUlf Hermann2015-07-291-2/+1
| | | | | | | | | | | | | | | | | | They all internally map to one-liners and just add to binary size and complexity. Especially, the most used one, isDebuggingEnabled(), simply checks if there is a QQmlDebugServer::instance(). Change-Id: Ib269928e08506894d933f6696e34ff0d3acb048b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add option to use a local socket for QML debuggingUlf Hermann2015-06-261-21/+0
| | | | | | | | | | | | | | | | | | | | Using a TCP debug server comes with a number of drawbacks. It has a larger overhead than other connection types, the application has to be able to access the network and there has to be an open port we can find somehow. Change-Id: Ia7fb24006b89419988c6504797303d84c3aa1bbc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Save another pointer in QQmlBoundSignalLars Knoll2015-06-181-1/+1
| | | | | | | | | | | | | | | | | | isEvaluating is not really needed as it's tightly coupled to the isNotifying flag in the parent class. Use that instead, to get rid of it. Change-Id: Ic7274ac54e4d380567522c8a549b98d5ed1a1798 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Get rid of QQmlAbstractBoundSignalLars Knoll2015-06-181-2/+2
| | | | | | | | | | | | | | | | QQmlBoundSignal is the only class inheriting from it, so we might as well get rid of the abstract base class. Change-Id: I1b59a5d30d9a6ff1111e54f47530687b47f39d70 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Make bindings refcountedLars Knoll2015-06-101-8/+16
| | | | | | | | | | | | | | | | | | | | | | Refcounting our bindings greatly simplifies our memory management of the objects and ensures we safely clean them all up. In addition, it allows us to remove the m_mePtr and weak reference handling from QQmlAbstractBinding as we can safely handle this through the same mechanism. Change-Id: If23ebc8be276096146952b0008b62018f5d57faf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove more unused code from the QQmlEnginePrivateHolger Hans Peter Freyther2015-06-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | overloadError has always been false and the if (overloadError) was dead code. The code has been commented out for a long time and I started to extend the #ifdef. The QQmlError is only used inside the commented out code so I have removed the error param. This is fixing Coverity CID 10612. Change-Id: I48f36ede6ba615a34b15caefb0eea5d7e898f120 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | doc: Remove uses of \mainclassMartin Smith2015-06-071-2/+0
| | | | | | | | | | | | | | | | This qdoc command is deprecated. Change-Id: I4fd7ab301f1fa5b5b9b5db6a7d710ee2f147dfcb Task-number: QTBUG-46476 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | QQmlData: Don't detach QObject::children list.Robin Burchell2015-06-071-1/+1
| | | | | | | | | | | | | | Use a const iterator. Change-Id: I86177e866e3ec25c4201f9d9a36d23832b0b93db Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix build with QT_STRICT_ITERATORSSérgio Martins2015-05-151-14/+14
| | | | | | | | | | Change-Id: I3df6ac107cb46b3a1b15b80f39d7c6015adcd9ac Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | CleanupLars Knoll2015-04-261-2/+2
| | | | | | | | | | | | | | | | Rename QQmlAbstractBinding::object() and propertyIndex() to targetObject() and targetPropertyIndex() Change-Id: Ic50da69e7a7c6412b5abb36f433be046e6566763 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-221-1/+10
|\| | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlbinding.cpp src/qml/jsruntime/qv4arraybuffer.cpp src/qml/jsruntime/qv4functionobject.cpp Change-Id: Ic752e9dfd69b282093651c9234c110a49762f06d
| * Unregister types in the QMetaType system on unload.Robert Griebl2015-04-151-1/+10
| | | | | | | | | | | | | | | | | | This patch will enable the unregistering of previously registered QMetaTypes, when the corresponding Qml type is dead. The API for this was added to QtBase with b00201b. Change-Id: I96d4a3004d8da59ee8edf7cfd6d2fef3a5410807 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add QQuickAsyncImageProviderAlbert Astals Cid2015-03-261-0/+4
| | | | | | | | | | | | | | It allows for providers to implement threading on their side Change-Id: I34042b213ce7697a3e39470387357d733e15723c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-03-031-3/+8
|\| | | | | | | Change-Id: I94f8ae93d76bd5c120de25d9c238701afe8bfbd0
| * QtQml: Micro-optimize iterator loops.Friedemann Kleint2015-02-261-2/+5
| | | | | | | | | | | | | | Avoid repeated instantiation of end() in loops, use variable instead. Change-Id: I3bb1c6918cfd16a5dcefbcc03c442e99fe9bf76b Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| | * Doc: add missing "winrt" & "winphone" to Qt.platform.osJ-P Nurmi2015-02-021-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: Idc252cc0303ffd7e8259cd9bf19a05a643657600 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Karim Pinter <karim.pinter@digia.com>
| | * Doc: fix Qt.platform.os since -tagJ-P Nurmi2015-02-021-1/+1
| | | | | | | | | | | | | | | Change-Id: I623ae8818d6d8f10faec2f823c4d27a37d8fecda Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>