| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Ic135a863581d29a3afb9c6c7f070d2630b3913b4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
We will need them for the QML language server. Also, always build all of
QQmlDirParser. The QT_CREATOR condition is mostly useless.
Change-Id: I476864b55f6ff3953c11e7887525a043a9405e00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Qt Quick 1 is dead since Qt 5.0, so it doesn't make much sense
anymore to link to different names there, or highlight behavioral
differences.
Task-number: QTBUG-70780
Change-Id: Iac5e0b226621f127714e722a11208ca1b21d977f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Record errors that happen during QV4::Script::parse() time in the same
way as we record errors during binding evaluation, in order to correctly
set the error state of QQmlExpression. This also removes dead code about
setting line, description, etc. which is taken care of by
ExecutionEngine::catchExceptionAsQmlError.
Task-number: QTBUG-67240
Change-Id: I2d586e16803d0883cdd2d1d262b4c67202c00562
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
As QJSEngine's handle() method is internal, we can redefine it to return
a pointer to an ExecutionEngine. That makes many things easier.
Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| | |
Change-Id: Iff06429f948ac6cdec77a9e5bb8c5375c56fe705
|
| |
| |
| |
| |
| |
| |
| | |
Ensure any error is deleted when the expression is
Change-Id: Ibbfd28f50279d4c66830b40c5c917eb8d98f266e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/
|
|
|
|
|
|
| |
Change those back again to return a value. This will be required
to avoid creation of Scope objects between JS function calls.
Change-Id: I05cb5cf8fd0c13dcefa60d213ccd5983fab57ea3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qv4ssa.cpp
src/quick/accessible/qaccessiblequickview_p.h
src/quick/items/qquickmousearea.cpp
src/quick/util/qquickanimatorjob.cpp
tools/qmlplugindump/main.cpp
Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the user doesn't clear any potential errors manually via clearError(),
then do it automatically in the destructor. Found with valgrind.
[ChangeLog][QtQml][QQmlExpression] Fixed memory leak
Change-Id: If5b1181850c7463c939a7ba536d74e7054c53d60
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp
src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
src/qml/qml/qqmlimport.cpp
src/quick/items/context2d/qquickcontext2dtexture_p.h
tools/qmleasing/splineeditor.h
Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead, simply create a QmlContext, and setup the bindings with
the QV4::Function itself.
Change-Id: I9db93b15112e43a6d5e275d126fb20f9c8833e8f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I070f73f106440667fce2c7fe33310369a6aa1376
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/
|
|
|
|
|
| |
These methods do not modify objects.
Change-Id: I67b1a10cfd0b32688500fca3265a96f53afd1b57
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation of many (or all) runtime functions consist of first
creating a QV4::Scope, which saves and restores the JS stack pointer.
It also prevents tail-calls because of that restoring behavior. In many
cases it suffices to do that at the entry-point of the runtime.
The return value of a JS function call is now also stored in the scope.
Previously, all return values were stored in a ScopedValue, got loaded
on return, and immediately stored in another ScopedValue in the caller.
This resulted in a lot of stores, where now there is only one store
needed, and no extra ScopedValue for every function.
Change-Id: I13d80fc0ce72c5702ef1536d41d12f710c5914fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
It's now QV4::FunctionObject::createQmlFunction, which I
believe is a better place and name for the method, esp.
as it has no real connnection to the binding wrapper anymore.
Change-Id: I59e20e120db72e53735b3a986e0b91bc7c3347d7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
Clean up some of the code to create binding expressions.
Change-Id: I1cd826685713b44166c58b114fa91135a664591d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
This doesn't make sense, as the persistent is never being
used. So either the scope object is being used from somewhere
else in which case it'll be referenced and marked from there,
or it's not being used in which case, we might as well collect it.
Change-Id: I56cb45282cbc795d4c59314c10491dedb9b7d478
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I2ebc0ac8f5085157f5d1ec71a1b75559c6a46f8b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Name the functions consistently between all classes inheriting from
QQmlJavascriptExpression to prepare the move of the member into the
base class.
Change-Id: I161e829e3921816e675b73b6c1f3ca06315b328f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
We always called evaluate with our own context, so there's no
need to pass it along as an argument.
Change-Id: I3463165eb2947b230c7acf54e7c29dd5d3b8e17c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Now that the class got unified with QQmlAbstractExpression, it has a
vtable anyway, so we can just as well remove the old hack.
Change-Id: Ifa095297e3d75564c4305ce3655eaa57436ef4a8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
The class is always used together with QQmlJavaScriptExpression,
so we can just as well fold the functionality together into one
class and simplify our code.
Change-Id: I23820e51efaaea16ae5db7e2153a827d7b22999e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Avoid copying url and file name twice into the context every time we
instantiate an object.
Change-Id: I1c76b80b9c44f95512af5899d760151f6dcd7bb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
qtdeclarative/src/qml/qml/qqmlinfo.cpp:46: warning: Cannot find 'qmlInfo(...)' in '\fn' QQmlInfo qmlInfo(const QObject *object)
qtdeclarative/src/qml/qml/qqmlexpression.cpp:366: warning: Undocumented parameter 'column' in QQmlExpression::setSourceLocation()
qtdeclarative/src/qml/doc/src/qmlfunctions.qdoc:176: warning: Undocumented parameter 'reason' in qmlRegisterExtendedUncreatableType()
qtdeclarative/src/qml/doc/src/qmlfunctions.qdoc:176: warning: No such parameter 'message' in qmlRegisterExtendedUncreatableType()
Change-Id: Iec801b33b11bd57abadd968a90c49f8eba1280d5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This prepares things for a rewrite of the internals of Persistent.
Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Make public methods proper members of the ExecutionEngine, and
move private methods into the .cpp file only.
Change-Id: I3ca49e39bb1c4e559a2c63346e6ae6cfa446147d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ibd529ae5cc3ba06f46152e9daa9119a4e7a2561c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I0f2f77c9cc268a0c5ca3ffe0cd66fc98bb1964b3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
exceptions
We must handle a thrown exception and cannot pass the undefined value back to
QV8Engine::toVariant.
Change-Id: Ia466b175706dccd513895ef5bb166b811fbdc26b
Task-number: QTBUG-41860
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
| |
This is part of the effor of moving members from QQmlCompiledData into
QV4::CompilationUnit in order to eliminate the former in the long run.
Change-Id: Icce7fe0ee9a49cb3a7677fd7020008fc55ecdcf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Connection objects
We can re-use the expression we've compiled at QML type compilation time, as
long as we "inject" the signal parameters in the dynamic qml lookup chain.
Change-Id: Icc417531c41dea06ff5d033011179af49b03f542
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The right hand side of script string properties can be evaluated in entirely
dynamic scopes, due to QQmlExpressions' public API of allowing construction
from a QQmlScriptString and a variable scope/context. Nevertheless we should
compile these bindings at type compile time, as long as we make sure that the
compiled code doesn't try to do any compile time determined property lookups
and type resolution. This is implemented using a separate compilation pass
that ensures the disableAcceleratedLookups flag is set.
A few minor cleanups come with this patch:
* Ensure that the property caches array is always symmetric to the list of
compiled QML objects, as that allows the use of at() instead of value().
* The code for creating a QML callable function object for a given run-time
function is now centralized in a static function QmlBindingWrapper, used
for script strings and bindings from custom parsers.
The provided unit test verifies the successful execution of the same script
string with two different scope objects.
Change-Id: Ica2cea46dd9e47263b4d494d922d3cc9664b08ae
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
* Get rid of members in QQmlCompiledData that were used by the VME
and are now unused
* Get rid of QQmlVME friend declarations that are not needed anymore
Change-Id: I11b4b6f0b4b0b60edf92a1256be3d0d44d76bbc9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Don't require a binding id to initialize the url/col/line. Fixes
tst_qqmlexpression with the new compiler code path, where the id isn't needed.
Change-Id: Ic09d850038c93fdc4f2bee6190cb515081dd5865
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Don't use unprotected Values in the API anymore.
Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: If8b0c3b91be50678693868c10fefc3678008834d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: Iee910dcc1d3148922d2f92055eb06cdb0b889502
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the remaining places that were rewriting bindings. Remove the
binding rewriter class.
Change-Id: Ib1e9121dc10f4526ddb7cf0ae32fecd8ce2d4993
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This way there is no need to rewrite the binding expressions
anymore, instead we can directly compile them into a
binding function.
Change-Id: I91a0c540d066976e363590fe9ccde6a81ee92b1d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|