| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
| |
Change-Id: I2a983cf8188e88d80d3b7726208d821427eb8f3c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The internal QVariant constructor taking a QMetaTypeId has been removed.
Thus, construct QMetaTypes where necessary from the id, or avoid a
QMetaType -> ID -> QMetaType roundtrip where we already have a metatype.
Also fix a few missing includse that were previously transitively
included.
Change-Id: I56ce92281d616108a4ff80fe5052b919d1282357
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
| |
Potentially saves a few cycles by avoiding a strlen call.
Change-Id: I3c1e4ddf3fb0a52e9f44edea11616a8969604091
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
qstrtod is no longer exported, but instead an inline function. This
replaces the existing forward declarations with an include of the
required private header.
Change-Id: I50bd32557c55dddcb197f163609fd7d5a1b2301b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
| |
The corresponding rules were missing so far.
Fixes: QTBUG-85716
Change-Id: Ic97546ea2e574f694a96d974ee355ac84f8650b5
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-84319
Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Follow-up lines of continuations strings that directly end
with an unescaped line feed still broke the line numbers of
code following the string. Fix by explicitly handling the
first character inside a string differently.
Amends 126ee5c901a9675a9ab61d4c6f2961c95b8bceac.
Change-Id: Ia945546d35db844114064ae34d6189704ceefe3b
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
| |
This avoids the warnings on conversion to QChar.
Change-Id: Ib774f24592d6f09a531c60bb6fa6e5bdbec88120
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-81392
Change-Id: Ic83091c547a7854b7fa86b44d93c575bd7426bae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
If a string ends with a line terminator follow-up lines had a
wrong line number.
Change-Id: I98a8f69cbc876e07b3fe83490d517bf7771c59b5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
The lexer handled escape sequences inside string literals
wrongly which could led to follow-up problems like wrong
offsets or even lines of tokens.
Change-Id: Ief14dda77f9079931a7d19ea549017a1d59c2d0b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Always parse typeinfo entries from qmldir files, and export QQmlJS the
Qt way.
Change-Id: I3a87a8d0a9ed1014628df6eb906bde5ea23e5d9f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-71278
Change-Id: Ie3167d44780a192b5010052eea5192eee8c21c32
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
An import statement without version specifier imports the latest version
available, one with only a major version imports the latest minor
version from that major version.
Task-number: QTBUG-71278
Change-Id: I43907ae4e1052be533039d545de5391c41d38307
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qqmlirbuilder_p.h
src/qml/qml/qqmlpropertycachecreator_p.h
src/qmltyperegistrar/qmltypesclassdescription.cpp
src/qmltyperegistrar/qmltypesclassdescription.h
src/qmltyperegistrar/qmltypescreator.cpp
src/quick/items/qquicktext_p.h
src/quick/util/qquickvaluetypes_p.h
Change-Id: Ic209741592e7b85820bf3845722023a190ebc1c5
|
| |
| |
| |
| |
| | |
Change-Id: I6848575df79be5f84e55e1e9ae9282216424afeb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I11e5c9e95974e89f2fd1571ca4b97a0f2ac3309a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is needed in a few places outside of declarative, so this change
restores the loc member in DiagnosticMessage and moves
QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory.
QQmlError is unaffected and retains only line/column.
Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb
Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/imports/qtqml/plugin.cpp
src/qml/qml/qqml.h
src/qml/qml/qqmlmetatype.cpp
src/qml/qml/qqmlmetatype_p.h
src/qml/qml/qqmltypeloader.cpp
src/qml/types/qqmlbind.cpp
src/quick/items/qquickitemsmodule.cpp
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a partial patch that is fuilly fixed with the following
one (big restructure) because it needs extra visit methods,
and that leads to conflicts, but I think it gets lost if merged with
the next one.
Change-Id: I54331a47a5c7faaf78a97e580825d1feec5adf92
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Base Visitor is an abstract visitor that has all visit methods
abstract, subclassing this one gets an error if some visit method is
not implemented (dumper and reformatter for example will gain from
this.
Change-Id: I3f8cfeb6fc0ef917acf725bbe1c293d761304287
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
UiRequired is not with all Ui Vistors and introduced with a // Ui
comment.
Move it there for consistency.
Change-Id: I51315ad380fd50998e7efe095c873d14a5ae7a97
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ModuleItem is unused we should either remove it or make it a used
abstract superclass like UiObjectMember.
Here we remove it.
Change-Id: Icfcebd450e09ebe324a99728613eea0348b980ac
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
attributes are always at the end of AST objects, move them there also
for UiObjectDefinition.
Change-Id: I7630b1c40627913c3e7e46e752acf1d80203ce63
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Add a commented out accept call for the non visited fields in accept0
Change-Id: Icb1ab0c77440f4c3eae5404bff2cf71086f96a2f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Annotations are added to UiObjectMember.
This makes it easy to find the annotations of any UiObjectMember
through the annotations attribute.
The clean AST approach would add an UiAnnotatedObjectMember that contains
both the annotation list and an UiObjectMember, but that makes
finding the annotation more difficult.
The annotations are not visited by default, if one wants to dump them
before the current object the simplest way is to use the preVisit and
use .uiObjectMemberCast().
Depending on how we use annotation we could change the current
approach.
Task-number: QTBUG-81714
Change-Id: I543a2cfe5157bcc86de6de9faebde9aea22974eb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check that the version parsed is in the valid range for QTypeRevision
and produce a compile error if not.
Task-number: QTBUG-71278
Change-Id: I9a957a10f4254387f9868a8f3f1e231440bc2cd2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/common/qv4compileddata_p.h
tests/auto/qml/qmlmin/tst_qmlmin.cpp
Change-Id: Ieabc9e0729630de6a8644024d11b765f35199f29
|
| |
| |
| |
| |
| |
| |
| |
| | |
It is now possible to mark a property of a parent class as required in
the child by writing required <propertyName>
Change-Id: I9e9d58c7b5c00577b056e905b39744b2fa359ea0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A QML Annotation is a Qml Object declaration prepended with @.
The name of the annotation is restricted to a dot separated list of
non keyword identifiers.
Annotations can be put before an Object definition, or any object
member declaration: bindings, property declarations, function
declarations.
This patch, aside parsing the annotations does absolutely nothing, the
list of annotations is discarded and never touches the AST.
[ChangeLog][QML] Add Qml Annotations
Task-number: QTBUG-81714
Change-Id: I4d79559a0d1fb23acaf482d0ef8f7d106dbf099d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many places we carry major and minor versions or revisions that are
loosely coupled to minor versions. As the Qt minor version resets now,
we need to handle these things more systematically. In particular, we
need to add a "major" part to revisions.
QTypeRevision can express the current major/minor pairs more efficiently
and can also be used to add a major version to revisions. This change
does not change the semantics, yet, but only replaces the types.
Change-Id: Ie58ba8114d7e4c6427f0f28716deee71995c0d24
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
This was already possible from C++, this change adds the required
changes to the grammar to allow declaring required default properties
in QML.
Change-Id: I76cb4d70e573bf161676da8295ab257fe95ed4ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml] It is now possible to declare new QML components in
a QML file via the component keyword. They can be used just as if they
were declared in another file, with the only difference that the type
name needs to be prefixed with the name of the containing type outside
of the file were the inline component has been declared.
Notably, inline components are not closures: In the following
example, the output would be 42
// MyItem.qml
Item {
property int i: 33
component IC: Item {
Component.onCompleted: console.log(i)
}
}
// user.qml
Item {
property int i: 42
MyItem.IC {}
}
Fixes: QTBUG-79382
Change-Id: I6a5ffc43f093a76323f435cfee9bab217781b8f5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Implements the '??' operator as specified in https://github.com/tc39/proposal-nullish-coalescing.
Also adds a few tests.
Task-number: QTBUG-77926
Change-Id: I3993450c192d11bf1ade0662d945c1553b4c6976
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
You can write "(something as Foo)" to give hints to any tools that you
expect something to be a Foo at this place. This is not a conversion and
ignored at runtime for now. Eventually the compiler will verify that the
type assertions are plausible and error out if they aren't.
Change-Id: I21c8705bb387f7ab2cbc153293dbf477663afe87
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When asked for lastSourceLocation() we should always return the
semicolon token. In order for that to work, the semicolon token needs to
be valid in all cases. In the case of object literals as expressions for
properties we neither accepted nor synthesized a semicolon as delimiter.
Add an optional semicolon that we can then also use as end of the
expression statement.
Furthermore, this triggered a silent rule conflict for ImportSpecifier, which
for some reason did not arise before:
IdentifierReference could resolve to both ImpordBinding and IdentifierName,
causing ambiguity in the grammar, and ultimately caused parse failues
when parsing an import statement.
This is now resolved by explicitly telling the parser to prefer
shifting.
Initial-patch-by: Ulf Hermann <ulf.hermann@qt.io>
Change-Id: Iaec29c452b577312248a17cb48f005f4fc0bd8c4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
It was incorrectly parsed in case of "as Foo", and it was mostly unused.
Change-Id: Ie833a8eb247108cb7bcd6ca3e6f3e5df614461cf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With QV4_CRASH_ON_STACKOVERFLOW set you can use up all the stack
provided by the operating system to parse and execute JavaScript. Once
the stack space is exhausted the program crashes like it would in case
of a C++ stack overflow.
We cannot reliably determine either the maximum stack size or the amount
of stack space currently in use at runtime. Therefore, the guards we
usually put in place are necessarily conservative.
[ChangeLog][QtQml] There is now an option to disable the (necessarily)
conservative stack size checks when parsing and executing JavaScript. If
the environment variable QV4_CRASH_ON_STACKOVERFLOW is set, JavaScript
stack overflows crash the program the same way C++ stack overflows do.
On the flip side, more stack space is made available that way.
Task-number: QTBUG-74087
Change-Id: I5e9d9ec6c0c9c6258c31d9e2d04a5c1819fbf400
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml]
"required" is now a (contextual) keyword in QML, and users can
mark properties with it to specify that those properties must be set
when the component gets instantiated.
This can be done either declaratively via standard property
bindings from QML, or imperatively by using the functions to set initial
properties (QQmlCompoent::setInitalProperties and related functions in
C++, Qt.createObject, Loader.setSource,... in QML/JS).
Logic has been added to QQmlComponent::create and the various QQmlIncubator
classes to verify that the required properties were set. If properties
marked as required are not set, a warning will be printed at runtime,
and the component will not be created.
Change-Id: I8e38227fc8f173b053b689c1597dc7fd40e835e7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I9b6a9f95b838bbbf015c7619ae3a8828836e4178
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\
| |
| |
| | |
Change-Id: Icc46cb06ac1dbe7097d11bc0db5813eb39fbf758
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most of the rules already had Semicolon at the end, however it was
missing for UiScriptStatement, list properties and UiObjectInitializer.
This change fixes the regression from 5.11.3 to 5.12.0, and keeps the
behavior consistent.
Fixes: QTBUG-77954
Change-Id: I45ef35fab399e3f971444b96d4a9ec6a99e29e09
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Change-Id: I243d12b75a07ac04560b444c326bff77d0dc642c
Fixes: QTBUG-74087
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
First, let the lexer create a T_FUNCTION_STAR token for "function *",
which makes the job of the parser significantly easier.
Then, by using GeneratorDeclaration instead of GeneratorExpression, we can
avoid the conflicts between UiObjectMember and PrimaryExpression
Change-Id: Ib08918e3977ed1a80cdea0948da80bf37886f7de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I35d44de09f9d4133eb82490a1edb57eb374ff2f1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Use right associativity to tell the parser to shift directly when
encountering an else statement. This is the wanted behavior, as the
"else" should be associated with the last "if" statement.
This removes one more shift/reduce conflict in the grammar.
See also https://stackoverflow.com/a/12734499 (qlalr behaves like
Bison/Yacc here).
Change-Id: Id29f00b5a2862fdb3399e4c8a183eda2ed328ba4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extends grammar to support generator functions in QML components and
adjusts codegen accordingly
The corresponding test case must be blacklisted in tst_qmlmin, as qmlmin
cannot handle yield statements
Fixes: QTBUG-77096
Change-Id: I47d45dd56289cdf073b41932a585259d3052de04
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
There were quite a few rules which were essentially the same, only
differing in whether they matched T_SEMICOLON or T_AUTOMATIC_SEMICOLON
By introducing a new rule, we can match both at the same time
Change-Id: I46391e310e44ffa8bea03304a9c0726ffc872211
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Provide different export macros and different top level headers for
each, don't include runtime headers from compiler sources.
Change-Id: I7dc3f8c95839a00a871ba045ec65af87123154be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|