summaryrefslogtreecommitdiff
path: root/src/qml/parser
Commit message (Collapse)AuthorAgeFilesLines
* qmlformat: change comment handling behaviorSemih Yavuz2023-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | Cumulative commit for adding zero-length comments in qmljsengine and also handling of empty lines after comments. qmljsengine only adds comments if the relavant comment length is larger than 0. Allow adding zero length comments since empty comments might be useful and required in some situations. Unlike the other formatting tools (clang-format, rustfmt) qmlformat didnt respect the emptylines after comments and stick the comments to the associated element. Change this behavior such that a newline/ blankline is added(but no more than one). A few tests in qmldom/reformatter needed to be edited due to this new behavior. Pick-to: 6.5 Fixes: QTBUG-111231 Change-Id: I2fcdda0bfe569b7a1d19c4058e1604cb0d73291d Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Use X-Macro for AST-visitor declarationSami Shalayel2023-04-121-650/+133
| | | | | | | | | Use the X-Macro to simplify the AST-Visitor and BaseVisitor definitions. Task-number: QTBUG-92876 Change-Id: I8f20490ae551a27a50cd037eb705baac3673eba5 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Kill TypeArgument(List)Sami Shalayel2023-04-123-8/+0
| | | | | | | | | | | Remove the forward declarations of TypeArgument(List) and its uses. This amends e89a06753c772bd96b3299e03b2f7ad78ffc9fb9 that removed TypeArgument(List)'s definition while leaving its forward declarations and uses around. Change-Id: I1a3e27ce18611beaf84b7c59e01a622f9e7f2477 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QML: Allow pragmas with multiple valuesUlf Hermann2023-02-225-5/+83
| | | | | | | | | This will be needed in follow-up changes. Task-number: QTBUG-94807 Change-Id: I6243ea31290251c30dd0aceaae878568bc1c0525 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QmlCompiler: Fix recognition of builtin list typesUlf Hermann2022-12-152-12/+12
| | | | | | | | | | | | | Previously all list types used as arguments or return types for methods had to be looked up via the imports. However, builtin types are not part of the imports at run time. Therefore, recognize list types already early on, when generating the IR. This is the same way we do it for property types and it allows us to easily identify lists of builtins. Pick-to: 6.5 Fixes: QTBUG-109147 Change-Id: I91fa9c8fc99c1e0155cc5db5faddd928ca7fabbc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Parser: Simplify argument "lists" for type annotationsUlf Hermann2022-10-195-89/+38
| | | | | | | | | | There can in fact only be one type argument, and we don't need a finish() method. In fact the finish() method didn't return the type argument at all. Task-number: QTBUG-107171 Change-Id: Ifb7d85ca42a38d37da71b6453b458c7ec10cd64d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qml: fix TypeArgumentListFawzi Mohamed2022-10-191-1/+1
| | | | | | | | | | | | | | | | | | All type annotations in qml did drop any typeArgument due to a bug in TypeArgumentList: instead of keeping a circular list that is inverted while building, and finally transformed in the inverse in the finish() method, it kept a singly linked list and the finish method would return a nullptr. Fix the formatting and indenting of type annotations now that they work. Pick-to: 6.4 Task-number: QTBUG-107171 Change-Id: I9deff83d328c5c0784a4104e406036a435278945 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* QtQml: Remove unused includes in qml, first partSemih Yavuz2022-09-141-1/+0
| | | | | | | | | | | | | | | 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>
* qmldom: line by line indentation/reformattingFawzi Mohamed2022-09-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduces support for line by line indentation and reformatting This is done with a simplified restartable lexer and parser. * qqmldomscanner: a tokenizer for a single line, built on the top of the normal lexer. One of the key property is that the state can be stored and restarted. Thus after an edit, re-indenting or split of a line one can restart the lexer with the state at the end of the previous line, and re-evaluate from there on. * qqmlcodeformatter: contains a stack based parser that is used for syntax highlighting and indentation. The state is a stack of integers, and along with it also the indent level is stored and the accepted syntax is a superset of the grammar (typically repetitions are allowed and order is more permissive). This builds on the top of the scanner, and also allows restarts. The public interface focuses on having the stored state of the parser and lexer, and being able to update it after a line of text, or give the correct indentation for a line. * qqmldomindentinglinewriter: has a LineWriter that uses the CodeFormatter internally to re-indent every line. Change-Id: Ifce9ed14ecd157bec65fb740b2c7ee8a5fc0729a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qqmljslexer: add dump to qDebugFawzi Mohamed2022-08-302-0/+70
| | | | | Change-Id: I8ce66f5d7a75ae8ba8733ddb464c2198bd18ce27 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Parser: Preserve keywordiness of "static" across nested classesUlf Hermann2022-08-301-6/+6
| | | | | | | | | | | | | | | | "static" is a keyword in the context of JS classes, no matter how deeply nested. Therefore, keep track of the nesting level. Switching the keywordiness of "static" off during method definition parsing makes no sense as the standard doesn't mention such a thing. Method bodies are strict code where you cannot use "static" as identifier. Methods and properties can be called "static" no matter if static is a keyword or not. Pick-to: 6.4 Fixes: QTBUG-96631 Change-Id: Ia09e52fe2ae72721fe1c8a9b95899a31095db988 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qml: make lexer line by line & restartableFawzi Mohamed2022-08-183-243/+441
| | | | | | | | | | | | | | The Qml lexer was not restartable, make it so that a line can be parsed independently from another. This is a requirement for efficient indenting and highlighting. Old approach in creator used a separate finite state machien "scanner", now it is possible to use the same lexer as the parser. One can "checkpoint" every few lines, and restart the process form the line above the change, and stop when the status is the same as before. Change-Id: I72a13a767ac7adfe103e56e60902e61c88e4fd82 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* qqmljs.g: improve performance avoiding reference counted containerFawzi Mohamed2022-07-251-2/+2
| | | | | | | | | | | | | | | | As detected in Creator by hjk: Detaching the rawString_stack alone shows up at 0.85% when loading Creator inside Creator. One write access is actually used from qmljs.g:593, so making the whole function const would need more work. Take a short cut and replace the unneeded reference counted container with a non-reference counted one. Change-Id: I480d539f532f9dbfbb0ddef986a7177dfca9b173 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QML: Support negative values in enumsFabian Kosmale2022-07-191-0/+24
| | | | | | | | [ChangeLog][QML] It is now possible to use negative integers as values for QML enum declarations. Change-Id: I321ad45ab41d5ef23d37d202a384d40e2e1e239d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Explicitly include qtaggedpointer.hIvan Solovev2022-07-011-0/+1
| | | | | | | | | | It is now transitively included from qversionnumber.h (via qmetatype.h), but that will change soon. Pick-to: 6.4 Task-number: QTBUG-102350 Change-Id: Ida458c446ca241f3f603628eb9b2d15c0a546b3e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlast: add missing tokens for enum declarationMoody Liu2022-06-242-0/+4
| | | | | | | this adds possibility for qmlls to highlight an enum name Change-Id: If802bfa3afd8bdcd5eed894fce50bad5907464bf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlJS::AST: Do not dereference nullptr to get static AST kindUlf Hermann2022-06-151-2/+4
| | | | | | | | Coverity-Id: 394805 Change-Id: I7fe8994d28fe9d13a4c441a5c527aeb77ce78b6c Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1111-493/+27
| | | | | | | | | | | | 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>
* Make sure all private headers include at least one otherThiago Macieira2022-03-101-2/+2
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QML: Take care of QVariant when converting function argumentsUlf Hermann2022-02-231-0/+3
| | | | | | | | | | | | | We cannot convert to QVariant using QMetaType::convert(). But we can just construct a QVariant with the desired type and data. This will become an issue once we automatically convert argument types to match the desired type inside the function. As a side effect, also allow declaring "var" arguments to functions. Change-Id: Idc14021d8d85d3d09ee7b7f286de91b56ea02bfd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qqmljslexer: Make lexer restartableMaximilian Goldstein2022-02-182-485/+509
| | | | | | | | | | | Moves all variables that represent the lexers state into a separate struct that can be read and modified from the outside. This is necessary in order to enable per-line formatting in qmldom Change-Id: Iedde139cec6380bd62fa12c5ddec2a943a3b50f9 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML: Allow declaring and binding list<foo> properties in one stepUlf Hermann2022-01-311-4/+21
| | | | | | | | | | | We apply the same trick we already use for the UiObjectMember rules: We add an ExpressionStatementLookahead before the T_LBRACKET starting the UiArrayMemberList. Task-number: QTBUG-82443 Change-Id: Ibdb3111b7721d2af087c14b79538dee131b8e301 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlJs: Add a missing includeOrgad Shaneh2022-01-041-0/+1
| | | | | | | | Amends c9380aa42805cf55736dc87c87149d912282c0ae. Pick-to: 6.3 Change-Id: I0ccf5263f97463ba4e6f012c42dc516dbe50696c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Fix return type calculationUlf Hermann2021-12-061-0/+9
| | | | | | | | | | We can return void from a function, explicitly or implicitly, and we need to be able to wrap that into a QVariant. In order to explicitly return void, we need the void type to be exposed and understood. Pick-to: 6.2 Change-Id: I513cabb25469b89a85b5d212a6825a037400729d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML/AST: Remove dead codeFabian Kosmale2021-11-261-6/+0
| | | | | | | | The qmldevtools library is no more, therefore we can resolve the TODO and remove the method that only existed for it. Change-Id: I685d9305e4b42a34ade56baccce0ec2e49cbcf4a Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Clean up property attributes (2/2)Fabian Kosmale2021-11-173-145/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new AST node for property attributes (currently required, default and readonly). That node is not integrated into our visitors, as it is only meant as an internal implementaion detail of UiPublicMember. All information stored in it is meant to be accessed by UiPublicMember's methods (see also the note below). We use an union of SourceLocation and a node pointer to only pay the overhead of the new node for properties; signals simply store the signal token. The grammar is rewritten with a new UiPropertyAttributes rule, which avoids quite a bit of duplication in various rules, which had to deal with the combinatorial explosion of attributes. Some parse errors are now turned into semantic errors instead (readonly without initializer, required with initializer). By centralizing the handling of attributes in the grammar, we now can easily support e.g. default properties with a list initializer. As part of this restructuring, UiPublicMember's firstSourceLocation is fixed to ensure that we actually return the first source location, independent of the order in which the attributes are written. Note: In theory, we would not need to make UiPropertyAttributes an AST node. It could be a simple data class. However, the parser currently assumes that every pointer in its parser stack is an AST node, and touching that part would be a larger undertaking. As we use a pool allocator, the cost is not that high (though we use more memory from the pool then we would strictly need to). Change-Id: Ia1d9fd7a6553d443cc57bc3d773f5be0aebe0e0e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Clean up property attributes (1/2)Fabian Kosmale2021-11-172-48/+42
| | | | | | | | | | | | Instead of directly accessing the attribute related members of UiPublicMember, we access them via a function. Moreover, we remove some redundancy: A property is readonly/default/required if and only if the corresponding token is valid. Thus we can drop the boolean members. Change-Id: I22f15b2b037e857d2f9d3167cb761cba9516a135 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qqmljs.g: always set operatorTokenFawzi Mohamed2021-11-041-0/+1
| | | | | | | operatorToken was not set in all cases for assignments Change-Id: I0c2a3aba022034ed9b3c8021433b71b3df4b3ccf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add a Pragma for list assign behaviorUlf Hermann2021-10-132-2/+13
| | | | | | | | | | [ChangeLog][QtQml] You can now specify the list property assignment behavior in QML using the "ListPropertyAssignBehavior" pragma. This is analogous to the macros you can use in C++. Fixes: QTBUG-93642 Change-Id: I9bdcf198031f1e24891f947b0990a3253d29a998 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QQmlJS::Engine all inline and eliminate unused functionUlf Hermann2021-09-302-176/+31
| | | | | | Change-Id: If30dbc79ca686607ec023f3944f82093106823be Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Remove obsolete devtools lib ifdeferyFabian Kosmale2021-09-301-4/+1
| | | | | Change-Id: Ifc5fc430046eb0d72434a701812fd27b200f992b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* fix handling of arrow functionsFawzi Mohamed2021-09-171-1/+1
| | | | | | | | | * correctly set lbraceToken in all cases (there was a wrong index in the grammar) * avoid semicolon for "virtual" return statements of arrow functions Change-Id: I2966558c835fdc74ecfb4d31e001a22dda385912 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Treat substitution free template string literals as string bindingsFabian Kosmale2021-07-232-1/+9
| | | | | | | | | | | | Before this change, they were treated as script bindings, which are less efficient, and could not be used in ListElement. Fixes: QTBUG-95139 Pick-to: 6.2 Change-Id: Ic66052c7f58b3ffdf1b7c0c169f42b4f99df62a1 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Evaluate type assertions in QMLUlf Hermann2021-05-261-20/+4
| | | | | | | | | | | | | | | | | | Type assertions actually check whether the expression matches the type, and return null if it doesn't. [ChangeLog][QtQml] You can use TypeScript-like type assertions using "as" now. In contrast to TypeScript, QML's type assertions are enforced at runtime. If the type doesn't match, null is returned for object types. Also, type assertions can only cast to object types. There is no way to create a value type or primitive type reference. As value types and primitives cannot be polymorphic, this doesn't matter, though. There are other ways of converting those. Task-number: QTBUG-93662 Change-Id: I00fce3d4ea7a8c6b4631c580eaf6c113ac485813 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QQmlJSAst: Silence CodeChecker warningFabian Kosmale2021-05-031-1/+1
| | | | | | | It is an invariant that any UiArrayBinding has a qualifiedId. Change-Id: I62a68f90db39caffc4b97634d8d51317a367b61d Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Implement optional chainingMaximilian Goldstein2021-04-134-1/+119
| | | | | | | | | | | | | | | | | This change implements optional chaining (https://github.com/tc39/proposal-optional-chaining) by adding a new type of optional lookup with an offset to the end of a chain. If `undefined` or `null` is encountered during an access marked as optional, we jump to that end offset. Features: - Full support for all kinds of optional chain - With some codegen overhead but zero overhead during normal non-optional FieldMemberExpression resolution - Properly retains this contexts and does not need to resolve anything twice (this has been an issue previously) - No extra AST structures, just flags for existing ones [ChangeLog][QtQml] Added support for optional chaining (https://github.com/tc39/proposal-optional-chaining) Fixes: QTBUG-77926 Change-Id: I9a41cdc4ca272066c79c72b9b22206498a546843 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlJSLexer: Add support for peeking one QCharFabian Kosmale2021-04-132-0/+9
| | | | | | | | | This is helpful for the upcoming handling of ?., which needs to be treated as a single token (T_QUESTION_DOT), unless it is followed by a number literal. Change-Id: Id5e992bd037c2df88ef6e66905ec58a39bb67d73 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QV4CompilerScanFunctions: Silence code checker warningFabian Kosmale2021-03-301-2/+5
| | | | | | | | | | | | The AST is constructed in such a way that having exportAll set always implies that a fromClause exists. Also, clean up exportAll: We do not need a separate member to track it. Its value is fully determined by the presence of fromClause and exportsClause. Thus, replace it with a function. Change-Id: Ib7db2bbaf326ecc36a7f4a2986a7c1fb54db6cd5 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Ensure that empty tokens in the AST are emptyFawzi Mohamed2021-03-261-6/+6
| | | | | | | | | | | | | | | | Arrow functions introduce a virtual functions and return statements to simplify code generation (arrow function look like normal function definitions), but to have correct firstSourceLocation / lastSourcelocation other tokens were reused. Use an empty SourceLocation at the correct position instead, so code that expects the correct location (for error messages,...) works and code that expects the correct token content (rewriter in QtCreator for example) also works. Introduce helper SourceLocation::startZeroLengthLocation/ endZeroLengthLocation to simplify such code. Change-Id: I1c5df16e1704df2df9b7cbd1a039ce56be3727d3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Lexer: Drop redundant checksUlf Hermann2021-02-191-7/+5
| | | | | | | identifierWithEscapeChars is just set to true a few lines before. Change-Id: I6c2b1ff4146d1a606c78f21669fb3d45cfaa2de3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Uniformly support shebangFawzi Mohamed2021-02-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | The "qml" tool was the only way of loading QML files that would respect a shebang line. This is problematic as this way you cannot load such files programatically using QQmlComponent, limiting their re-use. Common tools like Qt Creator, but also qmllint, qmlformat, qmlcachegen, etc would not recognize files with shebangs. By moving she-bang support directly in the lexer all tools implicitly support it. Note that we could just as easily support '#' as extra comment character along with //, but here we narrowly add support for in the first line only, as node does (this means that javascript files using she-bang accepted by node, are now accepted also by qml). The only tool needing some adjustments is qmlformat, that has to emit the she-bang again as she-bang and as first line. Add tests for qmlformat, and sprinkle some she-bangs in the other tests just to be sure it doesn't affect anything. Change-Id: I1f6d881c7438bdb23163b5dbe829d59a35d11132 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QML: Warn about usage of injected signal parametersUlf Hermann2021-02-122-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | You should declare functions with formal parameters if you want to use parameters passed by the signal. We need to generate two different warnings because there are two code paths by which such parameters are injected. If we compile with qmlcachegen, it simply inserts a lookup instruction in to the byte code. This lookup then triggers our special hack expressly made for signal parameters. If we don't compile using qmlcachegen, a function declaration with formal parameters is synthesized. We mark those formal parameters as injected and warn if we see one of them used. [ChangeLog][QML][Important Behavior Changes] The automatic injection of signal parameters into signal handlers is deprecated. This is because we cannot determine the names of the signal parameters at compile time. Furthermore, also for human readers it is difficult to discern between arguments, context properties, properties of the current object, and properties of the root object of the component. Requiring the signal parameters to be explicitly named resolves some of this confusion. You can turn the deprecation warning off using the "qt.qml.compiler" and "qt.qml.context" logging categories. Task-number: QTBUG-89943 Pick-to: 6.1 Change-Id: If0a5082adb735a73efd793868b3a55bc7d694cbe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Remove the qmake project filesFabian Kosmale2021-01-151-23/+0
| | | | | | | | | Remove all qmake project files, except for examples which are used to test that qmake continues to work. Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qtdeclarative: finish fixing compilation with explicit QChar(int)David Faure2020-11-071-1/+1
| | | | | Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix QtQml after QMetaType/QVariant changes in Qt CoreLars Knoll2020-08-281-0/+1
| | | | | Change-Id: I2a983cf8188e88d80d3b7726208d821427eb8f3c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adapt to qtbase changesFabian Kosmale2020-08-231-0/+1
| | | | | | | | | | | 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>
* Use qstrntod instead of qstrtodhjk2020-08-101-4/+2
| | | | | | | Potentially saves a few cycles by avoiding a strlen call. Change-Id: I3c1e4ddf3fb0a52e9f44edea11616a8969604091 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix compilation with newer qtbaseFabian Kosmale2020-08-061-4/+2
| | | | | | | | | | 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>
* Support required list propertiesFabian Kosmale2020-07-281-0/+35
| | | | | | | | The corresponding rules were missing so far. Fixes: QTBUG-85716 Change-Id: Ic97546ea2e574f694a96d974ee355ac84f8650b5 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>