| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This allows extracting the type information for variable declarations.
Change-Id: I1241df3b27ae292b83392d5caaa1587caafa46a3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by TypeScript syntax, allow optional type annotations in the
style of ": <name of type>" in for the parameters of functions and their
return type.
These annotations are not used at the moment, so by default we produce
an error message when encountering them in the AST.
In addition their usage is limited to functions declared in the QML
scope. All other uses attempt to produce readable syntax errors. So for
example this is okay:
Item {
function blah(param: string) string { ... }
}
And this is not okay:
// some file.js
function blah(param: string) : string { ... }
Change-Id: I12d20b4e2ce92e01108132975a06cfd13ba4a254
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
We don't need to blank the script pragmas as the parser will ignore them
anyway.
Change-Id: Id93e9ba0a6aacb38692cb294fb140d8ef99a2d23
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
| |
The header file uses std::function and should include the corresponding
header file and not rely on the includee to do that.
Change-Id: Ic7a87aea4fcf49d17b0e5ef6c1aaf35424b66f01
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
In QQmlPropertyCacheCreator, move the code to determine the meta-type
for a signal parameter type into a helper function. Makes the code more
readable and available for re-use later.
Change-Id: I2876ed247d0c42f4e6d90872fa4b6a2dc4e1ba7e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
| |
Collect all that code in the Parameter class, which allows for future
re-use for function parameters and return types.
Change-Id: Ib9dfec9313dc3938634f9ce3a2e5a3a59a7135d9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
| |
We need it in both, the compiler and the runtime.
Change-Id: Iffacb9d150bf9eef6ef477bfd427dbac9bf49359
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
|
|
|
|
| |
Change-Id: Id05059dfc9910dad206e511b08f18487e241e508
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
|
|
|
|
|
|
| |
It's only used in the runtime.
Change-Id: Iac1d9f5eabeae7fb8c1816be61d2f35711815dc9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
|
|
|
| |
Change-Id: Ia4304644a2a365c359eed31c55c2ca9d7d42f10c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
| |
Move Property::Type out into a standalone BuiltinType enum class, as
it's also used in the signal parameters (and more in the future).
Change-Id: I1125c954f6e45c7a1ce6fe2aae77c5f0e68455f5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
| |
We can shave off 4 bytes of each property declaration by sharing the
bits for the custom type name index or the builtin type enum.
Change-Id: I77071cbef66c5a83b3e7e281dba3a435d3c68b39
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Fold the Var handling into the general type switch. That allows
decreasing the level of indentation for a large chunk of code in the
function.
Change-Id: I04d4efd310b798b28e7946924accdaf2e775c5aa
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
We can move the notify signal activation right into the
QMetaProperty::WriteProperty block.
Change-Id: If3cb8f41d3e460b2cec28854dec69f92355f1746
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
| |
Centralize the mapping in one place using a helper function. This
eliminates the table where the first field was unused as well.
Change-Id: I78b599d255e37931a02a8294b1df3d44023c9a15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Fold the only member of Property::Flags into a straight boolean (bit)
member. This makes the code easier to read.
Change-Id: Ib621952cf5b28ce8de6293bff4ca9ebb1290fb36
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Although in terms of values CompiledData::Property::Flags::IsReadOnly is
identical with CompiledData::Alias::Flags::IsReadOnly, they are intended
be values from distinct types.
Change-Id: If65ce91e56e88605c20c074c62b97c11963ffed2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
| |
We can reduce the distinction between a built-in type or a custom type
down to a single bit.
Change-Id: Ibe15d35357aa8c3948809f981221df29a40c400b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
The location member of signal parameters is not used at the moment, so
let's remove it.
Change-Id: Ia33bbe3bb79c382a78d61945c285b773b3492b55
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
There can only ever be one error, either a syntax error or a reference
error. We record the error type as we want to get rid of the virtual
throw<X>Error methods in favor of an explicit compilation result.
Change-Id: Ie228490aad8efb7885083f6485f931299567f54c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |\ |
|
| | |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
Change-Id: I20ad6f8a260f387a3b73566a32c35a5772b401a5
|
| | | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
.qmake.conf
Change-Id: Icd05d016de5b4cf9af5234cb47b5c3fd0f6a053e
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The allocation might run the garbage collector and that might delete the
object before we ref it.
Change-Id: I13cb74ab011a4eabc8df136023958791a2183df0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Commit 7cb6dce1f3e140ea68d6b05281950f212fc99d38 introduced an
optimization to remove bindings that after their initial evaluation had
no dependencies or errors (such as when accessing properties not set
yet). However when accessing a context property in a silent way -- using
typeof -- then no error state is set and the binding is removed. Any
later change of the context property results therefore in no binding
re-evaluation. This patch skips the optimization on bindings that are
associated with a context that has unresolved names. This fixes the
concrete bug at the expense of disabling further optimizations in the
context if other bindings access unresolved context properties. However
since context properties are discouraged anyway, this may be an
acceptable price to pay.
Change-Id: I95e120a4f71e8ebe0ec1fc44e8703c75f920dd28
Fixes: QTBUG-76796
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Be more strict in parsing version numbers
This also makes it easier to access the version number in other places
using the Visitor interface, like (soon) the linter and avoids reparsing
the text twice.
Potential disadvantages: previously allowed import statements will
rejected at parse time, e.g.
import QtQuick 0b10
Potential further advantage: Weird import statements like
import QtQuick 0b10
will be rejected earlier
Change-Id: Ifcd187b79a90952bc964c688afa4ea9b158e5109
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As the properties were missing their context, we could not get the
correct QMetaObject and would trigger an assertion in canConvert. We now
always set the context when creating QQmlProperties in qqmlbind.
Fixes: QTBUG-40487
Change-Id: I766c5697dc33fc1e18c2316e28d944975e84ae3c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Fixes: QTBUG-76346
Change-Id: Ie21f831a775489f0f2ac2e296136ed4932f5154f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
QQmlApplicationEngine doesn't need to manage it by itself.
Change-Id: Ib954a97caf5b36093a032220f349057fcf804090
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | | |
| | |
| | |
| | |
| | | |
Change-Id: I4161624c663ff87bbf9385991cd65027dd5cfd5f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... so the lock is held for shorter durations.
Add optimistic std::move()s.
Change-Id: I9e09e11a6e54b7ac4be3e23f06d65b3b7abc4fc0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The old code used the implicit conversions from QAtomicPointer<T> to
T*, and QAtomicInteger<T> to T, and vice versa. The semantics of these
differ from the ones std::atomic uses, so we're going to deprecate
these, like we did for load() and store(), too.
This patch fixes some users of these APIs before we deprecate them.
Change-Id: I892d705c22280f1c6fdc62c1777248b44e9c4329
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Found by locally making QExplicitlySharedDataPointer propagate const.
Change-Id: Ib8fdb28420d0470ca839d0cab15439e23165a3e2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/imports/imports.pro
src/qml/qml/qqmlmetatype.cpp
Change-Id: I308436caf55402cb2246cb591c6ac8f83e1febf8
|
| | |\|
| | |
| | |
| | | |
Change-Id: I59343fe228ca6b823b61577e5a0907e7381899c2
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Just like resolving the lookup initially, we need to set the base also
when hitting the cached lookup code path. The base is then used as this
object.
Fixes: QTBUG-76656
Change-Id: I6f6be05bc9875ddccc6e112e91176a0fa24a8fa1
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
At the point the plugin is actually unloaded the hook turns into a
dangling pointer.
Fixes: QTBUG-71387
Change-Id: Ib8ccee3f9a86d4700fbea7e87c666cd8f30f71e4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Missing \endcode commands caused malformed output and linking issues.
Change-Id: Idaf3cf998c2c0f4352a738b21b66abe5e89c197d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| | |\ \
| | | |
| | | |
| | | | |
Change-Id: I55353d8cee5420e0c9f59c3b3a387b461f1abf99
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Disable isThisThread asserts: there is only going to
be one thread.
Add a no-thread implementation for internalCalMethodInMain(),
which calls the message immediately, similar to the
current internalCallMethodInThread() implementation.
Change-Id: I554cacf572b5f47c9921d247773cc3d9127b8203
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reduce memory allocation on platforms without virtual memory
Change-Id: I54114a9fde008ecb67a5cbf0da33962b0d933017
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
QMLEngine by default allocates 4 MB for javascript stack and garbage
collection stack takes 2 MB. It is a lot of memory for platforms without
virtual memory.
Change-Id: I1575dd9584898dca33df66704f716c7b5a7c01c1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use loadRelaxed / storeRelaxed instead. load() / store() are
about to be removed from our private APIs.
Task-number: QTBUG-76611
Change-Id: I3bebbd1cde7e53d7e2451f2373db1232b595a1d0
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We can clear the engine plugins when compiled without library support as
those might be static plugins. However, explicitly loading a dynamic
plugin is pointless if compiled without library support. We can just
disable the whole function. Furthermore, the ability to load dynamic
qmldir plugins does not depend on Qt being compiled as shared library
but rather on library support being available.
Change-Id: I8553706f0f8f5bd4e98cc130bf56c4526f81b85f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This way we get a header-only representation usable for the QmlCommon
module.
Change-Id: Ia75e445ffbee0c3b2d473a2a3a6309b2f12e8eea
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Plain load() / store() have been deprecated, so port away
to their straight replacements.
Task-number: QTBUG-76611
Change-Id: I79935b889cf7b2ba7698f70cc5e33994b034aa09
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The compiler never links anything and therefore it doesn't need to
unlink, either.
Change-Id: I9ccdc012f9333abc5f4b60174b794e490772e1fd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Only the compiler ever has to do this, and we want the structure
definition for the compiled data as a common header.
Change-Id: Ie5c6d6c9dcd180dea79f54d0f7d10f3fc50fa20e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes: QTBUG-76527
Change-Id: I4044ae833eff61a3f06c2366597c1623b26794b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The API version should be common to Qml and QmlCompiler and therefore
cannot live in a header specific to Qml.
Change-Id: I033d3925353e02e42886568ea91382a9f2ca2552
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|