| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This relies heavily on the documented fact that we only support trusted
QML/JS content, meaning most files are only significant, not critical.
This also extends to the handling of qmlc files (as in
compilationunitmapper), as we store them in a user owned, non-shared
cache directory – so any vulnerability there would already mean that an
attacker has write-priviledges on user data.
An exception is ArrayBuffer, which can be used with arbitrary user data,
and should create a valid QBA.
Fixes: QTBUG-136970
Pick-to: 6.10 6.9 6.8
QUIP: 23
Change-Id: I22033fe6ab4acf8362a8183e25b92331d45cb32c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
| |
Change-Id: I2fc82de562909ab2e0eecfbbe1e2e53953a33756
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
The type loader should make sure that they are available. Prove that by
wrapping all access to dependencies into an accessor that checks the
dependent scripts.
Change-Id: I6e0153fcb213e1a5b6ece79e3fbc0e27dc1b292c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQmlTypeLoader::injectedScript() was unsafe and impossible to fix
because it had to query the engine from the type loader thread in order
to find out whether to load a script from an actual file.
By removing the whole special-casing of native modules, we can make the
script loading thread safe. A native module is now also a compilation
unit, with a regular QV4::Module as value. This means we can remove a
lot of code that deals with the native modules in the engine.
The downside is that native modules are now a lot larger than before.
However, given that they don't appear in any examples and hardly any
bugs have been filed about native modules since their introduction, we
can assume that they are not a very popular feature. The reduction in
complexity and the removal of the native modules map in the engine is
expected to outweigh the extra memory overhead for native modules.
Task-number: QTBUG-131721
Pick-to: 6.8
Change-Id: Ia7388d7ba8d71637559a791d874257fba4646330
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the base CU to be released while there may still be objects
around that reference the executable CU. Since the JS engine is gone,
the CU is not useful for much anymore anyway.
Since we don't want to check for the presence of a base CU in every
method, we replace the base CU with a static null value.
Fixes: QTBUG-129388
Change-Id: I84f8410fa8652203ac7c39f88a6d5aa05420ab11
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the C++ standard says that different functions need to have unique
addresses, some compilers have take substantial liberties with that
rule. This means we can't actually rely on the addresses of our
different lookup functions to differ and therefore we cannot use them as
discriminator.
Introduce an enumeration for all the different lookups and use that
instead.
Now we can also drop all the purely redirecting methods we've introduced
just to have different addresses.
Change-Id: Ifa68c27c0d2fef4084893a19227dab21bd948dfd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to re-use the compilation units for JavaScript libraries, we
need to eliminate the "m_value" member they are carrying, indirectly.
The values are tied to specific engines and invalid in others.
Luckily, we already have two suitable places to store such values:
1. In case of a "native" module without a compilation unit we have the
nativeModules hash in ExecutionEngine.
2. In case of a module or library backed by a CU we have the "module"
member of ExecutableCompilationUnit. This can currently only hold
modules but there is no reason why it wouldn't hold JavaScript
libraries equally well.
By using the "empty" V4 value we can also get rid of the m_loaded bool.
As a drive by, correct the QQmlScriptBlob::isNative() misnomer. We don't
want to know whether the script is native (for any value of that), but
rather whether it has a value.
Pick-to: 6.8
Fixes: QTBUG-129052
Change-Id: I284823f4aa26e46dec8328f88f65877f59e40f79
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
| |
scopde -> scoped
Change-Id: I34d68aa09a9d3fb84cc558055ed0388725f41fbb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Pass the metatypes of the contained types rather than the stored types.
[ChangeLog][QtQml][Important Behavior Changes] The AOT compiled code for
type-annotated JavaScript functions does not let you pass or return
values of the wrong type anymore.
Fixes: QTBUG-119885
Change-Id: I685d398c0745d32a999a3abd76c622a2c0d6651f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the current setup, we would have risked running out of native heap
space if the incremental garbage collection takes too long.
Remedy this by forcing the current gc run to complete immediately once
we overshoot the limit by a factor of 3/2.
We still need to respect that the gc must not run in a critical section:
Handle this by rechecking the condition when leaving the critical
section, and only forcing a gc run at that point if necessary.
Note that we currently update the gc limits before the gc cycle
finishes, so that the effective limit might actually not be 3/2 in that
case. This will be remedied in an upcoming patch.
Change-Id: I19c367bd1ff6ffc129293fc79e39b101f0728135
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ExecutableCompilationUnits are meant to be part of the roots as far as
the gc is concerned. However, they can be created at any point in time,
notably also while the GC is running. This was safe so far because all
allocations are black, and the compilation unit will only reference
freshly allocated heap items. As we want to move away from that pattern,
we have to change this:
We could use the typical combination of QV4::Scope and usage of the
WriteBarrier, however that would add overhead for a very uncommon case
(except when using QV4_MM_AGGRESSIVE_GC). Instead, we temporarily block
the garbage collection, reset the state of an ongoing garbage collection
and at the end of the setup of the ExecutableCompilationUnit, we mark
the ExecutableCompilationUnit if the GC was already running.
Introduce a new blocked state (CriticalSection) to distinguish between
the normal blocked state (gc is running) and the new state where we must
not even run an incremental gc to completion until the section has
finished.
Task-number: QTBUG-121910
Change-Id: I1dba3cc8a4f8d2b741a1a5e84fdfe7736b08e166
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
| |
There is nothing that makes it depend on ExecutableCompilationUnit.
Change-Id: I482dfc0177530f748bb90e5373c64ca5558d8629
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
We rarely actually need the executable CU, and where we need it, we can
dynamically create or retrieve it from the engine. To that end, store
all the CUs in the same container in the engine.
Change-Id: I0b786048c578ac4f41ae4aee601da850fa400f2e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
| |
Change-Id: Ia332a691a4a5f04fcca50eb1c3e2018f8368dbe6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
| |
Change-Id: Ie3504f16b34859cdef72f8138e6058dcc2d1f58f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
| |
Change-Id: I81ae9a4d24518dffc5b924994d45203958bb9546
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
| |
Change-Id: I49d48a7bc38e727bb23f3154311e1f7876f8cc03
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
| |
Change-Id: Id52e3d50b02649010ebcb2309253aa689a536770
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
| |
Change-Id: I1567c9d3d61312e98200fb0854d7fcf111983948
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
| |
Change-Id: I25063457aad3a6d29a8c2a5b236f9a51b56a2f51
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
| |
Change-Id: I89e44644b083681f069d1d7a385bec68b4bfd80b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
| |
This is in preparation for letting the engine cache the executable CUs.
Change-Id: Ideac10d8dda0784b41304b58f9b9fbd106173ea6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It only exists so that the type loader can query pre-compiled and native
modules from the loader thread. However, the type loader already has a
mutex of its own. We can use that to inject a "native" blob into its
script cache for the same effect.
We need to get rid of the mutex so that we can use the module map for
other compilation units, too.
Change-Id: I5a9c266ea36b50f5ea69214110def644f7501674
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want floating unlinked executable CUs. They should always be
tied to an engine, and the engine should not change. This gives us one
definite point where to register them with the engine (to be done in
subsequent change).
Unfortunately, due to the refcounting, we need to remove the engine from
any still-referenced CUs when the engine itself is destructed. We will
be able to drop the refcounting and make the engine fully own its
executable CUs once we can hold base CUs in most places.
Change-Id: I9a53e83d5c4746c2b2bca896b51baa4fe7fee757
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We want to re-use the base compilation unit across engines. For that to
work it cannot be a slice of the engine-specific
ExecutableCompilationUnit.
Since CompiledData::CompilationUnit is refcounted on its own now, make
it unmovable.
Change-Id: I8418c9754d7a07e5210c1e7a7fc69355e1d57807
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
We want to re-use the base compilation unit for different engines. To do
that, we cannot have data in there that belongs to a specific engine.
Pick-to: 6.7
Task-number: QTBUG-120189
Change-Id: I8e43e7ec6c1cd33249dc4ed15fec16babc6d06fb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We cannot get the property cache for an inline component the usual way
during type compilation. We have to ask the compilation unit for it.
Guard against still not being able to retrieve the property cache for
any reason. Abort the compilation rather than crashing.
Also, unify the setting of property attributes. Those should really work
the same way everywhere.
Finally, disallow writing aliases to value type properties where the
property holding the value type itself is not writable.
Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-115579
Change-Id: I029eb56a9a390085d0c696a787a64c48acf0d620
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Translator pragma can be used to set the translation context
instead of having the file name used
[ChangeLog][qml][translation][Important Behavior Changes] The context
for the translation can now be controled in a given file
using pragma Translator.
Task-number: QTBUG-114528
Change-Id: I6d9d7fb81ea969a90d8637d7277bdbe96c102088
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An empty context is to be passed as-is. We shall not replace it with the
file context context. Since the TranslationData struct has a field for
the context, we need to invent a "no context" value we use for the
methods that don't allow you to set a context (e.g. qsTr, qsTrId). We
cannot use 0 because that is the empty string which is a valid context
now.
Amends commit 9cfc19faf5d1ce2b9626914ab4528998b072385d.
Pick-to: 6.6 6.5
Fixes: QTBUG-118469
Change-Id: I160c512f42aba4a8ae2fc8860cdf4e50c53d9d3e
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gives us a unified interface to all kinds of QML types at run time
and reduces the effort of finding corresponding type attributes.
QQmlType is much larger than CompositeMetaTypeIds. Most composite types,
however, are initially referenced by URL, and we call typeForUrl anyway.
typeForUrl already creates a mostly functional QQmlType; we only need to
add the dynamic metatypes. The same type can be retrieved later and
associated with the actual CU using the compositeTypes hash. That way,
we don't need any extra type. We do, however, incur the cost of creating
the QMetaTypePrivate instances when first referencing a type. This could
be optimized, like many things in this area, by using thread safe lazy
initialization.
Now some QQmlTypes implicitly depend on the CUs they were created for.
This creates problems if the CUs are removed but the types still
persist. Such a situation can arise if you create and delete engines. In
order to avoid it, we:
1. Make the compositeTypes hold a strong reference to the CUs
2. When unlinking, avoid dropping the property caches (as those are used
to hold the metaobjects)
Now, however we got a cyclic reference between the CU and its
QQmlType(s). To resolve this, we clear the QQmlTypes on unlinking.
Finally, to avoid deletion recursion when clearing the last CUs on
destruction of the QQmlMetaTypeData, we move the compilation units out
of the way first.
All of this still doesn't work if multiple CUs hold the same QQmlType,
since compositeTypes can only hold one CU per type and that may be the
one that gets removed first. Therefore, we cannot allow such a situation
to happen and have to create a new QQmlType if it arises. It can only
arise if you have multiple engines loading the same QML components,
which should be fairly rare.
For inline components, we apply a similar trick: You can either find an
inline component by Url, and receive any type that matches, no matter
what CU it belongs to. Or you can request an inline component type that
belongs to a specific CU. It turns out we don't have to store the
containing type of an IC at all. Also, we slightly change the naming of
internal components' "class names" since we want to use the inline
components' element names for them.
Change-Id: I0ef89bd4b0a02cc927aed2525e72f6bff56df626
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
The ID can only be determined once the compilation unit is present. It
depends on the order of objects in the compiled data. The name is always
available. Indexing by name increases the overhead. However, since we
don't have to "amend" the ID later on and since we only need one
lookup table rather than two per type now, it's probably worth it.
Change-Id: I478de505a1934b5b6ab340b4be4fa5da4e95aeb3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
| |
Besides never getting read it would also never get invalidated when the
QML engine was deleted.
Change-Id: Ibaceafbd3d61d0ed82a76e4d7caec518fa12ef09
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
| |
We're going to call the JavaScript-typed functions a different name.
Change-Id: If92c3fb1b16b1b0bd7d009e7dd712ae6405e1232
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
| |
We can just use calloc and zero-initialization.
Change-Id: I88dc79d5b880253655159ae3b4385b9792a18ec6
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
In Unity Build, on OpenSUSE, for some reason compiler confuses
the Node with an `int`. This refactoring resolves the issue by moving
the type into the `icutils` namespace.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Id379b9aff21b29115d4503791debd658f034a0cd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the unlikely case that we get a corrupted CU from a cache file and it
still passes the header verification we don't want it to access invalid
memory when checking the file name.
We also generally want to use uint as index into the string table. A
signed integer makes no sense here.
Pick-to: 6.5
Coverity-Id: 310389
Change-Id: I12e9b8f39e1d3c68fd701c1ef4f54845ab8c3c12
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Otherwise we just re-load the old cache file next time. That's clearly
not intended.
Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-111078
Change-Id: Ia65b46880eca2b6e8c4792a09f20716125beada3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
| |
You can now enable and disable the AOT-compiled code and the loading and
saving of .qmlc files separately.
Fixes: QTBUG-101358
Change-Id: I1305c4f2f75d8cff544a127e956589d1ed1aeb52
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
We generate translation bindings for all the other translation functions
already. We can just as well generate a translation binding for this
one, too.
Fixes: QTBUG-107536
Change-Id: I851f03c26510b6d450aa78f5d7a1f0142d3a81aa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to
handle typedefs and accesses through pointers, too:
const std::string o = "object";
auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); };
auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) {
auto exprOfDeclaredType = [&](auto decl) {
return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o);
};
return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))));
};
auto renameMethod = [&] (ArrayRef<StringRef> classes,
StringRef from, StringRef to) {
return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)),
callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))),
changeTo(cat(access(o, cat(to)), "()")),
cat("use '", to, "' instead of '", from, "'"));
};
renameMethod(<classes>, "count", "size");
renameMethod(<classes>, "length", "size");
except that on() was replaced with a matcher that doesn't ignoreParens().
a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'.
Change-Id: I58e1b41b91c34d2e860dbb5847b3752edbfc6fc9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:
auto QtContainerClass = anyOf(
expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.
Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
| |
We want to use the aotFunction member also for typed JavaScript
functions.
Change-Id: Iad6d12ebed3ad3069832484137ed8e4d9e7a7cf4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far, for each method call we had to allocate a new QObjectMethod as
we didn't have any lookup to cache the methods. Introduce a new lookup
for that and use it for all QObject methods.
Since QObjectMethod contains a pointer to the concrete QObject the
method was retrieved from, some more care has to be taken: If we are
going to call the method right away, we don't need the object since we
always have a thisObject and any further retrieval of the same method
will result in a call again. This enables us to cache the method for any
instance of the same class. When storing the method elsewhere, though,
we need to hold on to the object since you can defer the call or connect
a handler to a signal or similar. For such operations we do need the
object. We can still optimize a bit by re-using the method cache we
build the first time around.
Fixes: QTBUG-95628
Change-Id: I5991180c5e0234cdc179c2b78a43dafc9083e525
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop unnecessary includes detected by clangd-iwyu.
Add new includes due to the transitive includes. Also, some of the
includes were detected as unused even if they were actually in use.
In those cases, use angular brackets instead of "" which deceives
the tool not to complain.
Affected subfolders: Debugger, Compiler, JsApi, JsRuntime, Memory,
Parser
Task-number: QTBUG-106473
Change-Id: I01d996a2a2ba31cbbc5f60f5454c8f850298f528
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
| |
So far, you could only use them from pure JavaScript programs. Also, fix
re-exporting parts of native modules.
Fixes: QTBUG-105901
Change-Id: I170017083284e6457b1aa0c6e606fd26227edae3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To add translation bindings to qmltc, the methods used to create
translation bindings need to be adapted to work without
QV4::CompiledData::Binding as it is not available from qmltc. Instead,
information already available from the QQmlJSScope should be used, along
with a newly introduced helper class QQmlTranslation.
Details:
Add a QQmlTranslation class that represents a call to qsTr, qsTrId etc
that knows how to translate itself (without needing any
ExecutableCompilationUnit or Binding). It encapsulates the
information needed to create a translation binding.
ExecutableCompilationUnit::bindingValueAsString refactored
so its functionality can be used without Binding.
Instead, it uses only the translationId, see
ExecutableCompilationUnit::translateFromId
and
ExecutableCompilationUnit::translateFrom.
Refactored QQmlTranslationBinding to work with QQmlTranslation instead
of CompiledData::Binding.
Same for QQmlCppBinding::createTranslationBindingForBindable,
QQmlTranslationPropertyBinding::create and
QQmlCppBinding::createTranslationBindingForNonBindable.
Changed TranslationBindingInformation to work without
CompiledData::Binding, and also removed static unused
QString ProxyTranslator::originStringFromInformation(
const TranslationBindingInformation &translationBindingInformation)
as I could not find out what this origin string is.
Same for the translation debugging in qmldb_preview.
Added QmltcCodeGenerator::generate_createTranslationBindingOnProperty.
Added #if to avoid compilation error for standalone DOM compilation due
to the new QQmlTranslation class.
Task-number: QTBUG-105345
Change-Id: Iccd94d5cba4eaf63901233451fec48051c855c2a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
| |
Pick-to: 5.15 6.2 6.3
Task-number: QTBUG-99545
Change-Id: I9f8bc5fa45c61f77ee95b055a3d8de001da8f8c5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
| |
Pick-to: 5.15 6.2 6.3
Task-number: QTBUG-99545
Change-Id: If0d6f893f2351a4146ddf125be4079b5e312f308
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|