aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw
Commit message (Collapse)AuthorAgeFilesLines
* Qml: add missing 'override'Anton Kudryavtsev2016-10-072-15/+15
| | | | | | | ... and drop redundant 'virtual' Change-Id: Ib1f68c1ebd0468cb4a77eecc986bbf718f6bf789 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Adjust decarative after qtConfig changes in qtbaseLars Knoll2016-08-191-1/+1
| | | | | | | | | Most of the changes are optional, but cleanup our QT_CONFIG usage. Change-Id: I5253d53f72f6fb03c2cfedae1e17d94f424a6bbb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove unused delete watcher classSimon Hausmann2016-08-182-112/+0
| | | | | Change-Id: I8ccb3ae9029d17dcb4d60239d225393b1da88993 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Centralized deferred cleanup handlingSimon Hausmann2016-08-092-0/+75
| | | | | | | Move the lambda cleanup code into a shared header file for re-use. Change-Id: Ib9fb7dce98200bcad2bb688740f9b6c2a1e4aae7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* V4: allow for String::createHashValue to be inlinedErik Verbruggen2016-07-132-26/+32
| | | | | | | Notably into QHashedString(Ref)::computeHash. Change-Id: Icf8487ed3da0f117cb0911f20c9b88498f61510a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QtQuick: clean up shader effect property connectionsErik Verbruggen2016-07-051-2/+2
| | | | | | | | | | | | | | | - Don't use a signal mapper, but handle the mapping using a custom slot object and a lambda to do the dispatching ourselves. - Don't do meta-calls by property name, but by index. - Cache the meta-object. - Resolve the property indices by using the QML property cache. For a shader with 6 property connections, the time spent goes from 320k instructions to 80k instructions (valgrind on x86_64). Task-number: QTBUG-53901 Change-Id: I2809198cf62f9716b3683798222203fc3e97fbb3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* V4: calculate the hash only once when inserting a string.Erik Verbruggen2016-05-121-2/+2
| | | | | | | Reduces the number of instructions of IdentifierTable::identifier by ~15%. Change-Id: I5a234fa96a6ee3e7202150ded512d1be0b36560d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Remove unused QPointerValuePair templateFrank Meerkoetter2016-04-182-195/+0
| | | | | | Change-Id: I93bc5951d555f799bb956020433d3087504e8f9f Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-082-119/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
| * qml: Remove unused QHashField class.Robin Burchell2016-04-062-113/+0
| | | | | | | | | | | | Change-Id: I8dd234d06048e6d8e7b2dfccb59d639ad167022b Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | V4: Allow some more functions to be inlined.Erik Verbruggen2016-03-311-1/+0
| | | | | | | | | | Change-Id: If9d1f87fd7cf0b12d2827c4574109234be7e8ab8 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Updated license headersJani Heikkinen2016-01-1919-266/+380
|/ | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-182-7/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * QtQml: Fix const correctness in old style castsThiago Macieira2015-07-092-7/+8
| | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove unused QQmlPoolFrank Meerkoetter2015-07-313-361/+0
| | | | | | | | | | | | | | This code is no longer in use. Change-Id: If0cb009ac6622ed36cba5886d6685d3f242c3c87 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Force completion of asynchronously loaded components.Robert Griebl2015-06-232-0/+29
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][QQmlComponent] Synchronously complete the loading of a Asynchronous QQmlComponent, if a PreferSynchronous QQmlComponent is created for the same url (given that this url does support synchronous loading). Change-Id: I3291d0569a69bac2aeb4815f1068a426ef2707ef Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Some cleanups to QQmlRefCountLars Knoll2015-06-051-15/+10
|/ | | | | | | | | Rename QQmlRefPointer::take to adopt, as it's a better fit with the semantics. Get rid of the assignment operator from a raw pointer and add a Adopt argument to the constructor. Change-Id: Ia1ebe42b24570f32543e783f91eb3206602772a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix usage of QtQmlDevTools private headers on OSX with framework buildsSimon Hausmann2015-03-164-2/+76
| | | | | | | | | | | | | | | | Previously this module borrowed its private headers from QtQml, so that when writing QT += qmldevtools-private, you'd get the private headers from QtQml. This doesn't work when QtQml is built as a framework. A cleaner solution is to give this module its headers proper by letting syncqt create the forwarding headers correctly (and consequently also include them in make install). In order for this to work, the included headers themselves cannot include any headers from QtQml, which this patch also takes care of, through a centralized inclusion of qv4global_p.h. Change-Id: I9bb8337956a2774cfaca6b338369face6c6ee785 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1220-140/+140
| | | | | | | | | 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>
* Get rid of most uses of ValueRefLars Knoll2015-01-231-2/+2
| | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove QQmlTrace. We have a real profiler.Erik Verbruggen2015-01-093-435/+0
| | | | | Change-Id: I50d981b277187327c2c63f8372f64db1300ed9ef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QQmlExpression/QQmlScriptString/QQmlBinding crashesSimon Hausmann2014-10-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | In the QQmlScriptString we store the binding id and it is an index into the runtimeFunctions array of the compilation unit. However we don't store the compilation unit and instead in QQmlBinding and QQmlExpression try to retrieve it from the cache via the context url (we have the context after all). That turns out to be not a reliable way, as sometimes the URL might slightly differ from the originally compiled cache (qrc:/// turning to qrc:/ maybe). Consequently the type is (unnecessarily) compiled again and unfortunately not _linked_, therefore the runtime functions array is empty. Another option is that when the component was created from a QByteArray, then no entry exists in the cache in the first place. This patch addresses the problem by storing a reference to the compilation unit in the QQmlContextData. That we can safely retrieve and it'll make sure the compilation unit also stays alive. In the process of that the manual reference counting was switched over to QQmlRefCount and QQmlRefPointer for QV4::CompilationUnit. Task-number: QTBUG-41193 Change-Id: I9111f9a3b65618e453954abcd789c039e65a94f7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix deadlock with QQuickView embedded via QWidget::createWindowContainerDyami Caliri2014-09-221-2/+9
| | | | | | | | | | | A QQuickView embedded in a widget application will be deleted in the QApplication destructor. At that point, events are not being posted, so the QQmlThread cannot properly shut down, and will deadlock waiting for an event. Task-number: QTBUG-36115 Change-Id: I4595f03e0afcf9463cfbc2ba95146d4777d19c56 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't start QQmlThreads from their constructorUlf Hermann2014-09-162-6/+11
| | | | | | | | | | In the case of derived classes (like the only user of QQmlThread) we cannot guarantee that the class is completely constructed when the thread starts. This includes the vtable which is necessary to decide which virtual functions to call. Change-Id: Ieaea67a72cc3b4f845b8621b34ca2928185917fb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2522-418/+242
| | | | | | | | | - 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>
* Convert String to new constructor syntaxLars Knoll2014-07-221-1/+1
| | | | | Change-Id: I07f7667d3d72a7d72e6717d194de8d7b15435777 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Give the QML and the debug server thread an objectname.Thomas McGuire2014-04-011-0/+1
| | | | | | | | | Now it is easier to identify the threads in e.g. the debugger in QtCreator. Change-Id: I032822e869df09cf43dc1d6e01d14610005ce217 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
* [new compiler] Fix parser status and created bindings allocationSimon Hausmann2014-02-071-0/+2
| | | | | | | | | | | | | | | Pre-calculate the amount of space we need for binding and parser status callbacks at compile time and therefore use a much simpler data structure (vector) to store the points to the bindings and callbacks. They need to be stored because during object construction and binding enabling phase, it may happen that they get destroyed and thus their m_mePtr pointing into the array gets deleted. The contiguous vector will also make it possible to interrupt the completion phase. Change-Id: Ic7c985bb8325ab355112e30e9d33d6ae4e7476d1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-2213-129/+129
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix deadlock when QQmlEngine is destroyed during compilation.Andrew den Exter2013-12-191-14/+27
| | | | | | | | | | | | | Before blocking to wait for the thread to finish ensure the thread itself is not waiting for the main thread to complete some action otherwise both threads will be waiting on the same wait condition that neither is able to wake. Likewise ensure the shutdown action is processed if the last scheduled event is currently being processed. Task-number: QTBUG-35581 Change-Id: I483fc56d0d398493f9fa907f3ab203439bfb9221 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove unused function isUnicodeNonCharacterThiago Macieira2013-12-081-14/+0
| | | | | | | | Found by ICC 14.0: qhashedstring.cpp(199): warning #177: function "isUnicodeNonCharacter" was declared but never referenced Change-Id: I62b113e41197dac12f73db8347e22c825e404627 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix various compiler warnings in order to remove warn_off in the near futureErik Verbruggen2013-11-041-131/+0
| | | | | Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Compile binding expressions in the QQmlCompilerSimon Hausmann2013-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is done by re-using the JS code generator from the new compiler. A few bugs were fixed on the way: * The index into the compiledData->runtimeFunctions array is not the same as the function index when they are collected (from the AST), as for example binding expressions may create extra V4IR::Function objects that break the 1:1 mapping. Therefore the JS code gen will return a mapping from incoming function index to V4IR::Module::Function (and thus runtimeFunction) * Binding expressions in the old backend get usually unpacked from their ExpressionStatement node. The reference to that node is lost, and instead of trying to preserve it, we simply synthesize it again. This won't be necessary anymore with the new compiler in the future. * Commit 1c29d63d6045cf9d58cbc0f850de8fa50bf75d09 ensured to always look up locals by name, and so we have to do the same when initializing the closures of nested functions inside binding expressions (in qv4codegen.cpp) * Had to change the Qml debugger service auto-test, which does toString() on a function that is now compiled. Even if we implemented FunctionPrototype::toString() to do what v8 does by extracting the string from the file, it wouldn't help in this test, because it feeds the input from a string instead of a file. * In tst_parserstress we now end up compiling all JS code, which previously was only parsed. This triggers some bugs in the SSA handling. Those tests are skipped and tracked in QTBUG-34047 Change-Id: I44df51085510da0fd3d99eb5f1c7d4d17bcffdcf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove some more QV4::Value usagesLars Knoll2013-09-301-3/+3
| | | | | Change-Id: Ic146a964f2ff6b90eeceda90bf1834d7212386a5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use a ReturnedValue when converting to String or ObjectLars Knoll2013-09-121-1/+1
| | | | | | | | Also rename Value::toQString() to Value::toQStringNoThrow(), and add a throwing toQString() method for JS use. Change-Id: I821b33fc61abb7d08839df965fd337685f61a545 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compilation with MSVC 2008 (and prospective Windows CE build fix)Simon Hausmann2013-08-222-7/+5
| | | | | | | | | | | | | | | | | * Only 2010 and newer ship stdint.h, so for 2008 we have to provide a little stdint.h compat header, for some of the third-party code we import. Our own Qt code this patch changes to use quint* types instead. * Include math.h and float.h for some math functions. * disable the JIT on Windows CE for now. * Change use of intptr_t to qintptr in Qt code. intptr_t is in inttypes.h, except that with VS 2008 it is indirectly available through stdio.h. Let's avoid the mess and just use the qt type, that's always available. Change-Id: I19055edd89e0a6b147d9edbb3b711798ed3c05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-221-0/+1
|\ | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/quick/items/context2d/qquickcontext2d.cpp tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
| * QQmlTrace: getpid() requires unistd.hShawn Rutledge2013-06-251-0/+1
| | | | | | | | | | | | | | | | Doesn't build on MacOS if you omit this include and uncomment define QML_ENABLE_TRACE in qqmltrace_p.h Change-Id: I78ed43b16a006699449202dd234e43be2f7b84fd Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Don't convert to a temporary QString just to compute it's hashLars Knoll2013-06-281-2/+1
| | | | | | | | | | Change-Id: I45fbd4a6304dd2f771d75a47a2ddf162705887b5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of QHashedV4StringLars Knoll2013-06-281-76/+20
| | | | | | | | | | | | | | | | This was required while we were using V8, but now we can simply pass QV4::String pointers. Change-Id: If6338e4a455d6132fe14e5e603e4fe9e477d1ffb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove the symbol optimisation from hashed stringLars Knoll2013-06-281-30/+1
| | | | | | | | | | | | | | Simplify the code, so we can move over to identifiers later. Change-Id: I42cb164840ecfd3f765049ab9fa46746a0d4a85b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove an overoptimisation that was only used (wrongly) in one placeLars Knoll2013-06-282-56/+7
| | | | | | | | | | | | | | | | Let's simplify this code. The goal is to replace most of the code in qhashedstring with an identifier based hash table. Change-Id: I2f9a38ad0bb2f43a2b2b87914823c23ed231f48c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | More correct assertion in QHasheV4StringLars Knoll2013-06-281-1/+1
| | | | | | | | | | Change-Id: Id34dcae9c7e52fe0262b4d9480a7307a393226ee Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Don't use a PersistentValue in QHashedV4StringLars Knoll2013-06-281-7/+7
| | | | | | | | | | | | | | | | | | The class is only used on the stack and critical to performance in a couple of places. This speeds up some QML benchmarks quite a bit. Change-Id: Id36682487396d42ddacdc71f7a32792a09318cf9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-241-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Remove use of 'register' from QtQml.Stephen Kelly2013-06-181-3/+3
| | | | | | | | | | Change-Id: Id9848e3161346c7519d430c47718670cabe556de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix memory corruptionLars Knoll2013-05-221-0/+1
| | | | | | | | | | | | | | | | The QString constructor taking a QStringDataRef doesn't refcount, so we need to do it manually. Change-Id: I076df18cfdb94ef796a42281b7bb1027798b609c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Build fix for testsSimon Hausmann2013-05-221-0/+2
| | | | | | | | | | | | | | | | This file uses uint16_t and therefore needs to include stdint.h for the declarations. Change-Id: Ifd95a4ade6ecb8560deca4d0118b985d939cfba2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove v8 dependencies in qhashedstringLars Knoll2013-05-222-64/+51
| | | | | | | | | | | | | | Also remove now unused API in v8::String Change-Id: I2570aedf407c89ad85da01cf0e2153a52b4e562d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of v8::String::(Ascii)ValueLars Knoll2013-05-221-10/+1
| | | | | | | | | | Change-Id: I792a94590efbec852620d101b620b263a90e1d54 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>