summaryrefslogtreecommitdiff
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
* QtQml: Use QMetaType in QQmlValueTypeWrapperUlf Hermann2023-05-173-37/+36
| | | | | | | | | | | Retrieving the QQmlValueType is expensive and there is not a single place where we need anything but its QMetaObject. Retrieving only the meta object, on the other hand, is cheap. Change-Id: I3ad5574d64f1f67a4d4cf2886dc5c396e99ec91a Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move ScopedStackFrame into qv4stackframe_p.hUlf Hermann2023-05-1713-124/+149
| | | | | | | | | | | This is where it belongs. We need to apply some tricks to avoid cyclic includes, but that's better than what we have so far. Also, sort and clean up the includes in the affected files. Change-Id: Ia7a957d06c0ca284045d831417740c3f9920bc92 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qt_add_qml_module: Set QT_QML_MODULE_QML_FILES correctlyFabian Kosmale2023-05-161-15/+17
| | | | | | | | | | | | | | | | | | | | A QML module might not actually contain any QML files at all (in case of a pure C++ module). In such a case, we so far ended up with QT_QML_MODULE_QML_FILES being set to "-NOTOUND", which later is problematic for qt_query_qml_module. We already have code in place to cover that issue for some variables, just not for QML_FILES. The code is now amended to handle it, too. Moreover, the code block is moved to the end of the function. This ensures that the code for setting a variable always comes before the code ensuring that it is set – which would not have been the case for QML_FILES if it had stayed at its old position. Pick-to: 6.5 Task-number: QTBUG-111946 Change-Id: Ib4501bb4a617b2174ad89e116588aa51353cb17f Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* V4: Discern between named builtins and optimizations for common typesUlf Hermann2023-05-1610-160/+239
| | | | | | | | | The named builtins include void and regexp. The optimizations for other types are useful, but should be a separate enum. Change-Id: I06220cf4a6d3449deca89a26c4f5db0e41d32765 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Replace mentions of deprecated macro Q_ENUMS()Topi Reinio2023-05-162-2/+2
| | | | | | | | | Q_ENUMS() is deprecated in favor of Q_ENUM(). Pick-to: 6.5 Task-number: QTBUG-113229 Change-Id: If562e50a88ff04d02be0aa10c975e0af84d90e44 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Add missing \target keywords for QML macrosTopi Reinio2023-05-121-3/+5
| | | | | | | | | | | | PAST_MAJOR_VERSIONS, PLUGIN_TARGET, NO_CREATE_PLUGIN_TARGET, and CLASS_NAME are documented and elsewhere in the documentation we try to link to them, but they were missing a \target. Also, fix a link to QT_QML_SOURCE_TYPENAME. Pick-to: 6.5 Change-Id: I74ff0de558d1f43b739f64a4bab19863f8be34cb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Document the --verbose flag to qmlcachegenUlf Hermann2023-05-121-0/+17
| | | | | | | | | Amends commit a7c92814f0ff6e9253c781b90e70ad645f8cd94e. Change-Id: I0568298aaa696036b5115f4e93ddeb1cf90c76a3 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mike Trahearn <mtrahearn@topcon.com>
* QQmlComponent: Remove pending QProperty bindings in old createObject()Ulf Hermann2023-05-122-27/+53
| | | | | | | | | | | | | When calling the QQmlV4Function overload of createObject() we end up in a different code path. The problem is the same, though. Amends commit ef6e9f6b75848dfdacdd98cf9e7530f651b3dfca. Pick-to: 6.5 Task-number: QTBUG-99363 Change-Id: I6341243b75d9db1e0fcb80d8d73dab6932d85fd2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Examples: Move Qml plugin example to manual testsOlivier De Cannière2023-05-121-82/+0
| | | | | | | | | Outdated documention has been removed. Task-number: QTBUG-111036 Change-Id: I8db138ff71615a6ed6ac4cebdb365c27252fa5ee Pick-to: 6.5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix reset support for value typesFabian Kosmale2023-05-121-0/+6
| | | | | | | | | | | | | | Our value type refactoring in 6.5 broke reset support for value types when that write happens through virtualPut. Fix that by checking whether the value we're assinging is undefined before attempting any conversion, and reset the gadget in that case (if it is actually resettable). Task-number: QTBUG-113473 Pick-to: 6.5 Change-Id: Ifaa2d045f718fc3cb2d5e75b3626b41175ac3a3b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* Replace {add,sub,mul}_overload with q{Add,Sub,Mul}OverloadMarc Mutz2023-05-113-5/+5
| | | | | | | | | | | | | | | | | | These APIs started out as private APIs in qnumeric_p.h, but have since been made pseudo-public in qnumeric.h. The qnumeric_p.h versions just forward to the qnumeric.h ones, so just use the latter. This is in preparation of removing the {add,sub,mul}_overflow versions, which, despite being defined in the unnamed namespace, don't sport the q prefix, so potentially clash with global symbols. The change is a simple textual search and replace. Picking to 6.5 to avoid cherry-pick conflicts going forward. Pick-to: 6.5 Change-Id: I2525619c14cb8eeadd08e2fa6c35968bcedd5171 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML: Maintain invariant between QObjectMethod membersUlf Hermann2023-05-111-3/+19
| | | | | | | | | | | | | | | If the methodCount is 0, the methods have to be nullptr. Otherwise they have to point to the actual method(s). This is important for the method resolution to work correctly. In particular when cloning a method we have to check for 0. Amends commit 17bd07cbc5b6cf54716e991765ab3088a710d7b3. Pick-to: 6.5 Fixes: QTBUG-113484 Change-Id: Ic31d6e391c1d74a162820232f242a19379f5e4df Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QML: static assert that QQmlPropertyData is trivially copyableUlf Hermann2023-05-111-0/+2
| | | | | | | It would be very, very bad if that assumption was violated. Change-Id: I0ae7391a8df93450fc881a937c5365c57c58277f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Improve argument construction in generated codeUlf Hermann2023-05-112-0/+38
| | | | | | | | | | | | | We don't have to pass types that don't fit if we actually have the correct types in suitable wrappers. This still invokes the internal conversions of the call frame setup if we call with really generic types, for example if the same value is read multiple times with different target types. However, that is acceptable. Fixes: QTBUG-113465 Change-Id: I8ec4afeb39bbe6585e5268c0e9b0cfd2788d761a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Value types: Prefer assigning bindings instead of convertingFabian Kosmale2023-05-091-10/+12
| | | | | | | | | | | | When we're assigning a QJSValue to a value type property, we must first check whether it is a binding created by Qt.binding. In that case, we should directly set that binding up. Going through the conversion code path might not necessarily fail, but might instead yield nonsense. Pick-to: 6.5 Fixes: QTBUG-113472 Change-Id: If91e0843f0caf36c96b4c811b9ce8076adfc984f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove the 'qml-devtools' featureAlexey Edelev2023-05-091-5/+0
| | | | | | | | | | | | | | | The meaning of the feature has changed and tools that depends on this feature now need to be built unconditionally. So the feature should be removed to avoid confusing users. [ChangeLog][QtQml][Tools] The 'qml-devtools' feature is removed. All tools that depend on this feature are mandatory and need to be build unconditionally. Fixes: QTBUG-113221 Pick-to: 6.5 Change-Id: Ia026684703d847ce777d7a2916f04b3c90727695 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Properly support lists as method argumentsUlf Hermann2023-05-091-0/+5
| | | | | | | | | | | a, Teach QV4::QObjectWrapper how to convert QQmlListProperty to QObjectList. b, Parse the isList attribute from qmltypes. c, Resolve lists when resolving QQmlJSScope. Change-Id: I70c6d40507de990b45a87eb7d8c7bba279d550e8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Encode "missing" line number as negated address of stack frameUlf Hermann2023-05-097-18/+40
| | | | | | | | | | | | | | | This way we can identify which entry in a stack frame to amend when processing an exception in generated code. However, negative line numbers are also used to signal the position of "Ret" instructions. Since you cannot throw an exception from a "Ret" instruction, those cannot collide, but we cannot qAbs() the line number anymore when saving it in the stack trace. We have to qAbs() it in all the places where it's read. Pick-to: 6.5 Fixes: QTBUG-112946 Change-Id: I24dc4008fb7eab38e4d24e70211c22e46f1b72a7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Allow conversion from QV4::Sequence to different iterableUlf Hermann2023-05-091-11/+21
| | | | | | | Pick-to: 6.5 Fixes: QTBUG-112291 Change-Id: Idd47ea8daf9c54759af6c1feba68bd52d1163615 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Don't try to convert objects with prototypes to QVariantUlf Hermann2023-05-091-4/+4
| | | | | | | | | This is likely to lose some properties. Pick-to: 6.5 Fixes: QTBUG-106266 Change-Id: Ib5a2567d61635a5cf7b3abee7cfef0c073d59e63 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Silence signed vs unsigned warning on 32 bit VS 2022 debug buildJøger Hansegård2023-05-071-1/+1
| | | | | | | | | | | | | | The warning C4018: '<': signed/unsigned mismatch appears in a Q_ASSERT when checking a lookup index against the size of the container. Fixed by changing from unsigned to signed type for the index. Since the index is already implicitly converted to signed type when used, we can use a signed type from the start. We rely on implicit conversion from unsigned instead of static_cast to not hide other warnings in the future. Change-Id: I2b1983bdd40104e2c7135eec849a198ac074517c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QQmlComponent: Remove pending bindings when setting propertiesUlf Hermann2023-05-063-7/+38
| | | | | | | | Pick-to: 6.2 6.5 Fixes: QTBUG-99363 Change-Id: I2c731ec0b8c5947192accdeb5ef52903d9c7cd90 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Don't crash when monitoring binding removalUlf Hermann2023-05-051-7/+19
| | | | | | | | There are more bindings kinds around. Fixes: QTBUG-113353 Change-Id: If545f56bd61c238431883be3eb013841d96b18bb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix small errors in the C++ integration tutorialsFriedemann Kleint2023-05-052-3/+2
| | | | | | | | | Fix spelling and remove QGraphicsItem::ItemHasNoContents reference. Pick-to: 6.5 Task-number: QTBUG-111033 Change-Id: I9564fa1bb4eb1af786078d1909a3ad8268dfe290 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Disallow reading from values affected by side effectsUlf Hermann2023-05-041-56/+66
| | | | | | | | | | | | | | Instead of accepting the inconsistency between interpreter and compiled code here, we can just detect whether a value can be affected by side effects and refrain from reading it then. Since you can always explicitly reload a value that may have been changed, the resulting compile warnings are easily worked around in user code. Refactoring user code this way also makes it much clearer what is actually going on. Pick-to: 6.5 Task-number: QTBUG-109221 Change-Id: Ica832e39838ef732b0d181364630737fd7709b74 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Runtime codegen: Avoid memset for zeroingFabian Kosmale2023-05-041-12/+8
| | | | | | | | | 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>
* QML: Fix call frame conversion for QVariant return typesUlf Hermann2023-05-041-0/+11
| | | | | | | | | | | The function may return a QVariant in place of the actual type because it cannot express the actual type as-is. This case needs special care because QMetaType::convert() doesn't know what to do with it. Pick-to: 6.5 Fixes: QTBUG-112837 Change-Id: Ibf93a28aa6a60d49c5ab63fa7eed5f5a8e58e163 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Do not stop parsing on top-level Component elementsUlf Hermann2023-05-031-1/+1
| | | | | | | | | | | | | This just creates an inconsistent state where some of the document has been parsed and some hasn't. The only thing we actually need is the log message. Also, fix the warning message. Amends commit 169f0f71665a3a5155f8d63a9c11bc2484353561. Pick-to: 6.5 Fixes: QTBUG-112897 Change-Id: Ie8486909f9bea9ee1b87f2857f7b77fb7cc561e8 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QmlCompiler: Relax shadowing checkUlf Hermann2023-05-024-29/+233
| | | | | | | | | | | | | | | | | If we detect a property or method as potentially shadowed, we don't have to abandon all hope. We can still retrieve it as untyped var. Since there are a number of things we can do with untyped var, this may still be useful. In the same sense, we need to treat function calls as untyped when the function in question can be shadowed. Calling functions with var arguments and return types leads to some more interesting situations in the call frame setup, so we fix that, too. Task-number: QTBUG-112480 Change-Id: I238d1cf04951f390c73e14ed9e299f2aa72b68cb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Docs: Fix "Can't link to" example warningsSafiyyah Moosa2023-05-021-4/+16
| | | | | | | Task-number: QTBUG-113160 Pick-to: 6.5 Change-Id: I49de891c36d778df5d2727f2f0703d534421e2d5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Use new rvalue overload of QMetaProperty::writeOnGadget()Marc Mutz2023-05-024-5/+10
| | | | | | | | | | The new overload avoids the unconditional deep copy inside QMetaProperty::write()'s lvalue overload. Task-number: QTBUG-112762 Change-Id: Ic224faf72288e73bb6ad9049f1e0dc585e04ca19 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML metatypes: Adjust to QMetaType revision incrementFabian Kosmale2023-05-021-2/+2
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-113227 Change-Id: Icd2ca482ef8656d544c7c560ca05b9dd222f9c0a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Inline some array methodsUlf Hermann2023-04-284-0/+303
| | | | | | | | | | | So far we can only deal with methods that don't change the source array and don't use iterators or functions as parameters. We also omit concat() for now. However, indexOf(), lastIndexOf(), includes(), join(), slice() and toString() are possible already now. Task-number: QTBUG-112722 Change-Id: Id19c74e8ad25af876bc954c040c767823b7e3259 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlData: Implement markAsDeleted without recursionFabian Kosmale2023-04-281-5/+9
| | | | | | | | | | | | | | | | | | | While a normal QML scene should not feature extremely deep object trees, one can still encounter them in some test cases. Those test cases might then run out of (C++) stack space with the previous recursive version of markAsDeleted. Thus, we change the implementation to use an explicit workqueue instead of relying on recursion. This changes the visitation order, but code is not supposed to rely on the order of Component.onDestroyed calls anyway (and we keep at least the order in so far that the parent emits the "signal" before it's children. Pick-to: 6.5 Change-Id: I93b30cc26b984d1a21cff92df1dd68cd45e67477 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qqmllist.h: Include qcontainerinfo.hUlf Hermann2023-04-271-1/+3
| | | | | | Task-number: QTBUG-113148 Change-Id: I9dfdc5601b684b2c54c6436ab86cd2f633c432b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QmlCompiler: Use actual type of enums, rather than intUlf Hermann2023-04-263-9/+74
| | | | | | | | | | Now that the type is available from qmltypes we can just use it. Task-number: QTBUG-112180 Change-Id: I315372da0925f19c209f676226f450863b0d3ea5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Trace: Convert qtdeclarative to use new tracepoint generationAntti Määttä2023-04-267-22/+35
| | | | | | | Pick-to: 6.5 Change-Id: Ieacfa716b657ac221a75cd5a0dd75d5099962e91 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* QmlCompiler: Implement ConvertThisToObject and basic DTZUlf Hermann2023-04-252-0/+7
| | | | | | | | | | | | | | We know that 'this' is a QObject* since the metatypes stack frame mandates it. Whenever you pass 'this' to anything it's loaded from the special 'This' stack slot which then triggers a DTZ check. A DTZ check is a noop if we can prove that the type is statically known, though. In QmlCompiler, if we have a valid register content, then the register has been set in all code paths that lead to the instruction in question. Fixes: QTBUG-111439 Change-Id: I81d1cd140eea63f85628c3bef3a8f6db0a12096d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Exclude licensing header when including a .qdocincTopi Reinio2023-04-253-2/+4
| | | | | | | | | | | | | The \include command includes the source in its entirety when the second parameter is omitted. This pulled in also the license header which was visible in the generated documentation. Add snippet tags and use them to extract only the content we need. Pick-to: 6.5 Task-number: QTBUG-113138 Change-Id: Ie3fe2fede1e81d08201ec4353352ef069aebc388 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Specify that class name must be fully qualifiedAndreas Eliasson2023-04-252-3/+25
| | | | | | | | | | To avoid confusion, all macros that take a class name as an argument should specify that the class name needs to be fully qualified, even if you're already inside the namespace. Fixes: QTBUG-110718 Pick-to: 6.5 Change-Id: Icaed4be5df44e8d35ef382a918246ed03b0bb0c5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Allow conversion from QQmlListProperty to QListUlf Hermann2023-04-241-6/+27
| | | | | | | | | | In the happy case this just retrieves the internal QList from the list property. In the sad case it produces a deep copy. That's not worse than what the interpreter does, though. Fixes: QTBUG-112227 Change-Id: I8b2b0ac74c90b6dcee876e83a64502756733c1c5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Refactor the usage of icutils::NodeAmir Masoud Abdol2023-04-242-5/+12
| | | | | | | | | | | 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>
* QQmlEngine: Introduce markCurrentFunctionAsTranslationBindingFabian Kosmale2023-04-242-0/+41
| | | | | | | | | | | | | | | The general recommendation to handle language changes in QML is to handle the LanguageChange event. However, if one is willing to tie themselves to the QQmlEngine, we can offer a way to ensure that calling a function will result in a traslation binding. This might also be helpful for anyone implementing a translation system different from Qt's, e.g. KDE's i18n. Fixes: QTBUG-102393 Change-Id: Id4d7a401e0be9d65e1769c8471b26689f44bf66a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Fix typo in QT_QMLLINTER_TARGETS_FOLDER CMake QML property nameLeena Miettinen2023-04-241-1/+1
| | | | | | | Task-number: QTBUG-113116 Pick-to: 6.5 Change-Id: I8d2c1c2e8e96b365b4bd2e6c9a321cdf1824272b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Only signal list variable assignment onceMikolaj Boc2023-04-223-66/+99
| | | | | | | | | | Lists are internally cleared and each element is pushed to the back from the source list in QML. Use nonsignaling operations for clear and push and activate manually having performed the operations. Fixes: QTBUG-112208 Change-Id: I1a995905f3fa758e4cc8c39b8576db668d84a067 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* ACTION_IF: suppress GCC 13 warning about leaked dangling pointerThiago Macieira2023-04-201-0/+12
| | | | | | | | | | | | | | | | | | GCC 13 says: In member function ‘void QAbstractAnimationJob::setState(State)’, inlined from ‘void QAbstractAnimationJob::setState(State)’ at animations/qabstractanimationjob.cpp:295:6, inlined from ‘void QAbstractAnimationJob::complete()’ at animations/qabstractanimationjob.cpp:528:13: animations/qanimationjobutil_p.h:41:39: error: storing the address of local variable ‘wasDeleted’ in ‘*this.QAbstractAnimationJob::m_selfDeletable.SelfDeletable::m_wasDeleted’ [-Werror=dangling-pointer=] This warning is produced when the action is "return" (used by the RETURN_IF_DELETED macro) because we'd leave m_wasDeleted with the dangling pointer. However, it's not really dangling because it was deleted, but GCC doesn't know that. Pick-to: 5.15 6.2 6.5 Change-Id: I3b169860d8bd41e9be6bfffd1757115520a67972 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* XMLHttpRequest: Implement XHR.overrideMimeType()Edward Welbourne2023-04-202-6/+84
| | | | | | | | | | | | | | | | | It was missing from QQmlXMLHttpRequestCtor, making life painful for XHR users. It's a method that has existed in every XHR specification, and is required, if the goal is to be compliant with any XHR web standard. [ChangeLog][Qml][XMLHttpRequest] Added missing overrideMimeType(mime) method. This function can be used to force the XHR object to parse the data in HTTP responses differently than what the server suggests. Done-with: Oliver Eftevaag <oliver.eftevaag@qt.io> Task-number: QTBUG-53709 Change-Id: I9f8ff37e1604b95306a85fc7e64db6d111b9e069 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Doc: Re-phrase descriptions around read-only propertiesSze Howe Koh2023-04-201-6/+6
| | | | | | | | The current text sounds a bit like it's describing a const value. Change-Id: Idf9b8ae14ce032af7ac073419aba6250b26f5847 Pick-to: 6.5 6.2 5.15 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Qml: Fix QQmlScriptString::isEmpty()Ulf Hermann2023-04-191-1/+3
| | | | | | | | A QQmlScriptString without a d pointer is indeed empty. Task-number: QTBUG-112859 Change-Id: Ic3aea676403bd815e73d26733392c7f6ac8b84b8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Binding: Reevaluate when before the target changesFabian Kosmale2023-04-191-2/+19
| | | | | | | | | | | | | | | | ...and do not warn about missing properties if when is disabled. Besides avoiding spurious warnings, this also avoids modifying a property only to restore its binding/value directly afterwards. Note that when the binding gets re-enabled, we still trigger the warning. Fixes: QTBUG-112860 Pick-to: 6.5 Change-Id: I5ddd32f2de2dec9da372b08ab4bb5bdb88873e51 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>